@ntnyq/eslint-config 2.0.0-beta.25 → 2.0.0-beta.27
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 +338 -115
- package/dist/index.d.cts +26 -13
- package/dist/index.d.ts +26 -13
- package/dist/index.js +352 -132
- package/package.json +16 -17
package/dist/index.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
// src/
|
|
1
|
+
// src/env.ts
|
|
2
|
+
import { isPackageExists } from "local-pkg";
|
|
3
|
+
var hasTypeScript = isPackageExists("typescript");
|
|
4
|
+
var hasVue = isPackageExists("vue") || isPackageExists("nuxt") || isPackageExists("vitepress") || isPackageExists("@slidev/cli");
|
|
5
|
+
|
|
6
|
+
// src/globs.ts
|
|
2
7
|
var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
3
8
|
var GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
|
|
4
9
|
var GLOB_JS = "**/*.?([cm])js";
|
|
@@ -44,19 +49,30 @@ var GLOB_EXCLUDE = [
|
|
|
44
49
|
"**/__snapshots__",
|
|
45
50
|
"**/auto-import?(s).d.ts",
|
|
46
51
|
"**/components.d.ts",
|
|
47
|
-
"**/output",
|
|
48
52
|
"**/coverage",
|
|
53
|
+
"**/fixtures",
|
|
54
|
+
"**/output",
|
|
55
|
+
"**/public",
|
|
56
|
+
"**/static",
|
|
49
57
|
"**/temp",
|
|
50
58
|
"**/cache",
|
|
51
|
-
"**/fixtures",
|
|
52
59
|
"**/.vitepress/cache",
|
|
60
|
+
"**/.eslintcache",
|
|
61
|
+
"**/.stylelintcache",
|
|
62
|
+
"**/.vite-inspect",
|
|
53
63
|
"**/.nuxt",
|
|
54
64
|
"**/.output",
|
|
65
|
+
"**/.tsup",
|
|
55
66
|
"**/.nitro",
|
|
56
67
|
"**/.vercel",
|
|
57
68
|
"**/.changeset",
|
|
58
69
|
"**/.npmrc",
|
|
59
|
-
"**/.yarnrc"
|
|
70
|
+
"**/.yarnrc",
|
|
71
|
+
// Force lint
|
|
72
|
+
"!.github",
|
|
73
|
+
"!.vitepress",
|
|
74
|
+
"!.vuepress",
|
|
75
|
+
"!.vscode"
|
|
60
76
|
];
|
|
61
77
|
|
|
62
78
|
// src/presets.ts
|
|
@@ -68,75 +84,75 @@ import { getPackageInfoSync } from "local-pkg";
|
|
|
68
84
|
import { defineFlatConfig as defineFlatConfig2 } from "eslint-define-config";
|
|
69
85
|
|
|
70
86
|
// src/plugins.ts
|
|
71
|
-
import * as pluginYaml from "eslint-plugin-yml";
|
|
72
87
|
import { default as default2 } from "eslint-plugin-n";
|
|
73
|
-
import { default as default3 } from "eslint-plugin-
|
|
74
|
-
import { default as default4 } from "eslint-plugin
|
|
75
|
-
import { default as default5 } from "eslint-plugin-
|
|
76
|
-
import { default as default6 } from "
|
|
77
|
-
import { default as default7 } from "eslint-plugin-
|
|
78
|
-
import { default as default8 } from "eslint-plugin-
|
|
79
|
-
import
|
|
80
|
-
import { default as
|
|
81
|
-
import
|
|
82
|
-
import { default as
|
|
83
|
-
import
|
|
84
|
-
import
|
|
85
|
-
import * as
|
|
88
|
+
import { default as default3 } from "eslint-plugin-vue";
|
|
89
|
+
import { default as default4 } from "@unocss/eslint-plugin";
|
|
90
|
+
import { default as default5 } from "eslint-plugin-unicorn";
|
|
91
|
+
import { default as default6 } from "eslint-plugin-prettier";
|
|
92
|
+
import { default as default7 } from "eslint-plugin-markdown";
|
|
93
|
+
import { default as default8 } from "eslint-plugin-eslint-comments";
|
|
94
|
+
import tseslint from "typescript-eslint";
|
|
95
|
+
import { default as default9 } from "eslint-plugin-yml";
|
|
96
|
+
import * as pluginJsonc from "eslint-plugin-jsonc";
|
|
97
|
+
import { default as default10 } from "eslint-plugin-import-x";
|
|
98
|
+
import * as parserYaml from "yaml-eslint-parser";
|
|
99
|
+
import * as parserVue from "vue-eslint-parser";
|
|
100
|
+
import * as parserJsonc from "jsonc-eslint-parser";
|
|
101
|
+
// @__NO_SIDE_EFFECTS__
|
|
102
|
+
function interopDefault(m) {
|
|
103
|
+
return m.default || m;
|
|
104
|
+
}
|
|
86
105
|
|
|
87
106
|
// src/configs/typescript.ts
|
|
88
107
|
import { defineFlatConfig } from "eslint-define-config";
|
|
89
|
-
var
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
plugins: {
|
|
99
|
-
"@typescript-eslint": default11
|
|
100
|
-
},
|
|
101
|
-
rules: {
|
|
102
|
-
...default11.configs.recommended.rules,
|
|
103
|
-
...default11.configs.stylistic.rules,
|
|
104
|
-
"@typescript-eslint/no-unused-vars": "error",
|
|
105
|
-
"@typescript-eslint/no-redeclare": "error",
|
|
106
|
-
"@typescript-eslint/consistent-type-imports": [
|
|
107
|
-
"error",
|
|
108
|
-
{
|
|
109
|
-
prefer: "type-imports",
|
|
110
|
-
fixStyle: "separate-type-imports",
|
|
111
|
-
disallowTypeAnnotations: false
|
|
112
|
-
}
|
|
113
|
-
],
|
|
114
|
-
"@typescript-eslint/consistent-type-assertions": [
|
|
115
|
-
"error",
|
|
116
|
-
{
|
|
117
|
-
assertionStyle: "as",
|
|
118
|
-
objectLiteralTypeAssertions: "allow-as-parameter"
|
|
119
|
-
}
|
|
120
|
-
],
|
|
121
|
-
"@typescript-eslint/prefer-as-const": "warn",
|
|
122
|
-
"@typescript-eslint/ban-types": "off",
|
|
123
|
-
"@typescript-eslint/camelcase": "off",
|
|
124
|
-
"@typescript-eslint/no-namespace": "off",
|
|
125
|
-
"@typescript-eslint/ban-ts-ignore": "off",
|
|
126
|
-
"@typescript-eslint/ban-ts-comment": "off",
|
|
127
|
-
"@typescript-eslint/no-explicit-any": "off",
|
|
128
|
-
"@typescript-eslint/no-empty-function": "off",
|
|
129
|
-
"@typescript-eslint/naming-convention": "off",
|
|
130
|
-
"@typescript-eslint/no-empty-interface": "off",
|
|
131
|
-
"@typescript-eslint/no-non-null-assertion": "off",
|
|
132
|
-
"@typescript-eslint/triple-slash-reference": "off",
|
|
133
|
-
"@typescript-eslint/no-parameter-properties": "off",
|
|
134
|
-
"@typescript-eslint/explicit-member-accessibility": "off",
|
|
135
|
-
"@typescript-eslint/explicit-function-return-type": "off",
|
|
136
|
-
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
137
|
-
"@typescript-eslint/consistent-indexed-object-style": "off"
|
|
108
|
+
var typescriptCore = tseslint.config({
|
|
109
|
+
extends: [...tseslint.configs.recommended],
|
|
110
|
+
files: [GLOB_TS, GLOB_TSX],
|
|
111
|
+
languageOptions: {
|
|
112
|
+
parser: tseslint.parser,
|
|
113
|
+
parserOptions: {
|
|
114
|
+
sourceType: "module"
|
|
138
115
|
}
|
|
139
116
|
},
|
|
117
|
+
rules: {
|
|
118
|
+
"@typescript-eslint/no-unused-vars": "error",
|
|
119
|
+
"@typescript-eslint/no-redeclare": "error",
|
|
120
|
+
"@typescript-eslint/consistent-type-imports": [
|
|
121
|
+
"error",
|
|
122
|
+
{
|
|
123
|
+
prefer: "type-imports",
|
|
124
|
+
fixStyle: "separate-type-imports",
|
|
125
|
+
disallowTypeAnnotations: false
|
|
126
|
+
}
|
|
127
|
+
],
|
|
128
|
+
"@typescript-eslint/consistent-type-assertions": [
|
|
129
|
+
"error",
|
|
130
|
+
{
|
|
131
|
+
assertionStyle: "as",
|
|
132
|
+
objectLiteralTypeAssertions: "allow-as-parameter"
|
|
133
|
+
}
|
|
134
|
+
],
|
|
135
|
+
"@typescript-eslint/prefer-as-const": "warn",
|
|
136
|
+
"@typescript-eslint/ban-types": "off",
|
|
137
|
+
"@typescript-eslint/camelcase": "off",
|
|
138
|
+
"@typescript-eslint/no-namespace": "off",
|
|
139
|
+
"@typescript-eslint/ban-ts-ignore": "off",
|
|
140
|
+
"@typescript-eslint/ban-ts-comment": "off",
|
|
141
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
142
|
+
"@typescript-eslint/no-empty-function": "off",
|
|
143
|
+
"@typescript-eslint/naming-convention": "off",
|
|
144
|
+
"@typescript-eslint/no-empty-interface": "off",
|
|
145
|
+
"@typescript-eslint/no-non-null-assertion": "off",
|
|
146
|
+
"@typescript-eslint/triple-slash-reference": "off",
|
|
147
|
+
"@typescript-eslint/no-parameter-properties": "off",
|
|
148
|
+
"@typescript-eslint/explicit-member-accessibility": "off",
|
|
149
|
+
"@typescript-eslint/explicit-function-return-type": "off",
|
|
150
|
+
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
151
|
+
"@typescript-eslint/consistent-indexed-object-style": "off"
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
var typescript = defineFlatConfig([
|
|
155
|
+
...typescriptCore,
|
|
140
156
|
{
|
|
141
157
|
files: ["**/*.d.ts"],
|
|
142
158
|
rules: {
|
|
@@ -152,7 +168,7 @@ var typescript = defineFlatConfig([
|
|
|
152
168
|
}
|
|
153
169
|
},
|
|
154
170
|
{
|
|
155
|
-
files: [
|
|
171
|
+
files: [GLOB_JS, "**/*.cjs"],
|
|
156
172
|
rules: {
|
|
157
173
|
"@typescript-eslint/no-var-requires": "off"
|
|
158
174
|
}
|
|
@@ -168,22 +184,31 @@ function getVueVersion() {
|
|
|
168
184
|
return 3;
|
|
169
185
|
}
|
|
170
186
|
var isVue3 = getVueVersion() === 3;
|
|
171
|
-
var vueBaseRules = {};
|
|
172
187
|
var vue2Rules = {
|
|
173
|
-
...
|
|
188
|
+
...default3.configs.base.rules,
|
|
189
|
+
...default3.configs.essential.rules,
|
|
190
|
+
...default3.configs["strongly-recommended"].rules,
|
|
191
|
+
...default3.configs.recommended.rules
|
|
174
192
|
};
|
|
175
193
|
var vue3Rules = {
|
|
176
|
-
...
|
|
194
|
+
...default3.configs.base.rules,
|
|
195
|
+
...default3.configs["vue3-essential"].rules,
|
|
196
|
+
...default3.configs["vue3-strongly-recommended"].rules,
|
|
197
|
+
...default3.configs["vue3-recommended"].rules
|
|
177
198
|
};
|
|
178
199
|
var vue = defineFlatConfig2([
|
|
200
|
+
...tseslint.config({
|
|
201
|
+
files: [GLOB_VUE],
|
|
202
|
+
extends: typescriptCore
|
|
203
|
+
}),
|
|
179
204
|
{
|
|
180
205
|
files: [GLOB_VUE],
|
|
181
206
|
plugins: {
|
|
182
|
-
vue:
|
|
183
|
-
"@typescript-eslint":
|
|
207
|
+
vue: default3,
|
|
208
|
+
"@typescript-eslint": tseslint.plugin
|
|
184
209
|
},
|
|
185
210
|
languageOptions: {
|
|
186
|
-
parser:
|
|
211
|
+
parser: parserVue,
|
|
187
212
|
parserOptions: {
|
|
188
213
|
parser: "@typescript-eslint/parser",
|
|
189
214
|
sourceType: "module",
|
|
@@ -193,16 +218,222 @@ var vue = defineFlatConfig2([
|
|
|
193
218
|
}
|
|
194
219
|
}
|
|
195
220
|
},
|
|
196
|
-
processor:
|
|
221
|
+
processor: default3.processors[".vue"],
|
|
197
222
|
rules: {
|
|
198
|
-
...
|
|
223
|
+
...isVue3 ? vue3Rules : vue2Rules,
|
|
224
|
+
// OFF
|
|
225
|
+
"vue/no-v-html": "off",
|
|
226
|
+
"vue/require-prop-types": "off",
|
|
227
|
+
"vue/require-default-prop": "off",
|
|
228
|
+
"vue/multi-word-component-names": "off",
|
|
229
|
+
"vue/no-setup-props-reactivity-loss": "off",
|
|
230
|
+
"vue/html-self-closing": [
|
|
231
|
+
"error",
|
|
232
|
+
{
|
|
233
|
+
html: {
|
|
234
|
+
void: "always",
|
|
235
|
+
normal: "always",
|
|
236
|
+
component: "always"
|
|
237
|
+
},
|
|
238
|
+
svg: "always",
|
|
239
|
+
math: "always"
|
|
240
|
+
}
|
|
241
|
+
],
|
|
242
|
+
"vue/block-tag-newline": [
|
|
243
|
+
"error",
|
|
244
|
+
{
|
|
245
|
+
singleline: "always",
|
|
246
|
+
multiline: "always"
|
|
247
|
+
}
|
|
248
|
+
],
|
|
249
|
+
"vue/component-name-in-template-casing": [
|
|
250
|
+
"error",
|
|
251
|
+
"PascalCase",
|
|
252
|
+
{
|
|
253
|
+
// Force auto-import components to be PascalCase
|
|
254
|
+
registeredComponentsOnly: false,
|
|
255
|
+
ignores: ["slot", "component"]
|
|
256
|
+
}
|
|
257
|
+
],
|
|
258
|
+
"vue/component-options-name-casing": ["error", "PascalCase"],
|
|
259
|
+
"vue/custom-event-name-casing": ["error", "camelCase"],
|
|
260
|
+
"vue/define-macros-order": [
|
|
261
|
+
"error",
|
|
262
|
+
{
|
|
263
|
+
order: ["defineProps", "defineEmits", "defineOptions", "defineSlots"]
|
|
264
|
+
}
|
|
265
|
+
],
|
|
266
|
+
"vue/html-comment-content-spacing": [
|
|
267
|
+
"error",
|
|
268
|
+
"always",
|
|
269
|
+
{
|
|
270
|
+
exceptions: ["-"]
|
|
271
|
+
}
|
|
272
|
+
],
|
|
273
|
+
"vue/array-bracket-spacing": ["error", "never"],
|
|
274
|
+
"vue/arrow-spacing": ["error", { before: true, after: true }],
|
|
275
|
+
"vue/block-spacing": ["error", "always"],
|
|
276
|
+
"vue/brace-style": ["error", "stroustrup", { allowSingleLine: true }],
|
|
277
|
+
"vue/comma-dangle": ["error", "always-multiline"],
|
|
278
|
+
"vue/comma-spacing": ["error", { before: false, after: true }],
|
|
279
|
+
"vue/comma-style": ["error", "last"],
|
|
280
|
+
"vue/dot-location": ["error", "property"],
|
|
281
|
+
"vue/dot-notation": ["error", { allowKeywords: true }],
|
|
282
|
+
"vue/eqeqeq": ["error", "smart"],
|
|
283
|
+
"vue/key-spacing": ["error", { beforeColon: false, afterColon: true }],
|
|
284
|
+
"vue/keyword-spacing": ["error", { before: true, after: true }],
|
|
285
|
+
"vue/no-empty-pattern": "error",
|
|
286
|
+
"vue/no-loss-of-precision": "error",
|
|
287
|
+
"vue/no-irregular-whitespace": "error",
|
|
288
|
+
"vue/no-use-v-else-with-v-for": "error",
|
|
289
|
+
"vue/require-typed-object-prop": "error",
|
|
290
|
+
"vue/no-extra-parens": ["error", "functions"],
|
|
291
|
+
"vue/no-restricted-syntax": [
|
|
292
|
+
"error",
|
|
293
|
+
"DebuggerStatement",
|
|
294
|
+
"LabeledStatement",
|
|
295
|
+
"WithStatement"
|
|
296
|
+
],
|
|
297
|
+
"vue/no-sparse-arrays": "error",
|
|
298
|
+
"vue/no-deprecated-model-definition": [
|
|
299
|
+
"error",
|
|
300
|
+
{
|
|
301
|
+
allowVue3Compat: true
|
|
302
|
+
}
|
|
303
|
+
],
|
|
304
|
+
"vue/object-curly-newline": [
|
|
305
|
+
"error",
|
|
306
|
+
{
|
|
307
|
+
multiline: true,
|
|
308
|
+
consistent: true
|
|
309
|
+
}
|
|
310
|
+
],
|
|
311
|
+
"vue/no-static-inline-styles": [
|
|
312
|
+
"error",
|
|
313
|
+
{
|
|
314
|
+
allowBinding: true
|
|
315
|
+
}
|
|
316
|
+
],
|
|
317
|
+
"vue/object-curly-spacing": ["error", "always"],
|
|
318
|
+
"vue/object-property-newline": [
|
|
319
|
+
"error",
|
|
320
|
+
{
|
|
321
|
+
allowMultiplePropertiesPerLine: true
|
|
322
|
+
}
|
|
323
|
+
],
|
|
324
|
+
"vue/object-shorthand": [
|
|
325
|
+
"error",
|
|
326
|
+
"always",
|
|
327
|
+
{
|
|
328
|
+
ignoreConstructors: false,
|
|
329
|
+
avoidQuotes: true
|
|
330
|
+
}
|
|
331
|
+
],
|
|
332
|
+
"vue/operator-linebreak": ["error", "before"],
|
|
333
|
+
"vue/prefer-template": "error",
|
|
334
|
+
"vue/prop-name-casing": ["error", "camelCase"],
|
|
335
|
+
"vue/quote-props": ["error", "consistent-as-needed"],
|
|
336
|
+
"vue/space-in-parens": ["error", "never"],
|
|
337
|
+
"vue/space-infix-ops": "error",
|
|
338
|
+
"vue/space-unary-ops": [
|
|
339
|
+
"error",
|
|
340
|
+
{
|
|
341
|
+
words: true,
|
|
342
|
+
nonwords: false
|
|
343
|
+
}
|
|
344
|
+
],
|
|
345
|
+
"vue/template-curly-spacing": "error",
|
|
346
|
+
"vue/block-order": [
|
|
347
|
+
"error",
|
|
348
|
+
{
|
|
349
|
+
order: ["script", "template", "style"]
|
|
350
|
+
}
|
|
351
|
+
],
|
|
352
|
+
"vue/attributes-order": [
|
|
353
|
+
"error",
|
|
354
|
+
{
|
|
355
|
+
order: [
|
|
356
|
+
"EVENTS",
|
|
357
|
+
// `@click="functionCall"`, `v-on="event"`
|
|
358
|
+
"TWO_WAY_BINDING",
|
|
359
|
+
// `v-model`
|
|
360
|
+
"OTHER_DIRECTIVES",
|
|
361
|
+
// `v-custom-directive`
|
|
362
|
+
"LIST_RENDERING",
|
|
363
|
+
// `v-for item in items`
|
|
364
|
+
"CONDITIONALS",
|
|
365
|
+
// `v-if`, `v-show`, `v-cloak`
|
|
366
|
+
"CONTENT",
|
|
367
|
+
// `v-text`, `v-html`
|
|
368
|
+
"SLOT",
|
|
369
|
+
// `v-slot`, `slot`
|
|
370
|
+
"UNIQUE",
|
|
371
|
+
// `ref`, `key`
|
|
372
|
+
"DEFINITION",
|
|
373
|
+
// `is`, `v-is`
|
|
374
|
+
"ATTR_DYNAMIC",
|
|
375
|
+
// `v-bind:prop="foo"`, `:prop="foo"`
|
|
376
|
+
// `OTHER_ATTR`, // `custom-prop="foo"`, `:prop="foo"`, `disabled`
|
|
377
|
+
"RENDER_MODIFIERS",
|
|
378
|
+
// `v-once`, `v-pre`
|
|
379
|
+
"GLOBAL",
|
|
380
|
+
// `id`
|
|
381
|
+
"ATTR_STATIC",
|
|
382
|
+
// `prop="foo", `static attributes
|
|
383
|
+
"ATTR_SHORTHAND_BOOL"
|
|
384
|
+
// `disabled`, prop shorthand
|
|
385
|
+
],
|
|
386
|
+
alphabetical: false
|
|
387
|
+
}
|
|
388
|
+
],
|
|
389
|
+
"vue/order-in-components": [
|
|
390
|
+
"error",
|
|
391
|
+
{
|
|
392
|
+
order: [
|
|
393
|
+
"el",
|
|
394
|
+
"name",
|
|
395
|
+
"key",
|
|
396
|
+
"parent",
|
|
397
|
+
"functional",
|
|
398
|
+
["provide", "inject"],
|
|
399
|
+
["delimiters", "comments"],
|
|
400
|
+
["components", "directives", "filters"],
|
|
401
|
+
"extends",
|
|
402
|
+
"mixins",
|
|
403
|
+
"layout",
|
|
404
|
+
"middleware",
|
|
405
|
+
"validate",
|
|
406
|
+
"scrollToTop",
|
|
407
|
+
"transition",
|
|
408
|
+
"loading",
|
|
409
|
+
"inheritAttrs",
|
|
410
|
+
"model",
|
|
411
|
+
["props", "propsData"],
|
|
412
|
+
"emits",
|
|
413
|
+
"setup",
|
|
414
|
+
"asyncData",
|
|
415
|
+
"computed",
|
|
416
|
+
"data",
|
|
417
|
+
"fetch",
|
|
418
|
+
"head",
|
|
419
|
+
"methods",
|
|
420
|
+
["template", "render"],
|
|
421
|
+
"watch",
|
|
422
|
+
"watchQuery",
|
|
423
|
+
"LIFECYCLE_HOOKS",
|
|
424
|
+
"renderError",
|
|
425
|
+
"ROUTER_GUARDS"
|
|
426
|
+
]
|
|
427
|
+
}
|
|
428
|
+
],
|
|
429
|
+
"vue/max-attributes-per-line": [
|
|
430
|
+
"error",
|
|
431
|
+
{
|
|
432
|
+
singleline: 1,
|
|
433
|
+
multiline: 1
|
|
434
|
+
}
|
|
435
|
+
]
|
|
199
436
|
}
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
plugins: {
|
|
203
|
-
vue: default4
|
|
204
|
-
},
|
|
205
|
-
rules: isVue3 ? vue3Rules : vue2Rules
|
|
206
437
|
}
|
|
207
438
|
]);
|
|
208
439
|
|
|
@@ -212,14 +443,14 @@ var yml = defineFlatConfig3([
|
|
|
212
443
|
{
|
|
213
444
|
files: [GLOB_YAML],
|
|
214
445
|
languageOptions: {
|
|
215
|
-
parser:
|
|
446
|
+
parser: parserYaml
|
|
216
447
|
},
|
|
217
448
|
plugins: {
|
|
218
|
-
yml:
|
|
449
|
+
yml: default9
|
|
219
450
|
},
|
|
220
451
|
rules: {
|
|
221
|
-
...
|
|
222
|
-
...
|
|
452
|
+
...default9.configs.standard.rules,
|
|
453
|
+
...default9.configs.prettier.rules,
|
|
223
454
|
"yml/no-empty-mapping-value": "off",
|
|
224
455
|
"yml/quotes": ["error", { avoidEscape: false, prefer: "single" }]
|
|
225
456
|
}
|
|
@@ -448,13 +679,13 @@ var jsonc = defineFlatConfig6([
|
|
|
448
679
|
{
|
|
449
680
|
files: [GLOB_JSON, GLOB_JSON5, GLOB_JSONC, "**/*rc"],
|
|
450
681
|
plugins: {
|
|
451
|
-
jsonc:
|
|
682
|
+
jsonc: pluginJsonc
|
|
452
683
|
},
|
|
453
684
|
languageOptions: {
|
|
454
|
-
parser:
|
|
685
|
+
parser: parserJsonc
|
|
455
686
|
},
|
|
456
687
|
rules: {
|
|
457
|
-
...
|
|
688
|
+
...pluginJsonc.configs["recommended-with-jsonc"].rules,
|
|
458
689
|
"jsonc/array-bracket-spacing": ["error", "never"],
|
|
459
690
|
"jsonc/comma-dangle": ["error", "never"],
|
|
460
691
|
"jsonc/comma-style": ["error", "last"],
|
|
@@ -490,7 +721,7 @@ import { defineFlatConfig as defineFlatConfig7 } from "eslint-define-config";
|
|
|
490
721
|
var imports = defineFlatConfig7([
|
|
491
722
|
{
|
|
492
723
|
plugins: {
|
|
493
|
-
import:
|
|
724
|
+
import: default10
|
|
494
725
|
},
|
|
495
726
|
settings: {
|
|
496
727
|
"import/resolver": {
|
|
@@ -533,10 +764,10 @@ import { defineFlatConfig as defineFlatConfig8 } from "eslint-define-config";
|
|
|
533
764
|
var unocss = defineFlatConfig8([
|
|
534
765
|
{
|
|
535
766
|
plugins: {
|
|
536
|
-
"@unocss":
|
|
767
|
+
"@unocss": default4
|
|
537
768
|
},
|
|
538
769
|
rules: {
|
|
539
|
-
...
|
|
770
|
+
...default4.configs.recommended.rules
|
|
540
771
|
}
|
|
541
772
|
}
|
|
542
773
|
]);
|
|
@@ -546,7 +777,7 @@ import { defineFlatConfig as defineFlatConfig9 } from "eslint-define-config";
|
|
|
546
777
|
var unicorn = defineFlatConfig9([
|
|
547
778
|
{
|
|
548
779
|
plugins: {
|
|
549
|
-
unicorn:
|
|
780
|
+
unicorn: default5
|
|
550
781
|
},
|
|
551
782
|
rules: {
|
|
552
783
|
"unicorn/no-unsafe-regex": "off",
|
|
@@ -623,11 +854,11 @@ import { defineFlatConfig as defineFlatConfig10 } from "eslint-define-config";
|
|
|
623
854
|
var prettier = defineFlatConfig10([
|
|
624
855
|
{
|
|
625
856
|
plugins: {
|
|
626
|
-
prettier:
|
|
857
|
+
prettier: default6
|
|
627
858
|
},
|
|
628
859
|
rules: {
|
|
629
860
|
...prettierConfig.rules,
|
|
630
|
-
...
|
|
861
|
+
...default6.configs.recommended.rules,
|
|
631
862
|
"prettier/prettier": "warn"
|
|
632
863
|
}
|
|
633
864
|
}
|
|
@@ -636,42 +867,28 @@ var prettier = defineFlatConfig10([
|
|
|
636
867
|
// src/configs/markdown.ts
|
|
637
868
|
import { defineFlatConfig as defineFlatConfig11 } from "eslint-define-config";
|
|
638
869
|
var markdown = defineFlatConfig11([
|
|
639
|
-
|
|
640
|
-
files: [GLOB_MARKDOWN],
|
|
641
|
-
plugins: {
|
|
642
|
-
markdown: default9
|
|
643
|
-
},
|
|
644
|
-
processor: "markdown/markdown"
|
|
645
|
-
},
|
|
870
|
+
...default7.configs.recommended,
|
|
646
871
|
{
|
|
647
872
|
files: [`${GLOB_MARKDOWN}/${GLOB_SRC}`, `${GLOB_MARKDOWN}/${GLOB_VUE}`],
|
|
648
|
-
languageOptions: {
|
|
649
|
-
parserOptions: {
|
|
650
|
-
ecmaFeatures: {
|
|
651
|
-
impliedStrict: true
|
|
652
|
-
}
|
|
653
|
-
}
|
|
654
|
-
},
|
|
655
|
-
plugins: {
|
|
656
|
-
"@typescript-eslint": default11
|
|
657
|
-
},
|
|
658
873
|
rules: {
|
|
659
|
-
...default9.configs["recommended-legacy"].overrides[1].rules,
|
|
660
874
|
"no-undef": "off",
|
|
661
875
|
"no-alert": "off",
|
|
662
876
|
"no-console": "off",
|
|
663
877
|
"no-unused-vars": "off",
|
|
664
878
|
"no-unused-expressions": "off",
|
|
665
879
|
"no-restricted-imports": "off",
|
|
880
|
+
"node/prefer-global/buffer": "off",
|
|
881
|
+
"node/prefer-global/process": "off",
|
|
666
882
|
"import/no-unresolved": "off",
|
|
883
|
+
"unused-imports/no-unused-imports": "off",
|
|
884
|
+
"unused-imports/no-unused-vars": "off",
|
|
667
885
|
"@typescript-eslint/comma-dangle": "off",
|
|
668
886
|
"@typescript-eslint/no-redeclare": "off",
|
|
887
|
+
"@typescript-eslint/no-namespace": "off",
|
|
669
888
|
"@typescript-eslint/no-unused-vars": "off",
|
|
670
889
|
"@typescript-eslint/no-var-requires": "off",
|
|
671
890
|
"@typescript-eslint/no-extraneous-class": "off",
|
|
672
|
-
"@typescript-eslint/no-use-before-define": "off"
|
|
673
|
-
"unused-imports/no-unused-imports": "off",
|
|
674
|
-
"unused-imports/no-unused-vars": "off"
|
|
891
|
+
"@typescript-eslint/no-use-before-define": "off"
|
|
675
892
|
}
|
|
676
893
|
}
|
|
677
894
|
]);
|
|
@@ -681,10 +898,10 @@ import { defineFlatConfig as defineFlatConfig12 } from "eslint-define-config";
|
|
|
681
898
|
var comments = defineFlatConfig12([
|
|
682
899
|
{
|
|
683
900
|
plugins: {
|
|
684
|
-
"eslint-comments":
|
|
901
|
+
"eslint-comments": default8
|
|
685
902
|
},
|
|
686
903
|
rules: {
|
|
687
|
-
...
|
|
904
|
+
...default8.configs.recommended.rules,
|
|
688
905
|
"eslint-comments/disable-enable-pair": ["error", { allowWholeFile: true }]
|
|
689
906
|
}
|
|
690
907
|
}
|
|
@@ -1139,33 +1356,36 @@ export {
|
|
|
1139
1356
|
comments,
|
|
1140
1357
|
common,
|
|
1141
1358
|
getVueVersion,
|
|
1359
|
+
hasTypeScript,
|
|
1360
|
+
hasVue,
|
|
1142
1361
|
ignores,
|
|
1143
1362
|
imports,
|
|
1363
|
+
interopDefault,
|
|
1144
1364
|
javascript,
|
|
1145
1365
|
jsonc,
|
|
1146
1366
|
jsx,
|
|
1147
1367
|
markdown,
|
|
1148
1368
|
node,
|
|
1149
1369
|
ntnyq,
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
default10 as
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
default9 as pluginMarkdown,
|
|
1370
|
+
parserJsonc,
|
|
1371
|
+
parserVue,
|
|
1372
|
+
parserYaml,
|
|
1373
|
+
default8 as pluginComments,
|
|
1374
|
+
default10 as pluginImport,
|
|
1375
|
+
pluginJsonc,
|
|
1376
|
+
default7 as pluginMarkdown,
|
|
1158
1377
|
default2 as pluginNode,
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
pluginYaml,
|
|
1378
|
+
default6 as pluginPrettier,
|
|
1379
|
+
default5 as pluginUnicorn,
|
|
1380
|
+
default4 as pluginUnoCSS,
|
|
1381
|
+
default3 as pluginVue,
|
|
1382
|
+
default9 as pluginYaml,
|
|
1165
1383
|
prettier,
|
|
1166
1384
|
sortPackageJson,
|
|
1167
1385
|
sortTsConfig,
|
|
1386
|
+
tseslint,
|
|
1168
1387
|
typescript,
|
|
1388
|
+
typescriptCore,
|
|
1169
1389
|
unicorn,
|
|
1170
1390
|
unocss,
|
|
1171
1391
|
vue,
|