@cany748/eslint-config 6.0.0 → 7.0.1
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.mts +3431 -1246
- package/dist/index.mjs +170 -82
- package/package.json +28 -26
package/dist/index.mjs
CHANGED
|
@@ -10,18 +10,6 @@ import { configs } from "eslint-plugin-regexp";
|
|
|
10
10
|
import pluginUnicorn from "eslint-plugin-unicorn";
|
|
11
11
|
import { isPackageExists } from "local-pkg";
|
|
12
12
|
import { FlatConfigComposer } from "eslint-flat-config-utils";
|
|
13
|
-
//#region src/configs/comments.ts
|
|
14
|
-
function comments() {
|
|
15
|
-
return [{
|
|
16
|
-
name: "@eslint-community/eslint-comments",
|
|
17
|
-
plugins: { "@eslint-community/eslint-comments": pluginComments },
|
|
18
|
-
rules: {
|
|
19
|
-
...pluginComments.configs.recommended.rules,
|
|
20
|
-
"@eslint-community/eslint-comments/disable-enable-pair": "off"
|
|
21
|
-
}
|
|
22
|
-
}];
|
|
23
|
-
}
|
|
24
|
-
//#endregion
|
|
25
13
|
//#region src/globs.ts
|
|
26
14
|
const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
27
15
|
const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
|
|
@@ -39,14 +27,10 @@ const GLOB_JSON5 = "**/*.json5";
|
|
|
39
27
|
const GLOB_JSONC = "**/*.jsonc";
|
|
40
28
|
const GLOB_MARKDOWN = "**/*.md";
|
|
41
29
|
const GLOB_MARKDOWN_IN_MARKDOWN = "**/*.md/*.md";
|
|
42
|
-
const GLOB_SVELTE = "**/*.svelte";
|
|
43
30
|
const GLOB_VUE = "**/*.vue";
|
|
44
31
|
const GLOB_YAML = "**/*.y?(a)ml";
|
|
45
|
-
const GLOB_TOML = "**/*.toml";
|
|
46
32
|
const GLOB_XML = "**/*.xml";
|
|
47
33
|
const GLOB_HTML = "**/*.htm?(l)";
|
|
48
|
-
const GLOB_ASTRO = "**/*.astro";
|
|
49
|
-
const GLOB_ASTRO_TS = "**/*.astro/*.ts";
|
|
50
34
|
const GLOB_GRAPHQL = "**/*.{g,graph}ql";
|
|
51
35
|
const GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`;
|
|
52
36
|
const GLOB_TESTS = [
|
|
@@ -62,7 +46,6 @@ const GLOB_ALL_SRC = [
|
|
|
62
46
|
GLOB_JSON,
|
|
63
47
|
GLOB_JSON5,
|
|
64
48
|
GLOB_MARKDOWN,
|
|
65
|
-
GLOB_SVELTE,
|
|
66
49
|
GLOB_VUE,
|
|
67
50
|
GLOB_YAML,
|
|
68
51
|
GLOB_XML,
|
|
@@ -111,6 +94,132 @@ const GLOB_EXCLUDE = [
|
|
|
111
94
|
"**/.*/skills"
|
|
112
95
|
];
|
|
113
96
|
//#endregion
|
|
97
|
+
//#region src/utils.ts
|
|
98
|
+
const parserPlain = {
|
|
99
|
+
meta: { name: "parser-plain" },
|
|
100
|
+
parseForESLint: (code) => ({
|
|
101
|
+
ast: {
|
|
102
|
+
body: [],
|
|
103
|
+
comments: [],
|
|
104
|
+
loc: {
|
|
105
|
+
end: code.length,
|
|
106
|
+
start: 0
|
|
107
|
+
},
|
|
108
|
+
range: [0, code.length],
|
|
109
|
+
tokens: [],
|
|
110
|
+
type: "Program"
|
|
111
|
+
},
|
|
112
|
+
scopeManager: null,
|
|
113
|
+
services: { isPlain: true },
|
|
114
|
+
visitorKeys: { Program: [] }
|
|
115
|
+
})
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
Combine array and non-array configs into a single array.
|
|
119
|
+
*/
|
|
120
|
+
async function combine(...configs) {
|
|
121
|
+
return (await Promise.all(configs)).flat();
|
|
122
|
+
}
|
|
123
|
+
function toArray(value) {
|
|
124
|
+
return Array.isArray(value) ? value : [value];
|
|
125
|
+
}
|
|
126
|
+
async function interopDefault(m) {
|
|
127
|
+
const resolved = await m;
|
|
128
|
+
return resolved.default || resolved;
|
|
129
|
+
}
|
|
130
|
+
function isInGitHooksOrLintStaged() {
|
|
131
|
+
return !!(process.env.GIT_PARAMS || process.env.VSCODE_GIT_COMMAND || process.env.npm_lifecycle_script?.startsWith("lint-staged"));
|
|
132
|
+
}
|
|
133
|
+
function isInEditorEnv() {
|
|
134
|
+
if (process.env.CI || isInGitHooksOrLintStaged()) return false;
|
|
135
|
+
return !!(process.env.VSCODE_PID || process.env.VSCODE_CWD || process.env.JETBRAINS_IDE || process.env.VIM || process.env.NVIM || process.env.ZED_ENVIRONMENT && !process.env.ZED_TERM);
|
|
136
|
+
}
|
|
137
|
+
//#endregion
|
|
138
|
+
//#region src/configs/antislop.ts
|
|
139
|
+
async function antislop(options = {}) {
|
|
140
|
+
const { overrides = {}, slop = true, sonarjs = true } = options;
|
|
141
|
+
const [pluginSlop, pluginSonarjs] = await Promise.all([slop ? interopDefault(import("eslint-plugin-slop")) : void 0, sonarjs ? interopDefault(import("eslint-plugin-sonarjs")) : void 0]);
|
|
142
|
+
return [
|
|
143
|
+
{
|
|
144
|
+
name: "antislop/setup",
|
|
145
|
+
plugins: {
|
|
146
|
+
...slop && { slop: pluginSlop },
|
|
147
|
+
...sonarjs && { sonarjs: pluginSonarjs }
|
|
148
|
+
},
|
|
149
|
+
...typeof slop === "object" && { settings: { slop } }
|
|
150
|
+
},
|
|
151
|
+
...slop ? [{
|
|
152
|
+
files: [
|
|
153
|
+
GLOB_SRC,
|
|
154
|
+
GLOB_STYLE,
|
|
155
|
+
GLOB_JSON,
|
|
156
|
+
GLOB_JSON5,
|
|
157
|
+
GLOB_JSONC,
|
|
158
|
+
GLOB_MARKDOWN,
|
|
159
|
+
GLOB_VUE,
|
|
160
|
+
GLOB_HTML,
|
|
161
|
+
GLOB_GRAPHQL
|
|
162
|
+
],
|
|
163
|
+
/**
|
|
164
|
+
Markdown code fences are already scanned as part of the raw
|
|
165
|
+
Markdown text, so exclude the virtual embedded-code files to
|
|
166
|
+
avoid reporting the same em dash twice
|
|
167
|
+
*/
|
|
168
|
+
ignores: [GLOB_MARKDOWN_CODE],
|
|
169
|
+
name: "antislop/rules/universal",
|
|
170
|
+
rules: { "slop/no-em-dash": "error" }
|
|
171
|
+
}] : [],
|
|
172
|
+
{
|
|
173
|
+
files: [GLOB_SRC],
|
|
174
|
+
name: "antislop/rules/javascript",
|
|
175
|
+
rules: {
|
|
176
|
+
...slop && {
|
|
177
|
+
"slop/max-comment-length": "error",
|
|
178
|
+
"slop/no-chained-type-assertions": "error",
|
|
179
|
+
"slop/no-jargon": "error",
|
|
180
|
+
"slop/no-trivial-functions": "error",
|
|
181
|
+
"slop/no-trivial-type-aliases": "error",
|
|
182
|
+
"slop/prefer-jsdoc": "error"
|
|
183
|
+
},
|
|
184
|
+
...sonarjs && {
|
|
185
|
+
"sonarjs/cognitive-complexity": ["error", 15],
|
|
186
|
+
"sonarjs/no-all-duplicated-branches": "error",
|
|
187
|
+
"sonarjs/no-collapsible-if": "error",
|
|
188
|
+
"sonarjs/no-commented-code": "error",
|
|
189
|
+
"sonarjs/no-dead-store": "error",
|
|
190
|
+
"sonarjs/no-duplicated-branches": "error",
|
|
191
|
+
"sonarjs/no-element-overwrite": "error",
|
|
192
|
+
"sonarjs/no-empty-collection": "error",
|
|
193
|
+
"sonarjs/no-gratuitous-expressions": "error",
|
|
194
|
+
"sonarjs/no-identical-conditions": "error",
|
|
195
|
+
"sonarjs/no-identical-expressions": "error",
|
|
196
|
+
"sonarjs/no-identical-functions": "error",
|
|
197
|
+
"sonarjs/no-invariant-returns": "error",
|
|
198
|
+
"sonarjs/no-inverted-boolean-check": "error",
|
|
199
|
+
"sonarjs/no-redundant-boolean": "error",
|
|
200
|
+
"sonarjs/no-redundant-jump": "error",
|
|
201
|
+
"sonarjs/no-unused-collection": "error",
|
|
202
|
+
"sonarjs/no-use-of-empty-return-value": "error",
|
|
203
|
+
"sonarjs/prefer-single-boolean-return": "error"
|
|
204
|
+
},
|
|
205
|
+
...overrides
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
];
|
|
209
|
+
}
|
|
210
|
+
//#endregion
|
|
211
|
+
//#region src/configs/comments.ts
|
|
212
|
+
function comments() {
|
|
213
|
+
return [{
|
|
214
|
+
name: "@eslint-community/eslint-comments",
|
|
215
|
+
plugins: { "@eslint-community/eslint-comments": pluginComments },
|
|
216
|
+
rules: {
|
|
217
|
+
...pluginComments.configs.recommended.rules,
|
|
218
|
+
"@eslint-community/eslint-comments/disable-enable-pair": "off"
|
|
219
|
+
}
|
|
220
|
+
}];
|
|
221
|
+
}
|
|
222
|
+
//#endregion
|
|
114
223
|
//#region src/configs/disables.ts
|
|
115
224
|
function disables() {
|
|
116
225
|
return [
|
|
@@ -175,48 +284,6 @@ function e18e(options = {}) {
|
|
|
175
284
|
}];
|
|
176
285
|
}
|
|
177
286
|
//#endregion
|
|
178
|
-
//#region src/utils.ts
|
|
179
|
-
const parserPlain = {
|
|
180
|
-
meta: { name: "parser-plain" },
|
|
181
|
-
parseForESLint: (code) => ({
|
|
182
|
-
ast: {
|
|
183
|
-
body: [],
|
|
184
|
-
comments: [],
|
|
185
|
-
loc: {
|
|
186
|
-
end: code.length,
|
|
187
|
-
start: 0
|
|
188
|
-
},
|
|
189
|
-
range: [0, code.length],
|
|
190
|
-
tokens: [],
|
|
191
|
-
type: "Program"
|
|
192
|
-
},
|
|
193
|
-
scopeManager: null,
|
|
194
|
-
services: { isPlain: true },
|
|
195
|
-
visitorKeys: { Program: [] }
|
|
196
|
-
})
|
|
197
|
-
};
|
|
198
|
-
/**
|
|
199
|
-
* Combine array and non-array configs into a single array.
|
|
200
|
-
*/
|
|
201
|
-
async function combine(...configs) {
|
|
202
|
-
return (await Promise.all(configs)).flat();
|
|
203
|
-
}
|
|
204
|
-
function toArray(value) {
|
|
205
|
-
return Array.isArray(value) ? value : [value];
|
|
206
|
-
}
|
|
207
|
-
async function interopDefault(m) {
|
|
208
|
-
const resolved = await m;
|
|
209
|
-
return resolved.default || resolved;
|
|
210
|
-
}
|
|
211
|
-
function isInGitHooksOrLintStaged() {
|
|
212
|
-
return !!(process.env.GIT_PARAMS || process.env.VSCODE_GIT_COMMAND || process.env.npm_lifecycle_script?.startsWith("lint-staged"));
|
|
213
|
-
}
|
|
214
|
-
function isInEditorEnv() {
|
|
215
|
-
if (process.env.CI) return false;
|
|
216
|
-
if (isInGitHooksOrLintStaged()) return false;
|
|
217
|
-
return !!(process.env.VSCODE_PID || process.env.VSCODE_CWD || process.env.JETBRAINS_IDE || process.env.VIM || process.env.NVIM);
|
|
218
|
-
}
|
|
219
|
-
//#endregion
|
|
220
287
|
//#region src/configs/formatters.ts
|
|
221
288
|
function formatters(options = true) {
|
|
222
289
|
if (options === true) options = {
|
|
@@ -630,9 +697,9 @@ function regexp(options = {}) {
|
|
|
630
697
|
//#endregion
|
|
631
698
|
//#region src/configs/sort.ts
|
|
632
699
|
/**
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
700
|
+
Sort package.json
|
|
701
|
+
|
|
702
|
+
Requires `jsonc` config
|
|
636
703
|
*/
|
|
637
704
|
function sortPackageJson() {
|
|
638
705
|
return [{
|
|
@@ -680,6 +747,7 @@ function sortPackageJson() {
|
|
|
680
747
|
"activationEvents",
|
|
681
748
|
"contributes",
|
|
682
749
|
"scripts",
|
|
750
|
+
"scripts-info",
|
|
683
751
|
"peerDependencies",
|
|
684
752
|
"peerDependenciesMeta",
|
|
685
753
|
"dependencies",
|
|
@@ -742,9 +810,9 @@ function sortPackageJson() {
|
|
|
742
810
|
}];
|
|
743
811
|
}
|
|
744
812
|
/**
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
813
|
+
Sort tsconfig.json
|
|
814
|
+
|
|
815
|
+
Requires `jsonc` config
|
|
748
816
|
*/
|
|
749
817
|
function sortTsconfig() {
|
|
750
818
|
return [{
|
|
@@ -868,7 +936,7 @@ let _pluginTest;
|
|
|
868
936
|
async function test(options = {}) {
|
|
869
937
|
const { files = GLOB_TESTS, isInEditor = false, overrides = {} } = options;
|
|
870
938
|
const [pluginVitest, pluginNoOnlyTests] = await Promise.all([interopDefault(import("@vitest/eslint-plugin")), interopDefault(import("eslint-plugin-no-only-tests"))]);
|
|
871
|
-
_pluginTest
|
|
939
|
+
_pluginTest ||= {
|
|
872
940
|
...pluginVitest,
|
|
873
941
|
rules: {
|
|
874
942
|
...pluginVitest.rules,
|
|
@@ -906,7 +974,7 @@ async function typescript(options = {}) {
|
|
|
906
974
|
...componentExts.map((ext) => `**/*.${ext}`)
|
|
907
975
|
];
|
|
908
976
|
const filesTypeAware = options.filesTypeAware ?? ["**/*.?([cm])ts", "**/*.?([cm])tsx"];
|
|
909
|
-
const ignoresTypeAware = options.ignoresTypeAware ?? [`**/*.md
|
|
977
|
+
const ignoresTypeAware = options.ignoresTypeAware ?? [`**/*.md/**`];
|
|
910
978
|
const tsconfigPath = options?.tsconfigPath;
|
|
911
979
|
const isTypeAware = !!tsconfigPath;
|
|
912
980
|
const [pluginTs, parserTs] = await Promise.all([interopDefault(import("@typescript-eslint/eslint-plugin")), interopDefault(import("@typescript-eslint/parser"))]);
|
|
@@ -1010,18 +1078,32 @@ function unicorn() {
|
|
|
1010
1078
|
return [{
|
|
1011
1079
|
name: "unicorn",
|
|
1012
1080
|
plugins: { unicorn: pluginUnicorn },
|
|
1081
|
+
files: [GLOB_SRC, GLOB_VUE],
|
|
1013
1082
|
rules: {
|
|
1014
1083
|
...pluginUnicorn.configs.recommended.rules,
|
|
1084
|
+
"unicorn/consistent-boolean-name": "off",
|
|
1085
|
+
"unicorn/consistent-conditional-object-spread": "off",
|
|
1015
1086
|
"unicorn/consistent-function-scoping": "off",
|
|
1016
1087
|
"unicorn/filename-case": "off",
|
|
1017
1088
|
"unicorn/import-style": "off",
|
|
1089
|
+
"unicorn/max-nested-calls": "off",
|
|
1090
|
+
"unicorn/name-replacements": "off",
|
|
1018
1091
|
"unicorn/no-array-callback-reference": "off",
|
|
1092
|
+
"unicorn/no-computed-property-existence-check": "off",
|
|
1019
1093
|
"unicorn/no-null": "off",
|
|
1094
|
+
"unicorn/no-this-outside-of-class": "off",
|
|
1095
|
+
"unicorn/no-top-level-assignment-in-function": "off",
|
|
1096
|
+
"unicorn/no-top-level-side-effects": "off",
|
|
1097
|
+
"unicorn/prefer-await": "off",
|
|
1098
|
+
"unicorn/prefer-dom-node-html-methods": "off",
|
|
1099
|
+
"unicorn/prefer-global-this": "off",
|
|
1100
|
+
"unicorn/prefer-https": "off",
|
|
1020
1101
|
"unicorn/prefer-string-replace-all": "off",
|
|
1021
1102
|
"unicorn/prefer-structured-clone": "off",
|
|
1103
|
+
"unicorn/prefer-ternary": "off",
|
|
1022
1104
|
"unicorn/prefer-top-level-await": "off",
|
|
1023
1105
|
"unicorn/prevent-abbreviations": "off",
|
|
1024
|
-
"unicorn/
|
|
1106
|
+
"unicorn/single-line-block-comment-style": "off"
|
|
1025
1107
|
}
|
|
1026
1108
|
}];
|
|
1027
1109
|
}
|
|
@@ -1146,25 +1228,27 @@ const VuePackages = [
|
|
|
1146
1228
|
"@slidev/cli"
|
|
1147
1229
|
];
|
|
1148
1230
|
/**
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1231
|
+
Construct an array of ESLint flat config items.
|
|
1232
|
+
|
|
1233
|
+
@param {OptionsConfig & TypedFlatConfigItem} options
|
|
1234
|
+
The options for generating the ESLint configurations.
|
|
1235
|
+
@param {Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[]>[]} userConfigs
|
|
1236
|
+
The user configurations to be merged with the generated configurations.
|
|
1237
|
+
@returns {Promise<TypedFlatConfigItem[]>}
|
|
1238
|
+
The merged ESLint configurations.
|
|
1157
1239
|
*/
|
|
1158
1240
|
const factoryConfig = function(options = {}, ...userConfigs) {
|
|
1159
|
-
const { componentExts = [], formatters: enableFormatters = true, gitignore: enableGitignore = true, ignores: userIgnores = [], imports: enableImports = true, jsonc: enableJSONC = true, node: enableNode = true, e18e: enableE18e = true, regexp: enableRegexp = true, test: enableTest = true, typescript: enableTypeScript = isPackageExists("typescript"), unocss: enableUnoCSS = isPackageExists("unocss"), vue: enableVue = VuePackages.some((i) => isPackageExists(i)) } = options;
|
|
1241
|
+
const { antislop: enableAntislop = false, componentExts = [], formatters: enableFormatters = true, gitignore: enableGitignore = true, ignores: userIgnores = [], imports: enableImports = true, jsonc: enableJSONC = true, node: enableNode = true, e18e: enableE18e = true, regexp: enableRegexp = true, test: enableTest = true, typescript: enableTypeScript = isPackageExists("typescript"), unocss: enableUnoCSS = isPackageExists("unocss"), vue: enableVue = VuePackages.some((i) => isPackageExists(i)) } = options;
|
|
1160
1242
|
let isInEditor = options.isInEditor;
|
|
1161
1243
|
if (isInEditor == null) {
|
|
1162
1244
|
isInEditor = isInEditorEnv();
|
|
1163
1245
|
if (isInEditor) console.log("[@cany748/eslint-config] Detected running in editor, some rules are disabled.");
|
|
1164
1246
|
}
|
|
1165
1247
|
const configs = [];
|
|
1166
|
-
if (enableGitignore)
|
|
1167
|
-
|
|
1248
|
+
if (enableGitignore) {
|
|
1249
|
+
if (typeof enableGitignore === "boolean") configs.push(interopDefault(import("eslint-config-flat-gitignore")).then((r) => [r({ strict: false })]));
|
|
1250
|
+
else configs.push(interopDefault(import("eslint-config-flat-gitignore")).then((r) => [r(enableGitignore)]));
|
|
1251
|
+
}
|
|
1168
1252
|
configs.push(comments(), ignores(userIgnores), javascript({
|
|
1169
1253
|
isInEditor,
|
|
1170
1254
|
overrides: options.javascript?.overrides
|
|
@@ -1177,17 +1261,21 @@ const factoryConfig = function(options = {}, ...userConfigs) {
|
|
|
1177
1261
|
...enableE18e === true ? {} : enableE18e
|
|
1178
1262
|
}));
|
|
1179
1263
|
if (enableTypeScript) configs.push(typescript({
|
|
1180
|
-
...typeof enableTypeScript === "boolean" ? {} : enableTypeScript
|
|
1264
|
+
...typeof enableTypeScript === "boolean" ? {} : enableTypeScript,
|
|
1181
1265
|
componentExts,
|
|
1182
1266
|
type: options.type
|
|
1183
1267
|
}));
|
|
1268
|
+
if (enableAntislop) configs.push(antislop({
|
|
1269
|
+
...typeof enableAntislop === "boolean" ? {} : enableAntislop,
|
|
1270
|
+
typescript: !!enableTypeScript
|
|
1271
|
+
}));
|
|
1184
1272
|
if (enableRegexp) configs.push(regexp(typeof enableRegexp === "boolean" ? {} : enableRegexp));
|
|
1185
1273
|
if (enableTest) configs.push(test({
|
|
1186
1274
|
isInEditor,
|
|
1187
1275
|
overrides: typeof enableTest === "boolean" ? {} : enableTest?.overrides
|
|
1188
1276
|
}));
|
|
1189
1277
|
if (enableVue) configs.push(vue({
|
|
1190
|
-
...typeof enableVue === "boolean" ? {} : enableVue
|
|
1278
|
+
...typeof enableVue === "boolean" ? {} : enableVue,
|
|
1191
1279
|
typescript: !!enableTypeScript
|
|
1192
1280
|
}));
|
|
1193
1281
|
if (enableUnoCSS) configs.push(unocss());
|
|
@@ -1205,4 +1293,4 @@ const factoryConfig = function(options = {}, ...userConfigs) {
|
|
|
1205
1293
|
return composer;
|
|
1206
1294
|
};
|
|
1207
1295
|
//#endregion
|
|
1208
|
-
export { GLOB_ALL_SRC,
|
|
1296
|
+
export { GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, antislop, combine, comments, disables, e18e, factoryConfig, formatters, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, javascript, jsonc, node, parserPlain, regexp, sortPackageJson, sortTsconfig, test, toArray, typescript, unicorn, unocss, vue };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cany748/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "7.0.1",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dist/index.mjs"
|
|
7
7
|
},
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
"dist"
|
|
13
13
|
],
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@unocss/eslint-plugin": "^66.
|
|
16
|
-
"eslint-plugin-vue": "^10.
|
|
17
|
-
"typescript-eslint": "^8.
|
|
15
|
+
"@unocss/eslint-plugin": "^66.10.5",
|
|
16
|
+
"eslint-plugin-vue": "^10.11.1",
|
|
17
|
+
"typescript-eslint": "^8.71.1"
|
|
18
18
|
},
|
|
19
19
|
"peerDependenciesMeta": {
|
|
20
20
|
"@unocss/eslint-plugin": {
|
|
@@ -28,37 +28,39 @@
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@e18e/eslint-plugin": "^0.
|
|
32
|
-
"@eslint-community/eslint-plugin-eslint-comments": "^4.
|
|
33
|
-
"@vitest/eslint-plugin": "^1.6.
|
|
34
|
-
"eslint": "^10.
|
|
35
|
-
"eslint-config-flat-gitignore": "^2.
|
|
31
|
+
"@e18e/eslint-plugin": "^0.8.1",
|
|
32
|
+
"@eslint-community/eslint-plugin-eslint-comments": "^4.8.1",
|
|
33
|
+
"@vitest/eslint-plugin": "^1.6.27",
|
|
34
|
+
"eslint": "^10.12.0",
|
|
35
|
+
"eslint-config-flat-gitignore": "^2.4.0",
|
|
36
36
|
"eslint-config-prettier": "^10.1.8",
|
|
37
37
|
"eslint-flat-config-utils": "^3.2.0",
|
|
38
|
-
"eslint-plugin-import-x": "^4.
|
|
39
|
-
"eslint-plugin-jsonc": "^3.
|
|
40
|
-
"eslint-plugin-n": "^18.
|
|
38
|
+
"eslint-plugin-import-x": "^4.17.1",
|
|
39
|
+
"eslint-plugin-jsonc": "^3.4.2",
|
|
40
|
+
"eslint-plugin-n": "^18.4.1",
|
|
41
41
|
"eslint-plugin-no-only-tests": "^3.4.0",
|
|
42
|
-
"eslint-plugin-prettier": "^5.5.
|
|
43
|
-
"eslint-plugin-regexp": "^3.1
|
|
44
|
-
"eslint-plugin-
|
|
42
|
+
"eslint-plugin-prettier": "^5.5.6",
|
|
43
|
+
"eslint-plugin-regexp": "^3.3.1",
|
|
44
|
+
"eslint-plugin-slop": "^0.1.3",
|
|
45
|
+
"eslint-plugin-sonarjs": "^4.2.2",
|
|
46
|
+
"eslint-plugin-unicorn": "^77.0.0",
|
|
45
47
|
"eslint-plugin-unused-imports": "^4.4.1",
|
|
46
|
-
"globals": "^17.
|
|
48
|
+
"globals": "^17.13.0",
|
|
47
49
|
"jiti": "^2.7.0",
|
|
48
|
-
"local-pkg": "^1.1
|
|
49
|
-
"prettier": "^3.
|
|
50
|
+
"local-pkg": "^1.2.1",
|
|
51
|
+
"prettier": "^3.9.9"
|
|
50
52
|
},
|
|
51
53
|
"devDependencies": {
|
|
52
|
-
"@types/node": "^
|
|
53
|
-
"@unocss/eslint-plugin": "^66.
|
|
54
|
-
"bumpp": "^
|
|
55
|
-
"eslint-plugin-vue": "^10.
|
|
54
|
+
"@types/node": "^26.6.4",
|
|
55
|
+
"@unocss/eslint-plugin": "^66.10.5",
|
|
56
|
+
"bumpp": "^12.3.0",
|
|
57
|
+
"eslint-plugin-vue": "^10.11.1",
|
|
56
58
|
"eslint-typegen": "^2.3.1",
|
|
57
|
-
"lint-staged": "^17.0
|
|
58
|
-
"simple-git-hooks": "^2.
|
|
59
|
-
"tsdown": "^0.
|
|
59
|
+
"lint-staged": "^17.6.0",
|
|
60
|
+
"simple-git-hooks": "^2.14.0",
|
|
61
|
+
"tsdown": "^0.23.0",
|
|
60
62
|
"typescript": "^6.0.3",
|
|
61
|
-
"typescript-eslint": "^8.
|
|
63
|
+
"typescript-eslint": "^8.71.1"
|
|
62
64
|
},
|
|
63
65
|
"simple-git-hooks": {
|
|
64
66
|
"pre-commit": "pnpm lint-staged"
|