@vinicunca/eslint-config 3.22.0 → 3.24.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 -183
- package/dist/index.js +5 -9
- package/package.json +8 -8
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.24.0",
|
|
5
5
|
"description": "Vinicunca ESLint config",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "praburangki",
|
|
@@ -113,11 +113,11 @@
|
|
|
113
113
|
"@clack/prompts": "^0.11.0",
|
|
114
114
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
|
|
115
115
|
"@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.
|
|
120
|
-
"@vitest/eslint-plugin": "^1.3.
|
|
116
|
+
"@stylistic/eslint-plugin": "^5.3.1",
|
|
117
|
+
"@typescript-eslint/eslint-plugin": "^8.43.0",
|
|
118
|
+
"@typescript-eslint/parser": "^8.43.0",
|
|
119
|
+
"@unocss/eslint-plugin": "^66.5.1",
|
|
120
|
+
"@vitest/eslint-plugin": "^1.3.9",
|
|
121
121
|
"eslint-config-flat-gitignore": "^2.1.0",
|
|
122
122
|
"eslint-flat-config-utils": "^2.1.1",
|
|
123
123
|
"eslint-merge-processors": "^2.0.0",
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
"eslint-plugin-command": "^3.3.1",
|
|
126
126
|
"eslint-plugin-format": "^1.0.1",
|
|
127
127
|
"eslint-plugin-import-lite": "^0.3.0",
|
|
128
|
-
"eslint-plugin-jsdoc": "^
|
|
128
|
+
"eslint-plugin-jsdoc": "^55.0.2",
|
|
129
129
|
"eslint-plugin-jsonc": "^2.20.1",
|
|
130
130
|
"eslint-plugin-n": "^17.21.3",
|
|
131
131
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
"eslint-plugin-regexp": "^2.10.0",
|
|
135
135
|
"eslint-plugin-sonarjs": "^3.0.5",
|
|
136
136
|
"eslint-plugin-toml": "^0.12.0",
|
|
137
|
-
"eslint-plugin-unicorn": "^
|
|
137
|
+
"eslint-plugin-unicorn": "^61.0.2",
|
|
138
138
|
"eslint-plugin-unused-imports": "^4.2.0",
|
|
139
139
|
"eslint-plugin-vue": "^10.4.0",
|
|
140
140
|
"eslint-plugin-yml": "^1.18.0",
|