@coderwyd/eslint-config 4.0.1 → 4.1.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/cli.js +11 -11
- package/dist/index.d.ts +86 -4
- package/dist/index.js +29 -11
- package/package.json +17 -16
package/dist/cli.js
CHANGED
|
@@ -8,30 +8,30 @@ import { hideBin } from "yargs/helpers";
|
|
|
8
8
|
import c from "picocolors";
|
|
9
9
|
|
|
10
10
|
// package.json
|
|
11
|
-
var version = "4.
|
|
11
|
+
var version = "4.1.1";
|
|
12
12
|
var devDependencies = {
|
|
13
13
|
"@antfu/ni": "^23.3.1",
|
|
14
|
-
"@eslint-react/eslint-plugin": "^1.
|
|
15
|
-
"@eslint/config-inspector": "^1.0.
|
|
14
|
+
"@eslint-react/eslint-plugin": "^1.29.0",
|
|
15
|
+
"@eslint/config-inspector": "^1.0.1",
|
|
16
16
|
"@types/eslint-config-prettier": "^6.11.3",
|
|
17
|
-
"@types/node": "^22.13.
|
|
17
|
+
"@types/node": "^22.13.8",
|
|
18
18
|
"@types/prompts": "^2.4.9",
|
|
19
19
|
"@types/yargs": "^17.0.33",
|
|
20
|
-
"@unocss/eslint-plugin": "^66.0.
|
|
20
|
+
"@unocss/eslint-plugin": "^66.1.0-beta.3",
|
|
21
21
|
bumpp: "^10.0.3",
|
|
22
22
|
eslint: "^9.21.0",
|
|
23
23
|
"eslint-plugin-react-compiler": "19.0.0-beta-e552027-20250112",
|
|
24
|
-
"eslint-plugin-react-hooks": "^5.
|
|
24
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
25
25
|
"eslint-plugin-react-refresh": "^0.4.19",
|
|
26
|
-
"eslint-plugin-svelte": "^
|
|
26
|
+
"eslint-plugin-svelte": "^3.0.2",
|
|
27
27
|
"eslint-plugin-tailwindcss": "^3.18.0",
|
|
28
28
|
jiti: "^2.4.2",
|
|
29
29
|
"nano-staged": "^0.8.0",
|
|
30
30
|
"simple-git-hooks": "^2.11.1",
|
|
31
|
-
svelte: "^5.20.
|
|
32
|
-
"svelte-eslint-parser": "^0.
|
|
33
|
-
tsup: "^8.
|
|
34
|
-
typescript: "^5.
|
|
31
|
+
svelte: "^5.20.5",
|
|
32
|
+
"svelte-eslint-parser": "^1.0.0",
|
|
33
|
+
tsup: "^8.4.0",
|
|
34
|
+
typescript: "^5.8.2"
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
// src/cli/constants.ts
|
package/dist/index.d.ts
CHANGED
|
@@ -199,6 +199,16 @@ interface RuleOptions {
|
|
|
199
199
|
* @see https://eslint.org/docs/latest/rules/curly
|
|
200
200
|
*/
|
|
201
201
|
'curly'?: Linter.RuleEntry<Curly>
|
|
202
|
+
/**
|
|
203
|
+
* Transforms the negation of a conjunction !(A && B) into the equivalent !A || !B according to De Morgan’s law
|
|
204
|
+
* @see https://github.com/azat-io/eslint-plugin-de-morgan/blob/main/docs/no-negated-conjunction.md
|
|
205
|
+
*/
|
|
206
|
+
'de-morgan/no-negated-conjunction'?: Linter.RuleEntry<[]>
|
|
207
|
+
/**
|
|
208
|
+
* Transforms the negation of a disjunction !(A || B) into the equivalent !A && !B according to De Morgan’s law
|
|
209
|
+
* @see https://github.com/azat-io/eslint-plugin-de-morgan/blob/main/docs/no-negated-disjunction.md
|
|
210
|
+
*/
|
|
211
|
+
'de-morgan/no-negated-disjunction'?: Linter.RuleEntry<[]>
|
|
202
212
|
/**
|
|
203
213
|
* Require `default` cases in `switch` statements
|
|
204
214
|
* @see https://eslint.org/docs/latest/rules/default-case
|
|
@@ -2551,6 +2561,11 @@ interface RuleOptions {
|
|
|
2551
2561
|
* @see https://eslint-react.xyz/docs/rules/dom-no-find-dom-node
|
|
2552
2562
|
*/
|
|
2553
2563
|
'react-dom/no-find-dom-node'?: Linter.RuleEntry<[]>
|
|
2564
|
+
/**
|
|
2565
|
+
* warns against using `flushSync`
|
|
2566
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-flush-sync
|
|
2567
|
+
*/
|
|
2568
|
+
'react-dom/no-flush-sync'?: Linter.RuleEntry<[]>
|
|
2554
2569
|
/**
|
|
2555
2570
|
* enforce that button component have an explicit 'type' attribute
|
|
2556
2571
|
* @see https://eslint-react.xyz/docs/rules/dom-no-missing-button-type
|
|
@@ -2661,6 +2676,11 @@ interface RuleOptions {
|
|
|
2661
2676
|
* @see https://eslint-react.xyz/docs/rules/naming-convention-component-name
|
|
2662
2677
|
*/
|
|
2663
2678
|
'react-naming-convention/component-name'?: Linter.RuleEntry<ReactNamingConventionComponentName>
|
|
2679
|
+
/**
|
|
2680
|
+
* enforce context name to end with `Context`.
|
|
2681
|
+
* @see https://eslint-react.xyz/docs/rules/naming-convention-context-name
|
|
2682
|
+
*/
|
|
2683
|
+
'react-naming-convention/context-name'?: Linter.RuleEntry<[]>
|
|
2664
2684
|
/**
|
|
2665
2685
|
* enforce naming convention for JSX filenames
|
|
2666
2686
|
* @see https://eslint-react.xyz/docs/rules/naming-convention-filename
|
|
@@ -3503,6 +3523,11 @@ interface RuleOptions {
|
|
|
3503
3523
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/comment-directive/
|
|
3504
3524
|
*/
|
|
3505
3525
|
'svelte/comment-directive'?: Linter.RuleEntry<SvelteCommentDirective>
|
|
3526
|
+
/**
|
|
3527
|
+
* enforce a consistent style for CSS selectors
|
|
3528
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/consistent-selector-style/
|
|
3529
|
+
*/
|
|
3530
|
+
'svelte/consistent-selector-style'?: Linter.RuleEntry<SvelteConsistentSelectorStyle>
|
|
3506
3531
|
/**
|
|
3507
3532
|
* derived store should use same variable names between values and callback
|
|
3508
3533
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/derived-has-same-inputs-outputs/
|
|
@@ -3601,6 +3626,7 @@ interface RuleOptions {
|
|
|
3601
3626
|
/**
|
|
3602
3627
|
* disallow dynamic slot name
|
|
3603
3628
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-dynamic-slot-name/
|
|
3629
|
+
* @deprecated
|
|
3604
3630
|
*/
|
|
3605
3631
|
'svelte/no-dynamic-slot-name'?: Linter.RuleEntry<[]>
|
|
3606
3632
|
/**
|
|
@@ -3616,6 +3642,7 @@ interface RuleOptions {
|
|
|
3616
3642
|
/**
|
|
3617
3643
|
* disallow using goto() without the base path
|
|
3618
3644
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-goto-without-base/
|
|
3645
|
+
* @deprecated
|
|
3619
3646
|
*/
|
|
3620
3647
|
'svelte/no-goto-without-base'?: Linter.RuleEntry<[]>
|
|
3621
3648
|
/**
|
|
@@ -3643,6 +3670,11 @@ interface RuleOptions {
|
|
|
3643
3670
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-inspect/
|
|
3644
3671
|
*/
|
|
3645
3672
|
'svelte/no-inspect'?: Linter.RuleEntry<[]>
|
|
3673
|
+
/**
|
|
3674
|
+
* disallow using navigation (links, goto, pushState, replaceState) without the base path
|
|
3675
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-navigation-without-base/
|
|
3676
|
+
*/
|
|
3677
|
+
'svelte/no-navigation-without-base'?: Linter.RuleEntry<SvelteNoNavigationWithoutBase>
|
|
3646
3678
|
/**
|
|
3647
3679
|
* disallow use of not function in event handler
|
|
3648
3680
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-not-function-handler/
|
|
@@ -3653,6 +3685,11 @@ interface RuleOptions {
|
|
|
3653
3685
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-object-in-text-mustaches/
|
|
3654
3686
|
*/
|
|
3655
3687
|
'svelte/no-object-in-text-mustaches'?: Linter.RuleEntry<[]>
|
|
3688
|
+
/**
|
|
3689
|
+
* Checks for invalid raw HTML elements
|
|
3690
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-raw-special-elements/
|
|
3691
|
+
*/
|
|
3692
|
+
'svelte/no-raw-special-elements'?: Linter.RuleEntry<[]>
|
|
3656
3693
|
/**
|
|
3657
3694
|
* it's not necessary to define functions in reactive statements
|
|
3658
3695
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-reactive-functions/
|
|
@@ -3718,6 +3755,11 @@ interface RuleOptions {
|
|
|
3718
3755
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-unused-svelte-ignore/
|
|
3719
3756
|
*/
|
|
3720
3757
|
'svelte/no-unused-svelte-ignore'?: Linter.RuleEntry<[]>
|
|
3758
|
+
/**
|
|
3759
|
+
* disallow explicit children snippet where it's not needed
|
|
3760
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-useless-children-snippet/
|
|
3761
|
+
*/
|
|
3762
|
+
'svelte/no-useless-children-snippet'?: Linter.RuleEntry<[]>
|
|
3721
3763
|
/**
|
|
3722
3764
|
* disallow unnecessary mustache interpolations
|
|
3723
3765
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-useless-mustaches/
|
|
@@ -3728,6 +3770,11 @@ interface RuleOptions {
|
|
|
3728
3770
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-class-directive/
|
|
3729
3771
|
*/
|
|
3730
3772
|
'svelte/prefer-class-directive'?: Linter.RuleEntry<SveltePreferClassDirective>
|
|
3773
|
+
/**
|
|
3774
|
+
* Require `const` declarations for variables that are never reassigned after declared
|
|
3775
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-const/
|
|
3776
|
+
*/
|
|
3777
|
+
'svelte/prefer-const'?: Linter.RuleEntry<SveltePreferConst>
|
|
3731
3778
|
/**
|
|
3732
3779
|
* destructure values from object stores for better change tracking & fewer redraws
|
|
3733
3780
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-destructured-store-props/
|
|
@@ -3808,6 +3855,11 @@ interface RuleOptions {
|
|
|
3808
3855
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/valid-prop-names-in-kit-pages/
|
|
3809
3856
|
*/
|
|
3810
3857
|
'svelte/valid-prop-names-in-kit-pages'?: Linter.RuleEntry<[]>
|
|
3858
|
+
/**
|
|
3859
|
+
* require valid style element parsing
|
|
3860
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/valid-style-parse/
|
|
3861
|
+
*/
|
|
3862
|
+
'svelte/valid-style-parse'?: Linter.RuleEntry<[]>
|
|
3811
3863
|
/**
|
|
3812
3864
|
* Enforce spacing around colons of switch statements
|
|
3813
3865
|
* @see https://eslint.org/docs/latest/rules/switch-colon-spacing
|
|
@@ -9126,7 +9178,18 @@ type NodeNoRestrictedRequire = []|[(string | {
|
|
|
9126
9178
|
// ----- node/no-sync -----
|
|
9127
9179
|
type NodeNoSync = []|[{
|
|
9128
9180
|
allowAtRootLevel?: boolean
|
|
9129
|
-
ignores?: string
|
|
9181
|
+
ignores?: (string | {
|
|
9182
|
+
from?: "file"
|
|
9183
|
+
path?: string
|
|
9184
|
+
name?: string[]
|
|
9185
|
+
} | {
|
|
9186
|
+
from?: "lib"
|
|
9187
|
+
name?: string[]
|
|
9188
|
+
} | {
|
|
9189
|
+
from?: "package"
|
|
9190
|
+
package?: string
|
|
9191
|
+
name?: string[]
|
|
9192
|
+
})[]
|
|
9130
9193
|
}]
|
|
9131
9194
|
// ----- node/no-unpublished-bin -----
|
|
9132
9195
|
type NodeNoUnpublishedBin = []|[{
|
|
@@ -11386,6 +11449,12 @@ type SvelteButtonHasType = []|[{
|
|
|
11386
11449
|
type SvelteCommentDirective = []|[{
|
|
11387
11450
|
reportUnusedDisableDirectives?: boolean
|
|
11388
11451
|
}]
|
|
11452
|
+
// ----- svelte/consistent-selector-style -----
|
|
11453
|
+
type SvelteConsistentSelectorStyle = []|[{
|
|
11454
|
+
checkGlobal?: boolean
|
|
11455
|
+
|
|
11456
|
+
style?: []|[("class" | "id" | "type")]|[("class" | "id" | "type"), ("class" | "id" | "type")]|[("class" | "id" | "type"), ("class" | "id" | "type"), ("class" | "id" | "type")]
|
|
11457
|
+
}]
|
|
11389
11458
|
// ----- svelte/first-attribute-linebreak -----
|
|
11390
11459
|
type SvelteFirstAttributeLinebreak = []|[{
|
|
11391
11460
|
multiline?: ("below" | "beside")
|
|
@@ -11418,7 +11487,8 @@ type SvelteHtmlQuotes = []|[{
|
|
|
11418
11487
|
type SvelteHtmlSelfClosing = []|[({
|
|
11419
11488
|
void?: ("never" | "always" | "ignore")
|
|
11420
11489
|
normal?: ("never" | "always" | "ignore")
|
|
11421
|
-
|
|
11490
|
+
svg?: ("never" | "always" | "ignore")
|
|
11491
|
+
math?: ("never" | "always" | "ignore")
|
|
11422
11492
|
component?: ("never" | "always" | "ignore")
|
|
11423
11493
|
svelte?: ("never" | "always" | "ignore")
|
|
11424
11494
|
} | ("all" | "html" | "none"))]
|
|
@@ -11457,6 +11527,13 @@ type SvelteNoInlineStyles = []|[{
|
|
|
11457
11527
|
type SvelteNoInnerDeclarations = []|[("functions" | "both")]|[("functions" | "both"), {
|
|
11458
11528
|
blockScopedFunctions?: ("allow" | "disallow")
|
|
11459
11529
|
}]
|
|
11530
|
+
// ----- svelte/no-navigation-without-base -----
|
|
11531
|
+
type SvelteNoNavigationWithoutBase = []|[{
|
|
11532
|
+
ignoreGoto?: boolean
|
|
11533
|
+
ignoreLinks?: boolean
|
|
11534
|
+
ignorePushState?: boolean
|
|
11535
|
+
ignoreReplaceState?: boolean
|
|
11536
|
+
}]
|
|
11460
11537
|
// ----- svelte/no-reactive-reassign -----
|
|
11461
11538
|
type SvelteNoReactiveReassign = []|[{
|
|
11462
11539
|
props?: boolean
|
|
@@ -11500,6 +11577,11 @@ type SvelteNoUselessMustaches = []|[{
|
|
|
11500
11577
|
type SveltePreferClassDirective = []|[{
|
|
11501
11578
|
prefer?: ("always" | "empty")
|
|
11502
11579
|
}]
|
|
11580
|
+
// ----- svelte/prefer-const -----
|
|
11581
|
+
type SveltePreferConst = []|[{
|
|
11582
|
+
destructuring?: ("any" | "all")
|
|
11583
|
+
ignoreReadBeforeAssign?: boolean
|
|
11584
|
+
}]
|
|
11503
11585
|
// ----- svelte/shorthand-attribute -----
|
|
11504
11586
|
type SvelteShorthandAttribute = []|[{
|
|
11505
11587
|
prefer?: ("always" | "never")
|
|
@@ -14336,7 +14418,7 @@ type Yoda = []|[("always" | "never")]|[("always" | "never"), {
|
|
|
14336
14418
|
onlyEquality?: boolean
|
|
14337
14419
|
}]
|
|
14338
14420
|
// Names of all the configs
|
|
14339
|
-
type ConfigNames = 'coderwyd/eslint-comments/rules' | 'coderwyd/imports/rules' | 'coderwyd/javascript/setup' | 'coderwyd/javascript/rules' | 'coderwyd/jsdoc/rules' | 'coderwyd/jsonc/setup' | 'coderwyd/jsonc/rules' | 'coderwyd/node/rules' | 'coderwyd/perfectionist/rules' | 'coderwyd/react/setup' | 'coderwyd/react/rules' | 'coderwyd/sort/package-json' | 'coderwyd/svelte/setup' | 'coderwyd/svelte/rules' | 'coderwyd/test/setup' | 'coderwyd/test/rules' | 'coderwyd/prettier/rules' | 'coderwyd/typescript/setup' | 'coderwyd/typescript/parser' | 'coderwyd/typescript/rules' | 'coderwyd/unicorn/rules' | 'coderwyd/unocss/rules' | 'coderwyd/vue/rules' | 'coderwyd/command/rules' | 'coderwyd/regexp/rules' | 'coderwyd/tailwindcss/rules'
|
|
14421
|
+
type ConfigNames = 'coderwyd/eslint-comments/rules' | 'coderwyd/imports/rules' | 'coderwyd/javascript/setup' | 'coderwyd/javascript/rules' | 'coderwyd/jsdoc/rules' | 'coderwyd/jsonc/setup' | 'coderwyd/jsonc/rules' | 'coderwyd/node/rules' | 'coderwyd/perfectionist/rules' | 'coderwyd/react/setup' | 'coderwyd/react/rules' | 'coderwyd/sort/package-json' | 'coderwyd/svelte/setup' | 'coderwyd/svelte/rules' | 'coderwyd/test/setup' | 'coderwyd/test/rules' | 'coderwyd/prettier/rules' | 'coderwyd/typescript/setup' | 'coderwyd/typescript/parser' | 'coderwyd/typescript/rules' | 'coderwyd/unicorn/rules' | 'coderwyd/unocss/rules' | 'coderwyd/vue/rules' | 'coderwyd/command/rules' | 'coderwyd/regexp/rules' | 'coderwyd/tailwindcss/rules' | 'coderwyd/de-morgan/rules'
|
|
14340
14422
|
|
|
14341
14423
|
type Rules = RuleOptions;
|
|
14342
14424
|
|
|
@@ -14569,7 +14651,7 @@ declare function interopDefault<T>(m: Awaitable<T>): Promise<T extends {
|
|
|
14569
14651
|
} ? U : T>;
|
|
14570
14652
|
declare function isPackageInScope(name: string): boolean;
|
|
14571
14653
|
declare function ensurePackages(packages: string[]): Promise<void>;
|
|
14572
|
-
declare function resolveSubOptions<K extends keyof OptionsConfig>(options: OptionsConfig, key: K): ResolvedOptions<OptionsConfig[K]
|
|
14654
|
+
declare function resolveSubOptions<K extends keyof OptionsConfig>(options: OptionsConfig, key: K): Partial<ResolvedOptions<OptionsConfig[K]>>;
|
|
14573
14655
|
declare function getOverrides<K extends keyof OptionsConfig>(options: OptionsConfig, key: K): Partial<Linter.RulesRecord & RuleOptions>;
|
|
14574
14656
|
declare function isInEditorEnv(): boolean;
|
|
14575
14657
|
declare function isInGitHooksOrLintStaged(): boolean;
|
package/dist/index.js
CHANGED
|
@@ -12,11 +12,12 @@ function command() {
|
|
|
12
12
|
// src/plugins/index.ts
|
|
13
13
|
import { default as default2 } from "@eslint-community/eslint-plugin-eslint-comments";
|
|
14
14
|
import { default as default3 } from "eslint-plugin-antfu";
|
|
15
|
+
import { default as default4 } from "eslint-plugin-de-morgan";
|
|
15
16
|
import * as pluginImport from "eslint-plugin-import-x";
|
|
16
|
-
import { default as
|
|
17
|
-
import { default as
|
|
18
|
-
import { default as
|
|
19
|
-
import { default as
|
|
17
|
+
import { default as default5 } from "eslint-plugin-n";
|
|
18
|
+
import { default as default6 } from "eslint-plugin-perfectionist";
|
|
19
|
+
import { default as default7 } from "eslint-plugin-unicorn";
|
|
20
|
+
import { default as default8 } from "eslint-plugin-unused-imports";
|
|
20
21
|
|
|
21
22
|
// src/configs/comments.ts
|
|
22
23
|
function comments() {
|
|
@@ -36,6 +37,22 @@ function comments() {
|
|
|
36
37
|
];
|
|
37
38
|
}
|
|
38
39
|
|
|
40
|
+
// src/configs/de-morgan.ts
|
|
41
|
+
function deMorgan() {
|
|
42
|
+
return [
|
|
43
|
+
{
|
|
44
|
+
name: "coderwyd/de-morgan/rules",
|
|
45
|
+
plugins: {
|
|
46
|
+
"de-morgan": default4
|
|
47
|
+
},
|
|
48
|
+
rules: {
|
|
49
|
+
"de-morgan/no-negated-conjunction": "error",
|
|
50
|
+
"de-morgan/no-negated-disjunction": "error"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
];
|
|
54
|
+
}
|
|
55
|
+
|
|
39
56
|
// src/constants/glob.ts
|
|
40
57
|
var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
41
58
|
var GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
|
|
@@ -159,7 +176,7 @@ function javascript(options = {}) {
|
|
|
159
176
|
{
|
|
160
177
|
name: "coderwyd/javascript/rules",
|
|
161
178
|
plugins: {
|
|
162
|
-
"unused-imports":
|
|
179
|
+
"unused-imports": default8
|
|
163
180
|
},
|
|
164
181
|
rules: {
|
|
165
182
|
"accessor-pairs": [
|
|
@@ -436,9 +453,9 @@ function resolveSubOptions(options, key) {
|
|
|
436
453
|
return typeof options[key] === "boolean" ? {} : options[key] || {};
|
|
437
454
|
}
|
|
438
455
|
function getOverrides(options, key) {
|
|
439
|
-
const
|
|
456
|
+
const subOptions = resolveSubOptions(options, key);
|
|
440
457
|
return {
|
|
441
|
-
..."overrides" in
|
|
458
|
+
..."overrides" in subOptions && subOptions.overrides ? subOptions.overrides : {}
|
|
442
459
|
};
|
|
443
460
|
}
|
|
444
461
|
function isInEditorEnv() {
|
|
@@ -540,7 +557,7 @@ function node() {
|
|
|
540
557
|
{
|
|
541
558
|
name: "coderwyd/node/rules",
|
|
542
559
|
plugins: {
|
|
543
|
-
node:
|
|
560
|
+
node: default5
|
|
544
561
|
},
|
|
545
562
|
rules: {
|
|
546
563
|
"node/handle-callback-err": ["error", "^(err|error)$"],
|
|
@@ -563,7 +580,7 @@ function perfectionist() {
|
|
|
563
580
|
{
|
|
564
581
|
name: "coderwyd/perfectionist/rules",
|
|
565
582
|
plugins: {
|
|
566
|
-
perfectionist:
|
|
583
|
+
perfectionist: default6
|
|
567
584
|
},
|
|
568
585
|
rules: {
|
|
569
586
|
"perfectionist/sort-exports": [
|
|
@@ -1438,7 +1455,7 @@ function unicorn() {
|
|
|
1438
1455
|
{
|
|
1439
1456
|
name: "coderwyd/unicorn/rules",
|
|
1440
1457
|
plugins: {
|
|
1441
|
-
unicorn:
|
|
1458
|
+
unicorn: default7
|
|
1442
1459
|
},
|
|
1443
1460
|
rules: {
|
|
1444
1461
|
// 'unicorn/better-regex': 'error',
|
|
@@ -1758,8 +1775,9 @@ async function defineConfig(options = {}, ...userConfigs) {
|
|
|
1758
1775
|
imports(),
|
|
1759
1776
|
unicorn(),
|
|
1760
1777
|
command(),
|
|
1761
|
-
|
|
1778
|
+
deMorgan(),
|
|
1762
1779
|
perfectionist()
|
|
1780
|
+
// Optional plugins (installed but not enabled by default)
|
|
1763
1781
|
);
|
|
1764
1782
|
if (enableVue) componentExts.push("vue");
|
|
1765
1783
|
if (enableTypeScript) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coderwyd/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.1.1",
|
|
5
5
|
"description": "Donny's ESLint config",
|
|
6
6
|
"author": "Donny Wang <donny526@outlook.com> (https://github.com/coderwyd/)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -71,16 +71,17 @@
|
|
|
71
71
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
|
|
72
72
|
"@typescript-eslint/eslint-plugin": "^8.25.0",
|
|
73
73
|
"@typescript-eslint/parser": "^8.25.0",
|
|
74
|
-
"@vitest/eslint-plugin": "^1.1.
|
|
74
|
+
"@vitest/eslint-plugin": "^1.1.36",
|
|
75
75
|
"eslint-config-flat-gitignore": "^2.1.0",
|
|
76
|
-
"eslint-config-prettier": "^10.0.
|
|
76
|
+
"eslint-config-prettier": "^10.0.2",
|
|
77
77
|
"eslint-plugin-antfu": "^3.1.0",
|
|
78
78
|
"eslint-plugin-command": "^3.1.0",
|
|
79
|
+
"eslint-plugin-de-morgan": "^1.2.0",
|
|
79
80
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
80
81
|
"eslint-plugin-import-x": "^4.6.1",
|
|
81
82
|
"eslint-plugin-jsdoc": "^50.6.3",
|
|
82
83
|
"eslint-plugin-jsonc": "^2.19.1",
|
|
83
|
-
"eslint-plugin-n": "^17.
|
|
84
|
+
"eslint-plugin-n": "^17.16.1",
|
|
84
85
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
85
86
|
"eslint-plugin-perfectionist": "^4.9.0",
|
|
86
87
|
"eslint-plugin-regexp": "^2.7.0",
|
|
@@ -90,37 +91,37 @@
|
|
|
90
91
|
"eslint-typegen": "^2.0.0",
|
|
91
92
|
"globals": "^16.0.0",
|
|
92
93
|
"jsonc-eslint-parser": "^2.4.0",
|
|
93
|
-
"local-pkg": "^1.
|
|
94
|
+
"local-pkg": "^1.1.0",
|
|
94
95
|
"parse-gitignore": "^2.0.0",
|
|
95
96
|
"picocolors": "^1.1.1",
|
|
96
|
-
"prettier": "^3.5.
|
|
97
|
+
"prettier": "^3.5.3",
|
|
97
98
|
"prompts": "^2.4.2",
|
|
98
99
|
"vue-eslint-parser": "^9.4.3",
|
|
99
100
|
"yargs": "^17.7.2"
|
|
100
101
|
},
|
|
101
102
|
"devDependencies": {
|
|
102
103
|
"@antfu/ni": "^23.3.1",
|
|
103
|
-
"@eslint-react/eslint-plugin": "^1.
|
|
104
|
-
"@eslint/config-inspector": "^1.0.
|
|
104
|
+
"@eslint-react/eslint-plugin": "^1.29.0",
|
|
105
|
+
"@eslint/config-inspector": "^1.0.1",
|
|
105
106
|
"@types/eslint-config-prettier": "^6.11.3",
|
|
106
|
-
"@types/node": "^22.13.
|
|
107
|
+
"@types/node": "^22.13.8",
|
|
107
108
|
"@types/prompts": "^2.4.9",
|
|
108
109
|
"@types/yargs": "^17.0.33",
|
|
109
|
-
"@unocss/eslint-plugin": "^66.0.
|
|
110
|
+
"@unocss/eslint-plugin": "^66.1.0-beta.3",
|
|
110
111
|
"bumpp": "^10.0.3",
|
|
111
112
|
"eslint": "^9.21.0",
|
|
112
113
|
"eslint-plugin-react-compiler": "19.0.0-beta-e552027-20250112",
|
|
113
|
-
"eslint-plugin-react-hooks": "^5.
|
|
114
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
114
115
|
"eslint-plugin-react-refresh": "^0.4.19",
|
|
115
|
-
"eslint-plugin-svelte": "^
|
|
116
|
+
"eslint-plugin-svelte": "^3.0.2",
|
|
116
117
|
"eslint-plugin-tailwindcss": "^3.18.0",
|
|
117
118
|
"jiti": "^2.4.2",
|
|
118
119
|
"nano-staged": "^0.8.0",
|
|
119
120
|
"simple-git-hooks": "^2.11.1",
|
|
120
|
-
"svelte": "^5.20.
|
|
121
|
-
"svelte-eslint-parser": "^0.
|
|
122
|
-
"tsup": "^8.
|
|
123
|
-
"typescript": "^5.
|
|
121
|
+
"svelte": "^5.20.5",
|
|
122
|
+
"svelte-eslint-parser": "^1.0.0",
|
|
123
|
+
"tsup": "^8.4.0",
|
|
124
|
+
"typescript": "^5.8.2"
|
|
124
125
|
},
|
|
125
126
|
"simple-git-hooks": {
|
|
126
127
|
"pre-commit": "pnpm exec nano-staged"
|