@curev/eslint-config 0.3.5 → 0.3.7
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 +114 -141
- package/dist/index.d.cts +140 -147
- package/dist/index.d.mts +140 -147
- package/dist/index.d.ts +140 -147
- package/dist/index.mjs +114 -139
- package/package.json +5 -4
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import process from 'node:process';
|
|
2
1
|
import fs from 'node:fs';
|
|
2
|
+
import process from 'node:process';
|
|
3
3
|
import { isPackageExists } from 'local-pkg';
|
|
4
4
|
import pluginCurev from '@curev/eslint-plugin';
|
|
5
5
|
import pluginComments from 'eslint-plugin-eslint-comments';
|
|
@@ -7,7 +7,6 @@ import * as pluginImport from 'eslint-plugin-i';
|
|
|
7
7
|
import pluginNode from 'eslint-plugin-n';
|
|
8
8
|
import pluginUnicorn from 'eslint-plugin-unicorn';
|
|
9
9
|
import pluginUnusedImports from 'eslint-plugin-unused-imports';
|
|
10
|
-
import pluginPerfectionist from 'eslint-plugin-perfectionist';
|
|
11
10
|
import globals from 'globals';
|
|
12
11
|
import { mergeProcessors, processorPassThrough } from 'eslint-merge-processors';
|
|
13
12
|
|
|
@@ -119,9 +118,9 @@ async function imports(options = {}) {
|
|
|
119
118
|
import: pluginImport
|
|
120
119
|
},
|
|
121
120
|
rules: {
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
"
|
|
121
|
+
"curev/import-dedupe": "error",
|
|
122
|
+
"curev/no-import-dist": "error",
|
|
123
|
+
"curev/no-import-node-modules-by-path": "error",
|
|
125
124
|
"import/first": "error",
|
|
126
125
|
"import/no-duplicates": "error",
|
|
127
126
|
"import/no-mutable-exports": "error",
|
|
@@ -138,8 +137,8 @@ async function imports(options = {}) {
|
|
|
138
137
|
files: ["**/bin/**/*", `**/bin.${GLOB_SRC_EXT}`],
|
|
139
138
|
name: "curev:imports:bin",
|
|
140
139
|
rules: {
|
|
141
|
-
"
|
|
142
|
-
"
|
|
140
|
+
"curev/no-import-dist": "off",
|
|
141
|
+
"curev/no-import-node-modules-by-path": "off"
|
|
143
142
|
}
|
|
144
143
|
}
|
|
145
144
|
];
|
|
@@ -176,33 +175,33 @@ async function javascript(options = {}) {
|
|
|
176
175
|
},
|
|
177
176
|
name: "curev:javascript",
|
|
178
177
|
plugins: {
|
|
179
|
-
"
|
|
178
|
+
"curev": pluginCurev,
|
|
180
179
|
"unused-imports": pluginUnusedImports
|
|
181
180
|
},
|
|
182
181
|
rules: {
|
|
183
|
-
"
|
|
184
|
-
"object-shorthand": ["warn", "properties"],
|
|
185
|
-
"accessor-pairs": ["error", { setWithoutGet: true, enforceForClassMembers: true }],
|
|
182
|
+
"accessor-pairs": ["error", { enforceForClassMembers: true, setWithoutGet: true }],
|
|
186
183
|
"array-callback-return": ["error", {
|
|
187
184
|
allowImplicit: false,
|
|
188
185
|
checkForEach: false
|
|
189
186
|
}],
|
|
187
|
+
"block-scoped-var": "error",
|
|
190
188
|
"camelcase": ["error", {
|
|
191
189
|
allow: ["^UNSAFE_"],
|
|
192
|
-
properties: "never",
|
|
193
190
|
ignoreGlobals: true,
|
|
194
|
-
ignoreImports: true
|
|
191
|
+
ignoreImports: true,
|
|
192
|
+
properties: "never"
|
|
195
193
|
}],
|
|
196
194
|
"constructor-super": "error",
|
|
197
195
|
"default-case-last": "error",
|
|
198
|
-
"eol-last": "error",
|
|
199
196
|
"eqeqeq": ["error", "always", { null: "ignore" }],
|
|
200
|
-
"
|
|
201
|
-
"
|
|
202
|
-
"
|
|
203
|
-
"
|
|
204
|
-
"
|
|
205
|
-
"
|
|
197
|
+
"import/export": "error",
|
|
198
|
+
"import/first": "error",
|
|
199
|
+
"import/no-absolute-path": ["error", { amd: false, commonjs: true, esmodule: true }],
|
|
200
|
+
"import/no-duplicates": "error",
|
|
201
|
+
"import/no-named-default": "error",
|
|
202
|
+
"import/no-webpack-loader-syntax": "error",
|
|
203
|
+
"new-cap": ["error", { capIsNew: false, newIsCap: true, properties: true }],
|
|
204
|
+
"no-alert": "error",
|
|
206
205
|
"no-array-constructor": "error",
|
|
207
206
|
"no-async-promise-executor": "error",
|
|
208
207
|
"no-caller": "error",
|
|
@@ -210,6 +209,7 @@ async function javascript(options = {}) {
|
|
|
210
209
|
"no-class-assign": "error",
|
|
211
210
|
"no-compare-neg-zero": "error",
|
|
212
211
|
"no-cond-assign": "error",
|
|
212
|
+
"no-console": ["error", { allow: ["warn", "error"] }],
|
|
213
213
|
"no-const-assign": "error",
|
|
214
214
|
"no-constant-condition": ["error", { checkLoops: false }],
|
|
215
215
|
"no-control-regex": "error",
|
|
@@ -219,7 +219,6 @@ async function javascript(options = {}) {
|
|
|
219
219
|
"no-dupe-class-members": "error",
|
|
220
220
|
"no-dupe-keys": "error",
|
|
221
221
|
"no-duplicate-case": "error",
|
|
222
|
-
"no-useless-backreference": "error",
|
|
223
222
|
"no-empty": ["error", { allowEmptyCatch: true }],
|
|
224
223
|
"no-empty-character-class": "error",
|
|
225
224
|
"no-empty-pattern": "error",
|
|
@@ -228,9 +227,7 @@ async function javascript(options = {}) {
|
|
|
228
227
|
"no-extend-native": "error",
|
|
229
228
|
"no-extra-bind": "error",
|
|
230
229
|
"no-extra-boolean-cast": "error",
|
|
231
|
-
"no-extra-parens": ["error", "functions"],
|
|
232
230
|
"no-fallthrough": "error",
|
|
233
|
-
"no-floating-decimal": "error",
|
|
234
231
|
"no-func-assign": "error",
|
|
235
232
|
"no-global-assign": "error",
|
|
236
233
|
"no-implied-eval": "error",
|
|
@@ -242,54 +239,47 @@ async function javascript(options = {}) {
|
|
|
242
239
|
"no-lone-blocks": "error",
|
|
243
240
|
"no-loss-of-precision": "error",
|
|
244
241
|
"no-misleading-character-class": "error",
|
|
245
|
-
"no-prototype-builtins": "error",
|
|
246
|
-
"no-useless-catch": "error",
|
|
247
|
-
"no-mixed-operators": ["error", {
|
|
248
|
-
groups: [
|
|
249
|
-
["==", "!=", "===", "!==", ">", ">=", "<", "<="],
|
|
250
|
-
["&&", "||"],
|
|
251
|
-
["in", "instanceof"]
|
|
252
|
-
],
|
|
253
|
-
allowSamePrecedence: true
|
|
254
|
-
}],
|
|
255
|
-
"no-mixed-spaces-and-tabs": "error",
|
|
256
|
-
"no-multi-spaces": "error",
|
|
257
242
|
"no-multi-str": "error",
|
|
258
243
|
"no-new": "error",
|
|
259
244
|
"no-new-func": "error",
|
|
260
|
-
"no-new-object": "error",
|
|
261
|
-
"no-new-symbol": "error",
|
|
262
245
|
"no-new-wrappers": "error",
|
|
263
246
|
"no-obj-calls": "error",
|
|
264
247
|
"no-octal": "error",
|
|
265
248
|
"no-octal-escape": "error",
|
|
266
249
|
"no-proto": "error",
|
|
250
|
+
"no-prototype-builtins": "error",
|
|
267
251
|
"no-redeclare": ["error", { builtinGlobals: false }],
|
|
268
252
|
"no-regex-spaces": "error",
|
|
253
|
+
"no-restricted-globals": [
|
|
254
|
+
"error",
|
|
255
|
+
{ message: "Use `globalThis` instead.", name: "global" },
|
|
256
|
+
{ message: "Use `globalThis` instead.", name: "self" }
|
|
257
|
+
],
|
|
258
|
+
"no-restricted-properties": [
|
|
259
|
+
"error",
|
|
260
|
+
{ message: "Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.", property: "__proto__" },
|
|
261
|
+
{ message: "Use `Object.defineProperty` instead.", property: "__defineGetter__" },
|
|
262
|
+
{ message: "Use `Object.defineProperty` instead.", property: "__defineSetter__" },
|
|
263
|
+
{ message: "Use `Object.getOwnPropertyDescriptor` instead.", property: "__lookupGetter__" },
|
|
264
|
+
{ message: "Use `Object.getOwnPropertyDescriptor` instead.", property: "__lookupSetter__" }
|
|
265
|
+
],
|
|
266
|
+
"no-restricted-syntax": [
|
|
267
|
+
"error",
|
|
268
|
+
"DebuggerStatement",
|
|
269
|
+
"LabeledStatement",
|
|
270
|
+
"WithStatement",
|
|
271
|
+
"TSEnumDeclaration[const=true]",
|
|
272
|
+
"TSExportAssignment"
|
|
273
|
+
],
|
|
269
274
|
"no-return-assign": ["error", "except-parens"],
|
|
270
275
|
"no-self-assign": ["error", { props: true }],
|
|
271
276
|
"no-self-compare": "error",
|
|
272
277
|
"no-sequences": "error",
|
|
273
278
|
"no-shadow-restricted-names": "error",
|
|
274
279
|
"no-sparse-arrays": "error",
|
|
275
|
-
"no-tabs": "error",
|
|
276
280
|
"no-template-curly-in-string": "error",
|
|
277
281
|
"no-this-before-super": "error",
|
|
278
282
|
"no-throw-literal": "error",
|
|
279
|
-
"no-trailing-spaces": [
|
|
280
|
-
"error",
|
|
281
|
-
{
|
|
282
|
-
skipBlankLines: true
|
|
283
|
-
}
|
|
284
|
-
],
|
|
285
|
-
"no-multiple-empty-lines": [
|
|
286
|
-
"error",
|
|
287
|
-
{
|
|
288
|
-
max: 3,
|
|
289
|
-
maxBOF: 0,
|
|
290
|
-
maxEOF: 1
|
|
291
|
-
}
|
|
292
|
-
],
|
|
293
283
|
"no-undef": "error",
|
|
294
284
|
"no-undef-init": "error",
|
|
295
285
|
"no-unexpected-multiline": "error",
|
|
@@ -301,8 +291,8 @@ async function javascript(options = {}) {
|
|
|
301
291
|
"no-unsafe-negation": "error",
|
|
302
292
|
"no-unused-expressions": ["error", {
|
|
303
293
|
allowShortCircuit: true,
|
|
304
|
-
|
|
305
|
-
|
|
294
|
+
allowTaggedTemplates: true,
|
|
295
|
+
allowTernary: true
|
|
306
296
|
}],
|
|
307
297
|
"no-unused-vars": ["error", {
|
|
308
298
|
args: "none",
|
|
@@ -310,66 +300,20 @@ async function javascript(options = {}) {
|
|
|
310
300
|
ignoreRestSiblings: true,
|
|
311
301
|
vars: "all"
|
|
312
302
|
}],
|
|
313
|
-
"no-use-before-define": ["error", {
|
|
303
|
+
"no-use-before-define": ["error", { classes: false, functions: false, variables: false }],
|
|
304
|
+
"no-useless-backreference": "error",
|
|
314
305
|
"no-useless-call": "error",
|
|
306
|
+
"no-useless-catch": "error",
|
|
315
307
|
"no-useless-computed-key": "error",
|
|
316
308
|
"no-useless-constructor": "error",
|
|
317
309
|
"no-useless-escape": "error",
|
|
318
310
|
"no-useless-rename": "error",
|
|
319
311
|
"no-useless-return": "error",
|
|
312
|
+
"no-var": "warn",
|
|
320
313
|
"no-void": "error",
|
|
321
314
|
"no-with": "error",
|
|
322
|
-
"object-
|
|
323
|
-
"object-curly-spacing": ["error", "always"],
|
|
324
|
-
"object-property-newline": ["error", { allowMultiplePropertiesPerLine: true }],
|
|
315
|
+
"object-shorthand": ["warn", "properties"],
|
|
325
316
|
"one-var": ["error", { initialized: "never" }],
|
|
326
|
-
"padded-blocks": ["error", { blocks: "never", switches: "never", classes: "never" }],
|
|
327
|
-
"prefer-const": ["error", { destructuring: "all" }],
|
|
328
|
-
"prefer-promise-reject-errors": "error",
|
|
329
|
-
"prefer-regex-literals": ["error", { disallowRedundantWrapping: true }],
|
|
330
|
-
"rest-spread-spacing": ["error", "never"],
|
|
331
|
-
"symbol-description": "error",
|
|
332
|
-
"template-curly-spacing": ["error", "never"],
|
|
333
|
-
"template-tag-spacing": ["error", "never"],
|
|
334
|
-
"unicode-bom": ["error", "never"],
|
|
335
|
-
"use-isnan": ["error", {
|
|
336
|
-
enforceForSwitchCase: true,
|
|
337
|
-
enforceForIndexOf: true
|
|
338
|
-
}],
|
|
339
|
-
"valid-typeof": ["error", { requireStringLiterals: true }],
|
|
340
|
-
"wrap-iife": ["error", "any", { functionPrototypeMethods: true }],
|
|
341
|
-
"yield-star-spacing": ["error", "both"],
|
|
342
|
-
"yoda": ["error", "never"],
|
|
343
|
-
"import/export": "error",
|
|
344
|
-
"import/first": "error",
|
|
345
|
-
"import/no-absolute-path": ["error", { esmodule: true, commonjs: true, amd: false }],
|
|
346
|
-
"import/no-duplicates": "error",
|
|
347
|
-
"import/no-named-default": "error",
|
|
348
|
-
"import/no-webpack-loader-syntax": "error",
|
|
349
|
-
"block-scoped-var": "error",
|
|
350
|
-
"no-alert": "error",
|
|
351
|
-
"no-console": ["error", { allow: ["warn", "error"] }],
|
|
352
|
-
"no-restricted-globals": [
|
|
353
|
-
"error",
|
|
354
|
-
{ message: "Use `globalThis` instead.", name: "global" },
|
|
355
|
-
{ message: "Use `globalThis` instead.", name: "self" }
|
|
356
|
-
],
|
|
357
|
-
"no-restricted-properties": [
|
|
358
|
-
"error",
|
|
359
|
-
{ message: "Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.", property: "__proto__" },
|
|
360
|
-
{ message: "Use `Object.defineProperty` instead.", property: "__defineGetter__" },
|
|
361
|
-
{ message: "Use `Object.defineProperty` instead.", property: "__defineSetter__" },
|
|
362
|
-
{ message: "Use `Object.getOwnPropertyDescriptor` instead.", property: "__lookupGetter__" },
|
|
363
|
-
{ message: "Use `Object.getOwnPropertyDescriptor` instead.", property: "__lookupSetter__" }
|
|
364
|
-
],
|
|
365
|
-
"no-restricted-syntax": [
|
|
366
|
-
"error",
|
|
367
|
-
"DebuggerStatement",
|
|
368
|
-
"LabeledStatement",
|
|
369
|
-
"WithStatement",
|
|
370
|
-
"TSEnumDeclaration[const=true]",
|
|
371
|
-
"TSExportAssignment"
|
|
372
|
-
],
|
|
373
317
|
"prefer-arrow-callback": [
|
|
374
318
|
"error",
|
|
375
319
|
{
|
|
@@ -377,7 +321,10 @@ async function javascript(options = {}) {
|
|
|
377
321
|
allowUnboundThis: true
|
|
378
322
|
}
|
|
379
323
|
],
|
|
324
|
+
"prefer-const": ["error", { destructuring: "all" }],
|
|
380
325
|
"prefer-exponentiation-operator": "error",
|
|
326
|
+
"prefer-promise-reject-errors": "error",
|
|
327
|
+
"prefer-regex-literals": ["error", { disallowRedundantWrapping: true }],
|
|
381
328
|
"prefer-rest-params": "error",
|
|
382
329
|
"prefer-spread": "error",
|
|
383
330
|
"prefer-template": "error",
|
|
@@ -391,13 +338,28 @@ async function javascript(options = {}) {
|
|
|
391
338
|
memberSyntaxSortOrder: ["none", "all", "multiple", "single"]
|
|
392
339
|
}
|
|
393
340
|
],
|
|
341
|
+
"symbol-description": "error",
|
|
342
|
+
"unicode-bom": ["error", "never"],
|
|
394
343
|
"unused-imports/no-unused-imports": isInEditor ? "off" : "error",
|
|
395
344
|
"unused-imports/no-unused-vars": [
|
|
396
345
|
"error",
|
|
397
346
|
{ args: "after-used", argsIgnorePattern: "^_", vars: "all", varsIgnorePattern: "^_" }
|
|
398
347
|
],
|
|
348
|
+
"use-isnan": ["error", {
|
|
349
|
+
enforceForIndexOf: true,
|
|
350
|
+
enforceForSwitchCase: true
|
|
351
|
+
}],
|
|
352
|
+
"valid-typeof": ["error", { requireStringLiterals: true }],
|
|
399
353
|
"vars-on-top": "error",
|
|
354
|
+
"yoda": ["error", "never"],
|
|
400
355
|
...overrides
|
|
356
|
+
},
|
|
357
|
+
settings: {
|
|
358
|
+
env: {
|
|
359
|
+
browser: true,
|
|
360
|
+
es6: true,
|
|
361
|
+
node: true
|
|
362
|
+
}
|
|
401
363
|
}
|
|
402
364
|
},
|
|
403
365
|
{
|
|
@@ -685,38 +647,27 @@ async function node() {
|
|
|
685
647
|
},
|
|
686
648
|
rules: {
|
|
687
649
|
"node/handle-callback-err": ["error", "^(err|error)$"],
|
|
650
|
+
"node/no-callback-literal": "error",
|
|
688
651
|
"node/no-deprecated-api": "error",
|
|
689
652
|
"node/no-exports-assign": "error",
|
|
690
653
|
"node/no-new-require": "error",
|
|
691
654
|
"node/no-path-concat": "error",
|
|
692
655
|
"node/prefer-global/buffer": ["error", "never"],
|
|
693
656
|
"node/prefer-global/process": ["error", "never"],
|
|
694
|
-
"node/process-exit-as-throw": "error"
|
|
695
|
-
"node/no-callback-literal": "error"
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
];
|
|
699
|
-
}
|
|
700
|
-
|
|
701
|
-
async function perfectionist() {
|
|
702
|
-
return [
|
|
703
|
-
{
|
|
704
|
-
name: "curev:perfectionist",
|
|
705
|
-
plugins: {
|
|
706
|
-
perfectionist: pluginPerfectionist
|
|
657
|
+
"node/process-exit-as-throw": "error"
|
|
707
658
|
}
|
|
708
659
|
}
|
|
709
660
|
];
|
|
710
661
|
}
|
|
711
662
|
|
|
712
663
|
const StylisticConfigDefaults = {
|
|
664
|
+
arrowParens: true,
|
|
665
|
+
braceStyle: "1tbs",
|
|
666
|
+
commaDangle: "never",
|
|
713
667
|
indent: 2,
|
|
714
668
|
jsx: true,
|
|
715
669
|
quotes: "double",
|
|
716
|
-
semi: true
|
|
717
|
-
braceStyle: "1tbs",
|
|
718
|
-
commaDangle: "never",
|
|
719
|
-
arrowParens: true
|
|
670
|
+
semi: true
|
|
720
671
|
};
|
|
721
672
|
async function stylistic(options = {}) {
|
|
722
673
|
const mergeOptions = {
|
|
@@ -741,12 +692,40 @@ async function stylistic(options = {}) {
|
|
|
741
692
|
...config.rules,
|
|
742
693
|
"curev/consistent-list-newline": "error",
|
|
743
694
|
"curev/if-newline": "off",
|
|
695
|
+
"curev/max-statements-per-line": ["error", { max: 1 }],
|
|
744
696
|
"curev/top-level-function": "error",
|
|
745
|
-
"semi-spacing": ["error", { before: false, after: true }],
|
|
746
|
-
"style/brace-style": ["error", "1tbs", { allowSingleLine: true }],
|
|
747
697
|
"curly": ["error", "all"],
|
|
698
|
+
"style/brace-style": ["error", "1tbs", { allowSingleLine: true }],
|
|
699
|
+
"style/lines-between-class-members": ["error", "always", { exceptAfterSingleLine: true }],
|
|
748
700
|
"style/max-statements-per-line": ["off"],
|
|
749
|
-
"
|
|
701
|
+
"style/multiline-ternary": ["error", "always-multiline"],
|
|
702
|
+
"style/no-extra-parens": ["error", "functions"],
|
|
703
|
+
"style/no-mixed-operators": ["error", {
|
|
704
|
+
allowSamePrecedence: true,
|
|
705
|
+
groups: [
|
|
706
|
+
["==", "!=", "===", "!==", ">", ">=", "<", "<="],
|
|
707
|
+
["&&", "||"],
|
|
708
|
+
["in", "instanceof"]
|
|
709
|
+
]
|
|
710
|
+
}],
|
|
711
|
+
"style/no-multiple-empty-lines": [
|
|
712
|
+
"error",
|
|
713
|
+
{
|
|
714
|
+
max: 3,
|
|
715
|
+
maxBOF: 0,
|
|
716
|
+
maxEOF: 1
|
|
717
|
+
}
|
|
718
|
+
],
|
|
719
|
+
"style/object-curly-newline": ["error", { consistent: true, multiline: true }],
|
|
720
|
+
"style/object-curly-spacing": ["error", "always"],
|
|
721
|
+
"style/object-property-newline": ["error", { allowMultiplePropertiesPerLine: true }],
|
|
722
|
+
"style/padded-blocks": ["error", { blocks: "never", classes: "never", switches: "never" }],
|
|
723
|
+
"style/rest-spread-spacing": ["error", "never"],
|
|
724
|
+
"style/semi-spacing": ["error", { after: true, before: false }],
|
|
725
|
+
"style/template-curly-spacing": ["error", "never"],
|
|
726
|
+
"style/template-tag-spacing": ["error", "never"],
|
|
727
|
+
"style/wrap-iife": ["error", "any", { functionPrototypeMethods: true }],
|
|
728
|
+
"style/yield-star-spacing": ["error", "both"],
|
|
750
729
|
...overrides
|
|
751
730
|
}
|
|
752
731
|
}
|
|
@@ -967,14 +946,6 @@ async function react(options = {}) {
|
|
|
967
946
|
},
|
|
968
947
|
name: "curev:react:rules",
|
|
969
948
|
rules: {
|
|
970
|
-
// recommended rules react-hooks
|
|
971
|
-
"react-hooks/exhaustive-deps": "warn",
|
|
972
|
-
"react-hooks/rules-of-hooks": "error",
|
|
973
|
-
// react refresh
|
|
974
|
-
"react-refresh/only-export-components": [
|
|
975
|
-
"warn",
|
|
976
|
-
{ allowConstantExport: isAllowConstantExport }
|
|
977
|
-
],
|
|
978
949
|
// recommended rules react
|
|
979
950
|
"react/display-name": "error",
|
|
980
951
|
"react/jsx-key": "error",
|
|
@@ -998,6 +969,14 @@ async function react(options = {}) {
|
|
|
998
969
|
"react/prop-types": "error",
|
|
999
970
|
"react/react-in-jsx-scope": "off",
|
|
1000
971
|
"react/require-render-return": "error",
|
|
972
|
+
// recommended rules react-hooks
|
|
973
|
+
"react-hooks/exhaustive-deps": "warn",
|
|
974
|
+
"react-hooks/rules-of-hooks": "error",
|
|
975
|
+
// react refresh
|
|
976
|
+
"react-refresh/only-export-components": [
|
|
977
|
+
"warn",
|
|
978
|
+
{ allowConstantExport: isAllowConstantExport }
|
|
979
|
+
],
|
|
1001
980
|
...typescript ? {
|
|
1002
981
|
"react/jsx-no-undef": "off",
|
|
1003
982
|
"react/prop-type": "off"
|
|
@@ -1649,8 +1628,6 @@ async function vue(options = {}) {
|
|
|
1649
1628
|
}],
|
|
1650
1629
|
"vue/component-name-in-template-casing": ["error", "PascalCase"],
|
|
1651
1630
|
"vue/component-options-name-casing": ["error", "PascalCase"],
|
|
1652
|
-
// this is deprecated
|
|
1653
|
-
"vue/component-tags-order": "off",
|
|
1654
1631
|
"vue/custom-event-name-casing": ["error", "camelCase"],
|
|
1655
1632
|
"vue/define-macros-order": ["error", {
|
|
1656
1633
|
order: ["defineOptions", "defineProps", "defineEmits", "defineSlots"]
|
|
@@ -1897,9 +1874,7 @@ async function curev(options = {}, ...userConfigs) {
|
|
|
1897
1874
|
imports({
|
|
1898
1875
|
stylistic: stylisticOptions
|
|
1899
1876
|
}),
|
|
1900
|
-
unicorn()
|
|
1901
|
-
// Optional plugins (installed but not enabled by default)
|
|
1902
|
-
perfectionist()
|
|
1877
|
+
unicorn()
|
|
1903
1878
|
);
|
|
1904
1879
|
if (enableVue) {
|
|
1905
1880
|
componentExts.push("vue");
|
|
@@ -2014,4 +1989,4 @@ function getOverrides(options, key) {
|
|
|
2014
1989
|
};
|
|
2015
1990
|
}
|
|
2016
1991
|
|
|
2017
|
-
export { GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, 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_SVELTE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, StylisticConfigDefaults, combine, comments, curev, curev as default, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, javascript, jsdoc, jsonc, markdown, node, parserPlain,
|
|
1992
|
+
export { GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, 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_SVELTE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, StylisticConfigDefaults, combine, comments, curev, curev as default, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, javascript, jsdoc, jsonc, markdown, node, parserPlain, react, renameRules, resolveSubOptions, sortPackageJson, sortTsconfig, stylistic, svelte, test, toArray, toml, typescript, unicorn, unocss, vue, yaml };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@curev/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.7",
|
|
5
5
|
"packageManager": "pnpm@8.6.9",
|
|
6
6
|
"author": "Chizuki<chizukicn@outlook.com> (https://github.com/chizukicn/)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -71,7 +71,6 @@
|
|
|
71
71
|
"eslint-plugin-markdown": "^3.0.1",
|
|
72
72
|
"eslint-plugin-n": "^16.6.2",
|
|
73
73
|
"eslint-plugin-no-only-tests": "^3.1.0",
|
|
74
|
-
"eslint-plugin-perfectionist": "^2.5.0",
|
|
75
74
|
"eslint-plugin-toml": "^0.9.2",
|
|
76
75
|
"eslint-plugin-unicorn": "^50.0.1",
|
|
77
76
|
"eslint-plugin-unused-imports": "^3.0.0",
|
|
@@ -93,6 +92,7 @@
|
|
|
93
92
|
"devDependencies": {
|
|
94
93
|
"@antfu/eslint-plugin-prettier": "^5.0.1-1",
|
|
95
94
|
"@antfu/ni": "^0.21.12",
|
|
95
|
+
"@eslint/config-inspector": "^0.4.1",
|
|
96
96
|
"@stylistic/eslint-plugin-migrate": "^1.5.4",
|
|
97
97
|
"@types/eslint": "^8.56.2",
|
|
98
98
|
"@types/fs-extra": "^11.0.4",
|
|
@@ -136,7 +136,8 @@
|
|
|
136
136
|
"build": "unbuild",
|
|
137
137
|
"stub": "unbuild --stub",
|
|
138
138
|
"lint": "eslint --cache .",
|
|
139
|
-
"test": "
|
|
140
|
-
"bump": "bumpp --commit --push --tag"
|
|
139
|
+
"test": "vitest",
|
|
140
|
+
"bump": "bumpp --commit --push --tag",
|
|
141
|
+
"inspect": "npx @eslint/config-inspector"
|
|
141
142
|
}
|
|
142
143
|
}
|