@pumpn/eslint-config 14.0.1 → 15.0.0
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/config.js +66 -1
- package/deno.json +1 -1
- package/deno.lock +494 -1174
- package/eslint.config.js +19 -0
- package/import-map.json +14 -13
- package/package.json +17 -14
- package/plugins.js +11 -7
- package/rules/_exports.js +1 -0
- package/rules/func-params-args.js +11 -0
- package/rules/import-x/helpful-warnings.js +1 -0
- package/rules/import-x/static-analysis.js +1 -1
- package/rules/jsdoc.js +13 -5
- package/rules/perfectionist.js +40 -24
- package/rules/promise.js +1 -1
- package/rules/react/core.js +4 -0
- package/rules/regexp/best-practices.js +1 -1
- package/rules/sonarjs/code-smell-detection.js +1 -1
- package/rules/stylistic/misc.js +14 -1
- package/rules/suggestions.js +1 -1
- package/rules/unicorn.js +8 -1
package/eslint.config.js
CHANGED
|
@@ -7,6 +7,25 @@ const eslintConfig = [
|
|
|
7
7
|
rules: {
|
|
8
8
|
"unicorn/string-content": "off"
|
|
9
9
|
}
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
files: [
|
|
13
|
+
"plugins.js",
|
|
14
|
+
"rules/_exports.js",
|
|
15
|
+
"rules/func-params-args.js"
|
|
16
|
+
],
|
|
17
|
+
rules: {
|
|
18
|
+
"unicorn/prevent-abbreviations": [
|
|
19
|
+
"error",
|
|
20
|
+
{
|
|
21
|
+
allowList: {
|
|
22
|
+
"func-params-args": true,
|
|
23
|
+
funcParamsArgs: true,
|
|
24
|
+
funcParamsArgsRules: true
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
10
29
|
}
|
|
11
30
|
];
|
|
12
31
|
|
package/import-map.json
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"imports": {
|
|
3
3
|
"@eslint-community/eslint-plugin-eslint-comments": "npm:@eslint-community/eslint-plugin-eslint-comments@^4.3.0",
|
|
4
|
-
"@eslint-react/eslint-plugin": "npm:@eslint-react/eslint-plugin@^1.
|
|
5
|
-
"@std/path": "jsr:@std/path",
|
|
6
|
-
"@stylistic/eslint-plugin": "npm:@stylistic/eslint-plugin@^2.
|
|
7
|
-
"@typescript-eslint/parser": "npm:@typescript-eslint/parser@^8.0.0
|
|
4
|
+
"@eslint-react/eslint-plugin": "npm:@eslint-react/eslint-plugin@^1.8.2",
|
|
5
|
+
"@std/path": "jsr:@std/path@^1",
|
|
6
|
+
"@stylistic/eslint-plugin": "npm:@stylistic/eslint-plugin@^2.6.1",
|
|
7
|
+
"@typescript-eslint/parser": "npm:@typescript-eslint/parser@^8.0.0",
|
|
8
8
|
"eslint-plugin-depend": "npm:eslint-plugin-depend@^0.9.0",
|
|
9
|
-
"eslint-plugin-
|
|
10
|
-
"eslint-plugin-
|
|
9
|
+
"eslint-plugin-disable-autofix": "npm:eslint-plugin-disable-autofix@^5.0.1",
|
|
10
|
+
"eslint-plugin-func-params-args": "npm:eslint-plugin-func-params-args@^4.0.0",
|
|
11
|
+
"eslint-plugin-import-x": "npm:eslint-plugin-import-x@^3.1.0",
|
|
12
|
+
"eslint-plugin-jsdoc": "npm:eslint-plugin-jsdoc@^48.11.0",
|
|
11
13
|
"eslint-plugin-no-secrets": "npm:eslint-plugin-no-secrets@^1.0.2",
|
|
12
|
-
"eslint-plugin-perfectionist": "npm:eslint-plugin-perfectionist@^
|
|
13
|
-
"eslint-plugin-promise": "npm:eslint-plugin-promise@^
|
|
14
|
+
"eslint-plugin-perfectionist": "npm:eslint-plugin-perfectionist@^3.1.0",
|
|
15
|
+
"eslint-plugin-promise": "npm:eslint-plugin-promise@^7.0.0",
|
|
14
16
|
"eslint-plugin-react": "npm:eslint-plugin-react@^7.35.0",
|
|
15
17
|
"eslint-plugin-redos": "npm:eslint-plugin-redos@^4.4.5",
|
|
16
18
|
"eslint-plugin-regexp": "npm:eslint-plugin-regexp@^2.6.0",
|
|
17
19
|
"eslint-plugin-security": "npm:eslint-plugin-security@^3.0.1",
|
|
18
|
-
"eslint-plugin-sonarjs": "npm:eslint-plugin-sonarjs@^1.0.
|
|
20
|
+
"eslint-plugin-sonarjs": "npm:eslint-plugin-sonarjs@^1.0.4",
|
|
19
21
|
"eslint-plugin-tailwindcss": "npm:eslint-plugin-tailwindcss@^3.17.4",
|
|
20
|
-
"eslint-plugin-unicorn": "npm:eslint-plugin-unicorn@^
|
|
21
|
-
"globals": "npm:globals@^15.
|
|
22
|
+
"eslint-plugin-unicorn": "npm:eslint-plugin-unicorn@^55.0.0",
|
|
23
|
+
"globals": "npm:globals@^15.9.0",
|
|
22
24
|
"preact": "https://esm.sh/*preact@10.19.3?dev",
|
|
23
|
-
"preact/jsx-runtime": "https://esm.sh/*preact@10.19.3/jsx-runtime?dev"
|
|
24
|
-
"radash": "npm:radash"
|
|
25
|
+
"preact/jsx-runtime": "https://esm.sh/*preact@10.19.3/jsx-runtime?dev"
|
|
25
26
|
}
|
|
26
27
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pumpn/eslint-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "15.0.0",
|
|
4
4
|
"description": "standard eslint config for pumpn code projects",
|
|
5
5
|
"main": "config.js",
|
|
6
6
|
"author": "Nano Miratus <nanomiratus@gmail.com>",
|
|
@@ -17,32 +17,35 @@
|
|
|
17
17
|
"test": "echo 'no tests yet'"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"eslint": "^9.
|
|
20
|
+
"eslint": "^9.8.0"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.3.0",
|
|
24
|
-
"@eslint-react/eslint-plugin": "^1.
|
|
25
|
-
"@stylistic/eslint-plugin": "^2.
|
|
26
|
-
"@typescript-eslint/parser": "^8.0.0
|
|
24
|
+
"@eslint-react/eslint-plugin": "^1.8.2",
|
|
25
|
+
"@stylistic/eslint-plugin": "^2.6.1",
|
|
26
|
+
"@typescript-eslint/parser": "^8.0.0",
|
|
27
27
|
"eslint-plugin-depend": "^0.9.0",
|
|
28
|
-
"eslint-plugin-
|
|
29
|
-
"eslint-plugin-
|
|
28
|
+
"eslint-plugin-disable-autofix": "^5.0.1",
|
|
29
|
+
"eslint-plugin-func-params-args": "^4.0.0",
|
|
30
|
+
"eslint-plugin-import-x": "^3.1.0",
|
|
31
|
+
"eslint-plugin-jsdoc": "^48.11.0",
|
|
30
32
|
"eslint-plugin-no-secrets": "^1.0.2",
|
|
31
|
-
"eslint-plugin-perfectionist": "^
|
|
32
|
-
"eslint-plugin-promise": "^
|
|
33
|
+
"eslint-plugin-perfectionist": "^3.1.0",
|
|
34
|
+
"eslint-plugin-promise": "^7.0.0",
|
|
33
35
|
"eslint-plugin-redos": "^4.4.5",
|
|
34
36
|
"eslint-plugin-regexp": "^2.6.0",
|
|
35
37
|
"eslint-plugin-security": "^3.0.1",
|
|
36
|
-
"eslint-plugin-sonarjs": "^1.0.
|
|
38
|
+
"eslint-plugin-sonarjs": "^1.0.4",
|
|
37
39
|
"eslint-plugin-tailwindcss": "^3.17.4",
|
|
38
|
-
"eslint-plugin-unicorn": "^
|
|
39
|
-
"globals": "^15.
|
|
40
|
+
"eslint-plugin-unicorn": "^55.0.0",
|
|
41
|
+
"globals": "^15.9.0"
|
|
40
42
|
},
|
|
41
43
|
"peerDependencies": {
|
|
42
|
-
"eslint": "^9.
|
|
44
|
+
"eslint": "^9.8.0"
|
|
43
45
|
},
|
|
44
46
|
"overrides": {
|
|
45
47
|
"@typescript-eslint/type-utils": "^8.0.0-alpha.47",
|
|
46
|
-
"@typescript-eslint/utils": "^8.0.0-alpha.47"
|
|
48
|
+
"@typescript-eslint/utils": "^8.0.0-alpha.47",
|
|
49
|
+
"eslint": "^9.8.0"
|
|
47
50
|
}
|
|
48
51
|
}
|
package/plugins.js
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
/* eslint-disable import-x/max-dependencies -- collection file */
|
|
2
|
+
// import github from "eslint-plugin-github";
|
|
3
|
+
// import jsxA11y from "eslint-plugin-jsx-a11y";
|
|
4
|
+
// import noUnsanitized from "eslint-plugin-no-unsanitized";
|
|
2
5
|
import eslintComments from "@eslint-community/eslint-plugin-eslint-comments";
|
|
3
6
|
import react from "@eslint-react/eslint-plugin";
|
|
4
7
|
import stylistic from "@stylistic/eslint-plugin";
|
|
5
8
|
import depend from "eslint-plugin-depend";
|
|
6
|
-
|
|
9
|
+
import disableAutofix from "eslint-plugin-disable-autofix";
|
|
10
|
+
import funcParamsArgs from "eslint-plugin-func-params-args";
|
|
7
11
|
import importX from "eslint-plugin-import-x";
|
|
8
12
|
import jsdoc from "eslint-plugin-jsdoc";
|
|
9
|
-
// import jsxA11y from "eslint-plugin-jsx-a11y";
|
|
10
13
|
import noSecrets from "eslint-plugin-no-secrets";
|
|
11
|
-
// import noUnsanitized from "eslint-plugin-no-unsanitized";
|
|
12
14
|
import perfectionist from "eslint-plugin-perfectionist";
|
|
13
15
|
import promise from "eslint-plugin-promise";
|
|
14
16
|
import redos from "eslint-plugin-redos";
|
|
@@ -19,15 +21,17 @@ import tailwindcss from "eslint-plugin-tailwindcss";
|
|
|
19
21
|
import unicorn from "eslint-plugin-unicorn";
|
|
20
22
|
|
|
21
23
|
const plugins = {
|
|
24
|
+
// github,
|
|
25
|
+
// "jsx-a11y": jsxA11y,
|
|
26
|
+
// "no-unsanitized": noUnsanitized,
|
|
22
27
|
"@eslint-community/eslint-comments": eslintComments,
|
|
23
28
|
"@stylistic": stylistic,
|
|
24
|
-
|
|
29
|
+
depend,
|
|
30
|
+
"disable-autofix": disableAutofix,
|
|
31
|
+
"func-params-args": funcParamsArgs,
|
|
25
32
|
"import-x": importX,
|
|
26
33
|
jsdoc,
|
|
27
|
-
// "jsx-a11y": jsxA11y,
|
|
28
34
|
"no-secrets": noSecrets,
|
|
29
|
-
// "no-unsanitized": noUnsanitized,
|
|
30
|
-
depend,
|
|
31
35
|
perfectionist,
|
|
32
36
|
promise,
|
|
33
37
|
react,
|
package/rules/_exports.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as dependRules } from "./depend.js";
|
|
2
2
|
export { default as eslintCommentsRules } from "./eslint-comments.js";
|
|
3
|
+
export { default as funcParamsArgsRules } from "./func-params-args.js";
|
|
3
4
|
// export { default as githubRules } from "./github.js";
|
|
4
5
|
export { default as importXRules } from "./import-x.js";
|
|
5
6
|
export { default as jsdocRules } from "./jsdoc.js";
|
|
@@ -57,7 +57,7 @@ const staticAnalysisRules = {
|
|
|
57
57
|
}
|
|
58
58
|
],
|
|
59
59
|
"import-x/no-self-import": "error",
|
|
60
|
-
// TODO [2024-
|
|
60
|
+
// TODO [2024-09-01]: Change to "error" when there is a resolver for deno
|
|
61
61
|
"import-x/no-unresolved": "off",
|
|
62
62
|
"import-x/no-useless-path-segments": [
|
|
63
63
|
"error",
|
package/rules/jsdoc.js
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
const jsdocRules = {
|
|
2
2
|
"jsdoc/check-access": "warn",
|
|
3
3
|
"jsdoc/check-alignment": "warn",
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
"jsdoc/check-examples": [
|
|
5
|
+
"off",
|
|
6
|
+
{
|
|
7
|
+
allowInlineConfig: true,
|
|
8
|
+
captionRequired: false,
|
|
9
|
+
noDefaultExampleRules: true,
|
|
10
|
+
paddedIndent: 4,
|
|
11
|
+
reportUnusedDisableDirectives: true
|
|
12
|
+
}
|
|
13
|
+
],
|
|
6
14
|
"jsdoc/check-indentation": [
|
|
7
15
|
"warn",
|
|
8
16
|
{
|
|
@@ -19,7 +27,7 @@ const jsdocRules = {
|
|
|
19
27
|
definedTags: ["category", "component"]
|
|
20
28
|
}
|
|
21
29
|
],
|
|
22
|
-
"jsdoc/check-template-names": "
|
|
30
|
+
"jsdoc/check-template-names": "off",
|
|
23
31
|
"jsdoc/check-types": "warn",
|
|
24
32
|
"jsdoc/check-values": "warn",
|
|
25
33
|
"jsdoc/convert-to-jsdoc-comments": [
|
|
@@ -120,7 +128,7 @@ const jsdocRules = {
|
|
|
120
128
|
descriptionStyle: "body"
|
|
121
129
|
}
|
|
122
130
|
],
|
|
123
|
-
"jsdoc/require-description-complete-sentence": "
|
|
131
|
+
"jsdoc/require-description-complete-sentence": "off",
|
|
124
132
|
"jsdoc/require-example": "warn",
|
|
125
133
|
"jsdoc/require-file-overview": [
|
|
126
134
|
"off",
|
|
@@ -147,7 +155,7 @@ const jsdocRules = {
|
|
|
147
155
|
`
|
|
148
156
|
:not(
|
|
149
157
|
:matches(
|
|
150
|
-
|
|
158
|
+
ObjectExpression > Property,
|
|
151
159
|
ArrayExpression:has(Literal ~ ArrowFunctionExpression),
|
|
152
160
|
CallExpression,
|
|
153
161
|
Property > AssignmentPattern
|
package/rules/perfectionist.js
CHANGED
|
@@ -2,16 +2,16 @@ const perfectionistRules = {
|
|
|
2
2
|
"perfectionist/sort-array-includes": [
|
|
3
3
|
"error",
|
|
4
4
|
{
|
|
5
|
-
"
|
|
5
|
+
groupKind: "literals-first",
|
|
6
|
+
ignoreCase: false,
|
|
6
7
|
order: "asc",
|
|
7
|
-
"spread-last": true,
|
|
8
8
|
type: "natural"
|
|
9
9
|
}
|
|
10
10
|
],
|
|
11
11
|
"perfectionist/sort-astro-attributes": [
|
|
12
12
|
"error",
|
|
13
13
|
{
|
|
14
|
-
|
|
14
|
+
ignoreCase: false,
|
|
15
15
|
order: "asc",
|
|
16
16
|
type: "natural"
|
|
17
17
|
}
|
|
@@ -31,7 +31,7 @@ const perfectionistRules = {
|
|
|
31
31
|
["get-method", "set-method"],
|
|
32
32
|
"unknown"
|
|
33
33
|
],
|
|
34
|
-
|
|
34
|
+
ignoreCase: false,
|
|
35
35
|
order: "asc",
|
|
36
36
|
type: "natural"
|
|
37
37
|
}
|
|
@@ -39,7 +39,7 @@ const perfectionistRules = {
|
|
|
39
39
|
"perfectionist/sort-enums": [
|
|
40
40
|
"error",
|
|
41
41
|
{
|
|
42
|
-
|
|
42
|
+
ignoreCase: false,
|
|
43
43
|
order: "asc",
|
|
44
44
|
type: "natural"
|
|
45
45
|
}
|
|
@@ -47,7 +47,7 @@ const perfectionistRules = {
|
|
|
47
47
|
"perfectionist/sort-exports": [
|
|
48
48
|
"error",
|
|
49
49
|
{
|
|
50
|
-
|
|
50
|
+
ignoreCase: false,
|
|
51
51
|
order: "asc",
|
|
52
52
|
type: "natural"
|
|
53
53
|
}
|
|
@@ -55,7 +55,7 @@ const perfectionistRules = {
|
|
|
55
55
|
"perfectionist/sort-imports": [
|
|
56
56
|
"error",
|
|
57
57
|
{
|
|
58
|
-
|
|
58
|
+
customGroups: {
|
|
59
59
|
type: {},
|
|
60
60
|
value: {
|
|
61
61
|
components: "@/components/**",
|
|
@@ -87,9 +87,9 @@ const perfectionistRules = {
|
|
|
87
87
|
"index",
|
|
88
88
|
"unknown"
|
|
89
89
|
],
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
ignoreCase: false,
|
|
91
|
+
internalPattern: ["@/**"],
|
|
92
|
+
newlinesBetween: "always",
|
|
93
93
|
order: "asc",
|
|
94
94
|
type: "natural"
|
|
95
95
|
}
|
|
@@ -97,7 +97,7 @@ const perfectionistRules = {
|
|
|
97
97
|
"perfectionist/sort-interfaces": [
|
|
98
98
|
"error",
|
|
99
99
|
{
|
|
100
|
-
|
|
100
|
+
ignoreCase: false,
|
|
101
101
|
order: "asc",
|
|
102
102
|
type: "natural"
|
|
103
103
|
}
|
|
@@ -105,7 +105,7 @@ const perfectionistRules = {
|
|
|
105
105
|
"perfectionist/sort-intersection-types": [
|
|
106
106
|
"error",
|
|
107
107
|
{
|
|
108
|
-
|
|
108
|
+
ignoreCase: false,
|
|
109
109
|
order: "asc",
|
|
110
110
|
type: "natural"
|
|
111
111
|
}
|
|
@@ -118,7 +118,7 @@ const perfectionistRules = {
|
|
|
118
118
|
"unknown",
|
|
119
119
|
"multiline"
|
|
120
120
|
],
|
|
121
|
-
|
|
121
|
+
ignoreCase: false,
|
|
122
122
|
order: "asc",
|
|
123
123
|
type: "natural"
|
|
124
124
|
}
|
|
@@ -126,7 +126,7 @@ const perfectionistRules = {
|
|
|
126
126
|
"perfectionist/sort-maps": [
|
|
127
127
|
"error",
|
|
128
128
|
{
|
|
129
|
-
|
|
129
|
+
ignoreCase: false,
|
|
130
130
|
order: "asc",
|
|
131
131
|
type: "natural"
|
|
132
132
|
}
|
|
@@ -134,7 +134,7 @@ const perfectionistRules = {
|
|
|
134
134
|
"perfectionist/sort-named-exports": [
|
|
135
135
|
"error",
|
|
136
136
|
{
|
|
137
|
-
|
|
137
|
+
ignoreCase: false,
|
|
138
138
|
order: "asc",
|
|
139
139
|
type: "natural"
|
|
140
140
|
}
|
|
@@ -142,7 +142,7 @@ const perfectionistRules = {
|
|
|
142
142
|
"perfectionist/sort-named-imports": [
|
|
143
143
|
"error",
|
|
144
144
|
{
|
|
145
|
-
|
|
145
|
+
ignoreCase: false,
|
|
146
146
|
order: "asc",
|
|
147
147
|
type: "natural"
|
|
148
148
|
}
|
|
@@ -150,7 +150,7 @@ const perfectionistRules = {
|
|
|
150
150
|
"perfectionist/sort-object-types": [
|
|
151
151
|
"error",
|
|
152
152
|
{
|
|
153
|
-
|
|
153
|
+
ignoreCase: false,
|
|
154
154
|
order: "asc",
|
|
155
155
|
type: "natural"
|
|
156
156
|
}
|
|
@@ -158,7 +158,7 @@ const perfectionistRules = {
|
|
|
158
158
|
"perfectionist/sort-objects": [
|
|
159
159
|
"error",
|
|
160
160
|
{
|
|
161
|
-
|
|
161
|
+
customGroups: {
|
|
162
162
|
id: ["id"],
|
|
163
163
|
groupBeforeAfter1: ["before*"],
|
|
164
164
|
groupBeforeAfter2: ["after*"],
|
|
@@ -240,17 +240,25 @@ const perfectionistRules = {
|
|
|
240
240
|
"groupColor3",
|
|
241
241
|
"unknown"
|
|
242
242
|
],
|
|
243
|
-
|
|
243
|
+
ignoreCase: false,
|
|
244
244
|
order: "asc",
|
|
245
|
-
|
|
246
|
-
|
|
245
|
+
partitionByComment: true,
|
|
246
|
+
partitionByNewLine: true,
|
|
247
247
|
type: "natural"
|
|
248
248
|
}
|
|
249
249
|
],
|
|
250
250
|
"perfectionist/sort-svelte-attributes": [
|
|
251
251
|
"error",
|
|
252
252
|
{
|
|
253
|
-
|
|
253
|
+
ignoreCase: false,
|
|
254
|
+
order: "asc",
|
|
255
|
+
type: "natural"
|
|
256
|
+
}
|
|
257
|
+
],
|
|
258
|
+
"perfectionist/sort-switch-case": [
|
|
259
|
+
"error",
|
|
260
|
+
{
|
|
261
|
+
ignoreCase: false,
|
|
254
262
|
order: "asc",
|
|
255
263
|
type: "natural"
|
|
256
264
|
}
|
|
@@ -258,7 +266,15 @@ const perfectionistRules = {
|
|
|
258
266
|
"perfectionist/sort-union-types": [
|
|
259
267
|
"error",
|
|
260
268
|
{
|
|
261
|
-
|
|
269
|
+
ignoreCase: false,
|
|
270
|
+
order: "asc",
|
|
271
|
+
type: "natural"
|
|
272
|
+
}
|
|
273
|
+
],
|
|
274
|
+
"perfectionist/sort-variable-declarations": [
|
|
275
|
+
"error",
|
|
276
|
+
{
|
|
277
|
+
ignoreCase: false,
|
|
262
278
|
order: "asc",
|
|
263
279
|
type: "natural"
|
|
264
280
|
}
|
|
@@ -266,7 +282,7 @@ const perfectionistRules = {
|
|
|
266
282
|
"perfectionist/sort-vue-attributes": [
|
|
267
283
|
"error",
|
|
268
284
|
{
|
|
269
|
-
|
|
285
|
+
ignoreCase: false,
|
|
270
286
|
order: "asc",
|
|
271
287
|
type: "natural"
|
|
272
288
|
}
|
package/rules/promise.js
CHANGED
package/rules/react/core.js
CHANGED
|
@@ -13,16 +13,20 @@ const coreRules = {
|
|
|
13
13
|
"react/no-class-component": "error",
|
|
14
14
|
"react/no-clone-element": "error",
|
|
15
15
|
"react/no-comment-textnodes": "error",
|
|
16
|
+
"react/no-complex-conditional-rendering": "error",
|
|
16
17
|
"react/no-component-will-mount": "error",
|
|
17
18
|
"react/no-component-will-receive-props": "error",
|
|
18
19
|
"react/no-component-will-update": "error",
|
|
19
20
|
"react/no-create-ref": "error",
|
|
21
|
+
"react/no-default-props": "error",
|
|
20
22
|
"react/no-direct-mutation-state": "error",
|
|
21
23
|
"react/no-duplicate-key": "error",
|
|
24
|
+
"react/no-implicit-key": "error",
|
|
22
25
|
"react/no-leaked-conditional-rendering": "error",
|
|
23
26
|
"react/no-missing-component-display-name": "error",
|
|
24
27
|
"react/no-missing-key": "error",
|
|
25
28
|
"react/no-nested-components": "error",
|
|
29
|
+
"react/no-prop-types": "error",
|
|
26
30
|
"react/no-redundant-should-component-update": "error",
|
|
27
31
|
"react/no-set-state-in-component-did-mount": "error",
|
|
28
32
|
"react/no-set-state-in-component-did-update": "error",
|
|
@@ -33,7 +33,7 @@ const bestPracticesRules = {
|
|
|
33
33
|
"regexp/prefer-regexp-test": "off",
|
|
34
34
|
"regexp/prefer-set-operation": "error",
|
|
35
35
|
"regexp/require-unicode-regexp": "error",
|
|
36
|
-
// TODO [2024-
|
|
36
|
+
// TODO [2024-09-01]: enable when https://github.com/microsoft/vscode/pull/206580 is resolved
|
|
37
37
|
"regexp/require-unicode-sets-regexp": "off",
|
|
38
38
|
"regexp/simplify-set-operations": "error",
|
|
39
39
|
"regexp/sort-alternatives": "error",
|
|
@@ -20,7 +20,7 @@ const codeSmellDetectionRules = {
|
|
|
20
20
|
"sonarjs/no-gratuitous-expressions": "error",
|
|
21
21
|
"sonarjs/no-identical-functions": ["error", identicalFunctionThreshold],
|
|
22
22
|
"sonarjs/no-inverted-boolean-check": "error",
|
|
23
|
-
"sonarjs/no-nested-switch": "
|
|
23
|
+
"sonarjs/no-nested-switch": "off",
|
|
24
24
|
"sonarjs/no-nested-template-literals": "error",
|
|
25
25
|
"sonarjs/no-redundant-boolean": "error",
|
|
26
26
|
"sonarjs/no-redundant-jump": "error",
|
package/rules/stylistic/misc.js
CHANGED
|
@@ -16,7 +16,20 @@ const miscRules = {
|
|
|
16
16
|
}
|
|
17
17
|
],
|
|
18
18
|
"@stylistic/max-statements-per-line": ["error", { max: 1 }],
|
|
19
|
-
"@stylistic/member-delimiter-style":
|
|
19
|
+
"@stylistic/member-delimiter-style": [
|
|
20
|
+
"error",
|
|
21
|
+
{
|
|
22
|
+
multiline: {
|
|
23
|
+
delimiter: "comma",
|
|
24
|
+
requireLast: false
|
|
25
|
+
},
|
|
26
|
+
multilineDetection: "brackets",
|
|
27
|
+
singleline: {
|
|
28
|
+
delimiter: "comma",
|
|
29
|
+
requireLast: false
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
],
|
|
20
33
|
"@stylistic/nonblock-statement-body-position": ["error", "beside"],
|
|
21
34
|
"@stylistic/one-var-declaration-per-line": ["error", "always"],
|
|
22
35
|
"@stylistic/padded-blocks": [
|
package/rules/suggestions.js
CHANGED
|
@@ -28,7 +28,7 @@ const suggestionsRules = {
|
|
|
28
28
|
}
|
|
29
29
|
],
|
|
30
30
|
"max-nested-callbacks": ["error", maxNestedCallbacks],
|
|
31
|
-
"max-params": ["
|
|
31
|
+
"max-params": ["off", maxParameters],
|
|
32
32
|
"max-statements": ["error", { max: maxStatements }],
|
|
33
33
|
"accessor-pairs": "error",
|
|
34
34
|
"arrow-body-style": "error",
|
package/rules/unicorn.js
CHANGED
|
@@ -67,7 +67,14 @@ const unicornRules = {
|
|
|
67
67
|
"unicorn/no-instanceof-array": "error",
|
|
68
68
|
"unicorn/no-invalid-fetch-options": "error",
|
|
69
69
|
"unicorn/no-invalid-remove-event-listener": "error",
|
|
70
|
-
"unicorn/no-keyword-prefix": [
|
|
70
|
+
"unicorn/no-keyword-prefix": [
|
|
71
|
+
"error",
|
|
72
|
+
{
|
|
73
|
+
disallowedPrefixes: ["new"],
|
|
74
|
+
onlyCamelCase: true
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"unicorn/no-length-as-slice-end": "error",
|
|
71
78
|
"unicorn/no-lonely-if": "error",
|
|
72
79
|
"unicorn/no-magic-array-flat-depth": "error",
|
|
73
80
|
"unicorn/no-negated-condition": "error",
|