@vinicunca/eslint-config 3.23.0 → 3.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +243 -182
- package/dist/index.js +5 -9
- package/package.json +8 -11
package/dist/index.js
CHANGED
|
@@ -152,8 +152,7 @@ const parserPlain = {
|
|
|
152
152
|
* Combine array and non-array configs into a single array.
|
|
153
153
|
*/
|
|
154
154
|
async function combineConfigs(...configs$1) {
|
|
155
|
-
|
|
156
|
-
return resolved.flat();
|
|
155
|
+
return (await Promise.all(configs$1)).flat();
|
|
157
156
|
}
|
|
158
157
|
/**
|
|
159
158
|
* Rename plugin prefixes in a rule object.
|
|
@@ -218,9 +217,7 @@ async function ensurePackages(packages) {
|
|
|
218
217
|
if (process.env.CI || process.stdout.isTTY === false || isCwdInScope === false) return;
|
|
219
218
|
const nonExistingPackages = packages.filter((i) => i && !isPackageInScope(i));
|
|
220
219
|
if (nonExistingPackages.length === 0) return;
|
|
221
|
-
|
|
222
|
-
const result = await p.confirm({ message: `${nonExistingPackages.length === 1 ? "Package is" : "Packages are"} required for this config: ${nonExistingPackages.join(", ")}. Do you want to install them?` });
|
|
223
|
-
if (result) await import("@antfu/install-pkg").then((i) => i.installPackage(nonExistingPackages, { dev: true }));
|
|
220
|
+
if (await (await import("@clack/prompts")).confirm({ message: `${nonExistingPackages.length === 1 ? "Package is" : "Packages are"} required for this config: ${nonExistingPackages.join(", ")}. Do you want to install them?` })) await import("@antfu/install-pkg").then((i) => i.installPackage(nonExistingPackages, { dev: true }));
|
|
224
221
|
}
|
|
225
222
|
function isInEditorEnv() {
|
|
226
223
|
if (process.env.CI) return false;
|
|
@@ -427,10 +424,9 @@ async function formatters(options = {}, stylistic$1 = {}) {
|
|
|
427
424
|
quoteStyle: quotes === "single" ? "preferSingle" : "preferDouble",
|
|
428
425
|
useTabs: indent === "tab"
|
|
429
426
|
}, options.dprintOptions || {});
|
|
430
|
-
const pluginFormat = await interopDefault(import("eslint-plugin-format"));
|
|
431
427
|
const configs$1 = [{
|
|
432
428
|
name: "vinicunca/formatter/setup",
|
|
433
|
-
plugins: { format:
|
|
429
|
+
plugins: { format: await interopDefault(import("eslint-plugin-format")) }
|
|
434
430
|
}];
|
|
435
431
|
if (options.css) configs$1.push({
|
|
436
432
|
files: [GLOB_CSS, GLOB_POSTCSS],
|
|
@@ -581,7 +577,7 @@ async function javascript(options = {}) {
|
|
|
581
577
|
return [
|
|
582
578
|
{
|
|
583
579
|
languageOptions: {
|
|
584
|
-
ecmaVersion:
|
|
580
|
+
ecmaVersion: "latest",
|
|
585
581
|
globals: {
|
|
586
582
|
...globals.browser,
|
|
587
583
|
...globals.es2021,
|
|
@@ -592,7 +588,7 @@ async function javascript(options = {}) {
|
|
|
592
588
|
},
|
|
593
589
|
parserOptions: {
|
|
594
590
|
ecmaFeatures: { jsx: true },
|
|
595
|
-
ecmaVersion:
|
|
591
|
+
ecmaVersion: "latest",
|
|
596
592
|
sourceType: "module"
|
|
597
593
|
},
|
|
598
594
|
sourceType: "module"
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vinicunca/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.25.0",
|
|
5
5
|
"description": "Vinicunca ESLint config",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "praburangki",
|
|
@@ -48,9 +48,6 @@
|
|
|
48
48
|
"files": [
|
|
49
49
|
"dist"
|
|
50
50
|
],
|
|
51
|
-
"engines": {
|
|
52
|
-
"node": ">=22.0.0"
|
|
53
|
-
},
|
|
54
51
|
"peerDependencies": {
|
|
55
52
|
"@eslint-react/eslint-plugin": "^1.38.4",
|
|
56
53
|
"@prettier/plugin-xml": "^3.4.1",
|
|
@@ -113,11 +110,11 @@
|
|
|
113
110
|
"@clack/prompts": "^0.11.0",
|
|
114
111
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
|
|
115
112
|
"@eslint/markdown": "^7.2.0",
|
|
116
|
-
"@stylistic/eslint-plugin": "^5.
|
|
117
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
118
|
-
"@typescript-eslint/parser": "^8.
|
|
119
|
-
"@unocss/eslint-plugin": "^66.5.
|
|
120
|
-
"@vitest/eslint-plugin": "^1.3.
|
|
113
|
+
"@stylistic/eslint-plugin": "^5.3.1",
|
|
114
|
+
"@typescript-eslint/eslint-plugin": "^8.43.0",
|
|
115
|
+
"@typescript-eslint/parser": "^8.43.0",
|
|
116
|
+
"@unocss/eslint-plugin": "^66.5.1",
|
|
117
|
+
"@vitest/eslint-plugin": "^1.3.9",
|
|
121
118
|
"eslint-config-flat-gitignore": "^2.1.0",
|
|
122
119
|
"eslint-flat-config-utils": "^2.1.1",
|
|
123
120
|
"eslint-merge-processors": "^2.0.0",
|
|
@@ -125,7 +122,7 @@
|
|
|
125
122
|
"eslint-plugin-command": "^3.3.1",
|
|
126
123
|
"eslint-plugin-format": "^1.0.1",
|
|
127
124
|
"eslint-plugin-import-lite": "^0.3.0",
|
|
128
|
-
"eslint-plugin-jsdoc": "^
|
|
125
|
+
"eslint-plugin-jsdoc": "^55.0.2",
|
|
129
126
|
"eslint-plugin-jsonc": "^2.20.1",
|
|
130
127
|
"eslint-plugin-n": "^17.21.3",
|
|
131
128
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
@@ -134,7 +131,7 @@
|
|
|
134
131
|
"eslint-plugin-regexp": "^2.10.0",
|
|
135
132
|
"eslint-plugin-sonarjs": "^3.0.5",
|
|
136
133
|
"eslint-plugin-toml": "^0.12.0",
|
|
137
|
-
"eslint-plugin-unicorn": "^
|
|
134
|
+
"eslint-plugin-unicorn": "^61.0.2",
|
|
138
135
|
"eslint-plugin-unused-imports": "^4.2.0",
|
|
139
136
|
"eslint-plugin-vue": "^10.4.0",
|
|
140
137
|
"eslint-plugin-yml": "^1.18.0",
|