@vinicunca/eslint-config 2.7.1 → 2.7.2
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.cjs +10 -8
- package/dist/index.d.cts +475 -323
- package/dist/index.d.ts +475 -323
- package/dist/index.js +9 -8
- package/package.json +16 -16
package/dist/index.js
CHANGED
|
@@ -13,8 +13,6 @@ function e(o) {
|
|
|
13
13
|
// src/base.ts
|
|
14
14
|
import { FlatConfigComposer } from "eslint-flat-config-utils";
|
|
15
15
|
import { isPackageExists } from "local-pkg";
|
|
16
|
-
import fs from "node:fs";
|
|
17
|
-
import process2 from "node:process";
|
|
18
16
|
|
|
19
17
|
// src/flags.ts
|
|
20
18
|
var ERROR = "error";
|
|
@@ -124,6 +122,7 @@ var GLOB_EXCLUDE = [
|
|
|
124
122
|
];
|
|
125
123
|
|
|
126
124
|
// src/utils.ts
|
|
125
|
+
import process from "node:process";
|
|
127
126
|
async function combineConfigs(...configs2) {
|
|
128
127
|
const resolved = await Promise.all(configs2);
|
|
129
128
|
return resolved.flat();
|
|
@@ -183,6 +182,9 @@ var parserPlain = {
|
|
|
183
182
|
}
|
|
184
183
|
})
|
|
185
184
|
};
|
|
185
|
+
function isInEditorEnv() {
|
|
186
|
+
return !!((process.env.VSCODE_PID || process.env.VSCODE_CWD || process.env.JETBRAINS_IDE || process.env.VIM || process.env.NVIM) && !process.env.CI);
|
|
187
|
+
}
|
|
186
188
|
|
|
187
189
|
// src/configs/stylistic.ts
|
|
188
190
|
var STR_PARENS_NEW_LINE = "parens-new-line";
|
|
@@ -1422,7 +1424,7 @@ async function test(options = {}) {
|
|
|
1422
1424
|
}
|
|
1423
1425
|
|
|
1424
1426
|
// src/configs/typescript.ts
|
|
1425
|
-
import
|
|
1427
|
+
import process2 from "node:process";
|
|
1426
1428
|
async function typescript(options = {}) {
|
|
1427
1429
|
const {
|
|
1428
1430
|
componentExts = [],
|
|
@@ -1484,7 +1486,7 @@ async function typescript(options = {}) {
|
|
|
1484
1486
|
allowDefaultProject: ["./*.js"],
|
|
1485
1487
|
defaultProject: tsconfigPath
|
|
1486
1488
|
},
|
|
1487
|
-
tsconfigRootDir:
|
|
1489
|
+
tsconfigRootDir: process2.cwd()
|
|
1488
1490
|
} : {},
|
|
1489
1491
|
...parserOptions
|
|
1490
1492
|
}
|
|
@@ -1904,7 +1906,7 @@ function vinicuncaESLint(options = {}, ...userConfigs) {
|
|
|
1904
1906
|
autoRenamePlugins = true,
|
|
1905
1907
|
componentExts = [],
|
|
1906
1908
|
gitignore: enableGitignore = true,
|
|
1907
|
-
isInEditor =
|
|
1909
|
+
isInEditor = isInEditorEnv(),
|
|
1908
1910
|
jsx: enableJsx = true,
|
|
1909
1911
|
react: enableReact = false,
|
|
1910
1912
|
regexp: enableRegexp = true,
|
|
@@ -1929,9 +1931,7 @@ function vinicuncaESLint(options = {}, ...userConfigs) {
|
|
|
1929
1931
|
if (typeof enableGitignore !== "boolean") {
|
|
1930
1932
|
configs2.push(interopDefault(import("eslint-config-flat-gitignore")).then((r2) => [r2(enableGitignore)]));
|
|
1931
1933
|
} else {
|
|
1932
|
-
|
|
1933
|
-
configs2.push(interopDefault(import("eslint-config-flat-gitignore")).then((r2) => [r2()]));
|
|
1934
|
-
}
|
|
1934
|
+
configs2.push(interopDefault(import("eslint-config-flat-gitignore")).then((r2) => [r2()]));
|
|
1935
1935
|
}
|
|
1936
1936
|
}
|
|
1937
1937
|
const typescriptOptions = resolveSubOptions(options, "typescript");
|
|
@@ -2094,6 +2094,7 @@ export {
|
|
|
2094
2094
|
ignores,
|
|
2095
2095
|
imports,
|
|
2096
2096
|
interopDefault,
|
|
2097
|
+
isInEditorEnv,
|
|
2097
2098
|
javascript,
|
|
2098
2099
|
jsdoc,
|
|
2099
2100
|
jsonc,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vinicunca/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.7.
|
|
4
|
+
"version": "2.7.2",
|
|
5
5
|
"description": "Vinicunca ESLint config",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "praburangki",
|
|
@@ -58,29 +58,29 @@
|
|
|
58
58
|
"eslint": ">=8.57.0"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@eslint-react/eslint-plugin": "^1.
|
|
61
|
+
"@eslint-react/eslint-plugin": "^1.6.0",
|
|
62
62
|
"@stylistic/eslint-plugin": "^2.6.0-beta.0",
|
|
63
63
|
"@typescript-eslint/eslint-plugin": "8.0.0-alpha.40",
|
|
64
64
|
"@typescript-eslint/parser": "8.0.0-alpha.40",
|
|
65
|
-
"@unocss/eslint-plugin": "^0.61.
|
|
66
|
-
"eslint-config-flat-gitignore": "^0.1.
|
|
67
|
-
"eslint-flat-config-utils": "^0.
|
|
65
|
+
"@unocss/eslint-plugin": "^0.61.6",
|
|
66
|
+
"eslint-config-flat-gitignore": "^0.1.8",
|
|
67
|
+
"eslint-flat-config-utils": "^0.3.0",
|
|
68
68
|
"eslint-merge-processors": "^0.1.0",
|
|
69
69
|
"eslint-plugin-antfu": "^2.3.4",
|
|
70
70
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
71
71
|
"eslint-plugin-format": "^0.1.2",
|
|
72
|
-
"eslint-plugin-import-x": "^3.0
|
|
73
|
-
"eslint-plugin-jsdoc": "^48.
|
|
72
|
+
"eslint-plugin-import-x": "^3.1.0",
|
|
73
|
+
"eslint-plugin-jsdoc": "^48.8.3",
|
|
74
74
|
"eslint-plugin-jsonc": "^2.16.0",
|
|
75
75
|
"eslint-plugin-markdown": "^5.1.0",
|
|
76
|
-
"eslint-plugin-n": "^17.
|
|
76
|
+
"eslint-plugin-n": "^17.10.1",
|
|
77
77
|
"eslint-plugin-no-only-tests": "^3.1.0",
|
|
78
|
-
"eslint-plugin-perfectionist": "^
|
|
78
|
+
"eslint-plugin-perfectionist": "^3.0.0",
|
|
79
79
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
80
80
|
"eslint-plugin-regexp": "^2.6.0",
|
|
81
|
-
"eslint-plugin-sonarjs": "^1.0.
|
|
82
|
-
"eslint-plugin-unicorn": "^
|
|
83
|
-
"eslint-plugin-unused-imports": "^4.0.
|
|
81
|
+
"eslint-plugin-sonarjs": "^1.0.4",
|
|
82
|
+
"eslint-plugin-unicorn": "^55.0.0",
|
|
83
|
+
"eslint-plugin-unused-imports": "^4.0.1",
|
|
84
84
|
"eslint-plugin-vitest": "^0.5.4",
|
|
85
85
|
"eslint-plugin-vue": "^9.27.0",
|
|
86
86
|
"eslint-plugin-yml": "^1.14.0",
|
|
@@ -92,15 +92,15 @@
|
|
|
92
92
|
"yaml-eslint-parser": "^1.2.3"
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
|
-
"@types/eslint": "^
|
|
95
|
+
"@types/eslint": "^9.6.0",
|
|
96
96
|
"@types/fs-extra": "^11.0.4",
|
|
97
|
-
"eslint-typegen": "^0.
|
|
97
|
+
"eslint-typegen": "^0.3.0",
|
|
98
98
|
"execa": "^9.3.0",
|
|
99
99
|
"fast-glob": "^3.3.2",
|
|
100
100
|
"fs-extra": "^11.2.0",
|
|
101
101
|
"react": "^18.3.1",
|
|
102
|
-
"tsup": "^8.
|
|
103
|
-
"vue": "^3.4.
|
|
102
|
+
"tsup": "^8.2.3",
|
|
103
|
+
"vue": "^3.4.34"
|
|
104
104
|
},
|
|
105
105
|
"scripts": {
|
|
106
106
|
"lint": "eslint -v",
|