@ethang/eslint-config 19.11.2 → 19.11.4
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/README.md +2 -2
- package/eslint.config.js +10 -10
- package/package.json +7 -7
- package/setup/deprecated.ts +8 -95
- package/setup/lodash.ts +10 -10
package/README.md
CHANGED
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
> [!CAUTION]
|
|
6
6
|
> Do not use this with Prettier! Styling rules are included.
|
|
7
7
|
|
|
8
|
-
-
|
|
8
|
+
- 885 errored rules.
|
|
9
9
|
- 294 rules from [eslint-plugin-sonarjs](https://github.com/SonarSource/SonarJS/blob/master/packages/jsts/src/rules/README.md)
|
|
10
10
|
- 144 rules from [@eslint/js](https://github.com/eslint/eslint/tree/main/packages/js)
|
|
11
11
|
- 116 rules from [sindresorhus/eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn)
|
|
12
12
|
- 103 rules from [@typescript/eslint](https://github.com/typescript-eslint/typescript-eslint)
|
|
13
13
|
- 68 rules from [@stylistic/eslint-plugin](https://eslint.style/)
|
|
14
|
-
- 42 rules from [eslint-plugin-lodash](https://github.com/wix-incubator/eslint-plugin-lodash)
|
|
15
14
|
- 34 rules from [jsx-a11y](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y)
|
|
15
|
+
- 32 rules from [eslint-plugin-lodash](https://github.com/wix-incubator/eslint-plugin-lodash)
|
|
16
16
|
- 25 rules from [@stylistic/eslint-plugin-ts](https://eslint.style/)
|
|
17
17
|
- 20 rules from [eslint-plugin-n](https://github.com/eslint-community/eslint-plugin-n)
|
|
18
18
|
- 20 rules from [eslint-plugin-perfectionist](https://github.com/azat-io/eslint-plugin-perfectionist)
|
package/eslint.config.js
CHANGED
|
@@ -590,21 +590,21 @@ export default tseslint.config(
|
|
|
590
590
|
"unicorn/text-encoding-identifier-case": "error",
|
|
591
591
|
"unicorn/throw-new-error": "error",
|
|
592
592
|
"lodash/callback-binding": "error",
|
|
593
|
-
"lodash/chain-style": [
|
|
593
|
+
"lodash/chain-style": [2, "as-needed"],
|
|
594
594
|
"lodash/chaining": "error",
|
|
595
595
|
"lodash/collection-method-value": "error",
|
|
596
596
|
"lodash/collection-ordering": "error",
|
|
597
597
|
"lodash/collection-return": "error",
|
|
598
|
-
"lodash/consistent-compose": [
|
|
599
|
-
"lodash/identity-shorthand": [
|
|
600
|
-
"lodash/import-scope": [
|
|
601
|
-
"lodash/matches-prop-shorthand": [
|
|
602
|
-
"lodash/matches-shorthand": [
|
|
598
|
+
"lodash/consistent-compose": [2, "flow"],
|
|
599
|
+
"lodash/identity-shorthand": [2, "always"],
|
|
600
|
+
"lodash/import-scope": [2, "method"],
|
|
601
|
+
"lodash/matches-prop-shorthand": [2, "always"],
|
|
602
|
+
"lodash/matches-shorthand": [2, "always", 3],
|
|
603
603
|
"lodash/no-commit": "error",
|
|
604
604
|
"lodash/no-double-unwrap": "error",
|
|
605
605
|
"lodash/no-extra-args": "error",
|
|
606
606
|
"lodash/no-unbound-this": "error",
|
|
607
|
-
"lodash/path-style": [
|
|
607
|
+
"lodash/path-style": [2, "array"],
|
|
608
608
|
"lodash/prefer-compact": "error",
|
|
609
609
|
"lodash/prefer-constant": "error",
|
|
610
610
|
"lodash/prefer-filter": "error",
|
|
@@ -612,7 +612,7 @@ export default tseslint.config(
|
|
|
612
612
|
"lodash/prefer-flat-map": "error",
|
|
613
613
|
"lodash/prefer-get": "error",
|
|
614
614
|
"lodash/prefer-immutable-method": "error",
|
|
615
|
-
"lodash/prefer-includes": [
|
|
615
|
+
"lodash/prefer-includes": [2, { includeNative: true }],
|
|
616
616
|
"lodash/prefer-invoke-map": "error",
|
|
617
617
|
"lodash/prefer-is-nil": "error",
|
|
618
618
|
"lodash/prefer-lodash-chain": "error",
|
|
@@ -623,13 +623,13 @@ export default tseslint.config(
|
|
|
623
623
|
"lodash/prefer-noop": "error",
|
|
624
624
|
"lodash/prefer-over-quantifier": "error",
|
|
625
625
|
"lodash/prefer-reject": "error",
|
|
626
|
-
"lodash/prefer-some": [
|
|
626
|
+
"lodash/prefer-some": [2, { includeNative: true }],
|
|
627
627
|
"lodash/prefer-startswith": "error",
|
|
628
628
|
"lodash/prefer-thru": "error",
|
|
629
629
|
"lodash/prefer-times": "error",
|
|
630
630
|
"lodash/prefer-wrapper-method": "error",
|
|
631
631
|
"lodash/preferred-alias": "error",
|
|
632
|
-
"lodash/prop-shorthand": [
|
|
632
|
+
"lodash/prop-shorthand": [2, "always"],
|
|
633
633
|
"lodash/unwrap": "error",
|
|
634
634
|
"sonar/accessor-pairs": "error",
|
|
635
635
|
"sonar/alt-text": "error",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethang/eslint-config",
|
|
3
|
-
"version": "19.11.
|
|
3
|
+
"version": "19.11.4",
|
|
4
4
|
"repository": {
|
|
5
5
|
"url": "git+https://github.com/eglove/eslint-config-ethang.git"
|
|
6
6
|
},
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"@eslint/markdown": "^6.2.0",
|
|
22
22
|
"@stylistic/eslint-plugin": "^2.9.0",
|
|
23
23
|
"@stylistic/eslint-plugin-ts": "^2.9.0",
|
|
24
|
-
"@tanstack/eslint-plugin-query": "^5.59.
|
|
24
|
+
"@tanstack/eslint-plugin-query": "^5.59.7",
|
|
25
25
|
"@tanstack/eslint-plugin-router": "^1.63.4",
|
|
26
26
|
"@typescript-eslint/parser": "^8.8.1",
|
|
27
27
|
"eslint": "^9.12.0",
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
"eslint-plugin-depend": "^0.11.0",
|
|
32
32
|
"eslint-plugin-jsx-a11y": "^6.10.0",
|
|
33
33
|
"eslint-plugin-lodash": "^8.0.0",
|
|
34
|
-
"eslint-plugin-n": "^17.
|
|
34
|
+
"eslint-plugin-n": "^17.11.1",
|
|
35
35
|
"eslint-plugin-perfectionist": "^3.8.0",
|
|
36
36
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
37
37
|
"eslint-plugin-solid": "^0.14.3",
|
|
38
38
|
"eslint-plugin-sonarjs": "2.0.3",
|
|
39
|
-
"eslint-plugin-tailwindcss": "^3.17.
|
|
39
|
+
"eslint-plugin-tailwindcss": "^3.17.5",
|
|
40
40
|
"eslint-plugin-unicorn": "^56.0.0",
|
|
41
41
|
"typescript": "^5.6.3",
|
|
42
42
|
"typescript-eslint": "^8.8.1"
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@eslint/markdown": "^6.2.0",
|
|
62
62
|
"@stylistic/eslint-plugin": "^2.9.0",
|
|
63
63
|
"@stylistic/eslint-plugin-ts": "^2.9.0",
|
|
64
|
-
"@tanstack/eslint-plugin-query": "^5.59.
|
|
64
|
+
"@tanstack/eslint-plugin-query": "^5.59.7",
|
|
65
65
|
"@tanstack/eslint-plugin-router": "^1.63.4",
|
|
66
66
|
"@typescript-eslint/parser": "^8.8.1",
|
|
67
67
|
"eslint": "^9.12.0",
|
|
@@ -71,12 +71,12 @@
|
|
|
71
71
|
"eslint-plugin-depend": "^0.11.0",
|
|
72
72
|
"eslint-plugin-jsx-a11y": "^6.10.0",
|
|
73
73
|
"eslint-plugin-lodash": "^8.0.0",
|
|
74
|
-
"eslint-plugin-n": "^17.
|
|
74
|
+
"eslint-plugin-n": "^17.11.1",
|
|
75
75
|
"eslint-plugin-perfectionist": "^3.8.0",
|
|
76
76
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
77
77
|
"eslint-plugin-solid": "^0.14.3",
|
|
78
78
|
"eslint-plugin-sonarjs": "2.0.3",
|
|
79
|
-
"eslint-plugin-tailwindcss": "^3.17.
|
|
79
|
+
"eslint-plugin-tailwindcss": "^3.17.5",
|
|
80
80
|
"eslint-plugin-unicorn": "^56.0.0",
|
|
81
81
|
"typescript": "^5.6.3",
|
|
82
82
|
"typescript-eslint": "^8.8.1"
|
package/setup/deprecated.ts
CHANGED
|
@@ -1,100 +1,13 @@
|
|
|
1
1
|
import { type CustomRules, genRules } from "./gen-rules.ts";
|
|
2
|
+
import { builtinRules } from "eslint/use-at-your-own-risk";
|
|
3
|
+
|
|
4
|
+
let ruleNames: string[] = [];
|
|
5
|
+
[...builtinRules.entries()].forEach(([key, rule]) => {
|
|
6
|
+
if (rule.meta?.deprecated === true) {
|
|
7
|
+
ruleNames.push(key);
|
|
8
|
+
}
|
|
9
|
+
});
|
|
2
10
|
|
|
3
|
-
const ruleNames = [
|
|
4
|
-
"array-bracket-newline",
|
|
5
|
-
"array-bracket-spacing",
|
|
6
|
-
"array-element-newline",
|
|
7
|
-
"arrow-parens",
|
|
8
|
-
"arrow-spacing",
|
|
9
|
-
"block-spacing",
|
|
10
|
-
"brace-style",
|
|
11
|
-
"callback-return",
|
|
12
|
-
"comma-dangle",
|
|
13
|
-
"comma-spacing",
|
|
14
|
-
"comma-style",
|
|
15
|
-
"computed-property-spacing",
|
|
16
|
-
"dot-location",
|
|
17
|
-
"eol-last",
|
|
18
|
-
"func-call-spacing",
|
|
19
|
-
"function-call-argument-newline",
|
|
20
|
-
"function-paren-newline",
|
|
21
|
-
"generator-star-spacing",
|
|
22
|
-
"global-require",
|
|
23
|
-
"handle-callback-err",
|
|
24
|
-
"id-blacklist",
|
|
25
|
-
"implicit-arrow-linebreak",
|
|
26
|
-
"indent",
|
|
27
|
-
"indent-legacy",
|
|
28
|
-
"jsx-quotes",
|
|
29
|
-
"key-spacing",
|
|
30
|
-
"keyword-spacing",
|
|
31
|
-
"line-comment-position",
|
|
32
|
-
"linebreak-style",
|
|
33
|
-
"lines-around-comment",
|
|
34
|
-
"lines-around-directive",
|
|
35
|
-
"lines-between-class-members",
|
|
36
|
-
"max-len",
|
|
37
|
-
"max-statements-per-line",
|
|
38
|
-
"multiline-comment-style",
|
|
39
|
-
"multiline-ternary",
|
|
40
|
-
"new-parens",
|
|
41
|
-
"newline-after-var",
|
|
42
|
-
"newline-before-return",
|
|
43
|
-
"newline-per-chained-call",
|
|
44
|
-
"no-buffer-constructor",
|
|
45
|
-
"no-catch-shadow",
|
|
46
|
-
"no-confusing-arrow",
|
|
47
|
-
"no-extra-parens",
|
|
48
|
-
"no-extra-semi",
|
|
49
|
-
"no-floating-decimal",
|
|
50
|
-
"no-mixed-operators",
|
|
51
|
-
"no-mixed-requires",
|
|
52
|
-
"no-mixed-spaces-and-tabs",
|
|
53
|
-
"no-multi-spaces",
|
|
54
|
-
"no-multiple-empty-lines",
|
|
55
|
-
"no-native-reassign",
|
|
56
|
-
"no-negated-in-lhs",
|
|
57
|
-
"no-new-object",
|
|
58
|
-
"no-new-require",
|
|
59
|
-
"no-new-symbol",
|
|
60
|
-
"no-path-concat",
|
|
61
|
-
"no-process-env",
|
|
62
|
-
"no-process-exit",
|
|
63
|
-
"no-restricted-modules",
|
|
64
|
-
"no-return-await",
|
|
65
|
-
"no-spaced-func",
|
|
66
|
-
"no-sync",
|
|
67
|
-
"no-tabs",
|
|
68
|
-
"no-trailing-spaces",
|
|
69
|
-
"no-whitespace-before-property",
|
|
70
|
-
"nonblock-statement-body-position",
|
|
71
|
-
"object-curly-newline",
|
|
72
|
-
"object-curly-spacing",
|
|
73
|
-
"object-property-newline",
|
|
74
|
-
"one-var-declaration-per-line",
|
|
75
|
-
"operator-linebreak",
|
|
76
|
-
"padded-blocks",
|
|
77
|
-
"padding-line-between-statements",
|
|
78
|
-
"prefer-reflect",
|
|
79
|
-
"quote-props",
|
|
80
|
-
"quotes",
|
|
81
|
-
"rest-spread-spacing",
|
|
82
|
-
"semi",
|
|
83
|
-
"semi-spacing",
|
|
84
|
-
"semi-style",
|
|
85
|
-
"space-before-blocks",
|
|
86
|
-
"space-before-function-paren",
|
|
87
|
-
"space-in-parens",
|
|
88
|
-
"space-infix-ops",
|
|
89
|
-
"space-unary-ops",
|
|
90
|
-
"spaced-comment",
|
|
91
|
-
"switch-colon-spacing",
|
|
92
|
-
"template-curly-spacing",
|
|
93
|
-
"template-tag-spacing",
|
|
94
|
-
"wrap-iife",
|
|
95
|
-
"wrap-regex",
|
|
96
|
-
"yield-star-spacing",
|
|
97
|
-
];
|
|
98
11
|
const customRules: CustomRules = [];
|
|
99
12
|
|
|
100
13
|
export const deprecatedRules = genRules(
|
package/setup/lodash.ts
CHANGED
|
@@ -7,43 +7,43 @@ const ruleNames = Object.keys(getNonDeprecatedRules(lodash.rules));
|
|
|
7
7
|
const customRules = [
|
|
8
8
|
{
|
|
9
9
|
name: "chain-style",
|
|
10
|
-
rule: [
|
|
10
|
+
rule: [2, "as-needed"],
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
name: "consistent-compose",
|
|
14
|
-
rule: [
|
|
14
|
+
rule: [2, "flow"],
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
name: "identity-shorthand",
|
|
18
|
-
rule: [
|
|
18
|
+
rule: [2, "always"],
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
name: "import-scope",
|
|
22
|
-
rule: [
|
|
22
|
+
rule: [2, "method"],
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
name: "matches-prop-shorthand",
|
|
26
|
-
rule: [
|
|
26
|
+
rule: [2, "always"],
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
name: "matches-shorthand",
|
|
30
|
-
rule: [
|
|
30
|
+
rule: [2, "always", 3],
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
name: "path-style",
|
|
34
|
-
rule: [
|
|
34
|
+
rule: [2, "array"],
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
name: "prefer-includes",
|
|
38
|
-
rule: [
|
|
38
|
+
rule: [2, { includeNative: true }],
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
name: "prefer-some",
|
|
42
|
-
rule: [
|
|
42
|
+
rule: [2, { includeNative: true }],
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
name: "prop-shorthand",
|
|
46
|
-
rule: [
|
|
46
|
+
rule: [2, "always"],
|
|
47
47
|
},
|
|
48
48
|
];
|
|
49
49
|
|