@pumpn/eslint-config 16.0.0 → 16.1.2
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/.vscode/settings.json +14 -1
- package/config.js +31 -39
- package/deno.json +23 -23
- package/deno.lock +1689 -20
- package/eslint.config.js +13 -5
- package/package.json +20 -20
- package/plugins.js +13 -9
- package/rules/command.js +1 -1
- package/rules/depend.js +1 -1
- package/rules/eslint-comments.js +1 -1
- package/rules/github.js +1 -1
- package/rules/import-x/helpful-warnings.js +2 -2
- package/rules/import-x/static-analysis.js +1 -1
- package/rules/import-x/style-guide.js +10 -2
- package/rules/import-x.js +1 -1
- package/rules/jsdoc.js +3 -27
- package/rules/jsx-a11y.js +1 -1
- package/rules/layout-and-formatting.js +1 -1
- package/rules/no-secrets.js +1 -1
- package/rules/no-unsanitized.js +1 -1
- package/rules/perfectionist.js +19 -31
- package/rules/possible-problems.js +1 -1
- package/rules/promise.js +20 -5
- package/rules/react/naming-convention.js +0 -2
- package/rules/react.js +1 -1
- package/rules/redos.js +1 -1
- package/rules/regexp.js +1 -1
- package/rules/security.js +1 -1
- package/rules/sonarjs/bug-detection.js +0 -1
- package/rules/sonarjs.js +1 -1
- package/rules/stylistic/_common/min-items-for-array-newline.js +1 -1
- package/rules/stylistic/indent.js +0 -1
- package/rules/stylistic/jsx.js +0 -1
- package/rules/stylistic/linebreaks.js +3 -15
- package/rules/stylistic.js +1 -1
- package/rules/suggestions.js +4 -16
- package/rules/tailwindcss.js +1 -1
- package/rules/unicorn.js +19 -6
- package/rules.js +1 -1
- package/scripts/update-package-json.js +42 -22
- package/documentation/global.html +0 -566
- package/documentation/index.html +0 -135
- package/documentation/index.js.html +0 -35865
- package/documentation/scripts/app.min.js +0 -1
- package/documentation/scripts/linenumber.js +0 -26
- package/documentation/scripts/search.js +0 -39
- package/documentation/styles/app.min.css +0 -1
- package/documentation/styles/iframe.css +0 -13
- package/documentation/styles/prettify-jsdoc.css +0 -111
- package/documentation/styles/prettify-tomorrow.css +0 -132
- package/documentation/styles/reset.css +0 -44
- package/jsdoc.json +0 -51
package/eslint.config.js
CHANGED
|
@@ -2,6 +2,18 @@ import config from "./config.js";
|
|
|
2
2
|
|
|
3
3
|
const eslintConfig = [
|
|
4
4
|
...config,
|
|
5
|
+
{
|
|
6
|
+
rules: {
|
|
7
|
+
"tailwindcss/classnames-order": "off",
|
|
8
|
+
"tailwindcss/enforces-negative-arbitrary-values": "off",
|
|
9
|
+
"tailwindcss/enforces-shorthand": "off",
|
|
10
|
+
"tailwindcss/migration-from-tailwind-2": "off",
|
|
11
|
+
"tailwindcss/no-arbitrary-value": "off",
|
|
12
|
+
"tailwindcss/no-contradicting-classname": "off",
|
|
13
|
+
"tailwindcss/no-custom-classname": "off",
|
|
14
|
+
"tailwindcss/no-unnecessary-arbitrary-value": "off"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
5
17
|
{
|
|
6
18
|
files: ["rules/unicorn.js"],
|
|
7
19
|
rules: {
|
|
@@ -9,11 +21,7 @@ const eslintConfig = [
|
|
|
9
21
|
}
|
|
10
22
|
},
|
|
11
23
|
{
|
|
12
|
-
files: [
|
|
13
|
-
"plugins.js",
|
|
14
|
-
"rules/_exports.js",
|
|
15
|
-
"rules/func-params-args.js"
|
|
16
|
-
],
|
|
24
|
+
files: ["plugins.js", "rules/_exports.js", "rules/func-params-args.js"],
|
|
17
25
|
rules: {
|
|
18
26
|
"unicorn/prevent-abbreviations": [
|
|
19
27
|
"error",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pumpn/eslint-config",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.1.2",
|
|
4
4
|
"description": "standard eslint config for pumpn code projects",
|
|
5
5
|
"main": "config.js",
|
|
6
6
|
"author": "Nano Miratus <nanomiratus@gmail.com>",
|
|
@@ -17,30 +17,30 @@
|
|
|
17
17
|
"test": "echo 'no tests yet'"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"eslint": "^9.
|
|
20
|
+
"eslint": "^9.34.0"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@eslint-community/eslint-plugin-eslint-comments": "^4.
|
|
24
|
-
"@eslint-react/eslint-plugin": "^1.
|
|
25
|
-
"@stylistic/eslint-plugin": "^
|
|
26
|
-
"@typescript-eslint/parser": "^8.
|
|
27
|
-
"eslint-
|
|
28
|
-
"eslint-plugin-
|
|
29
|
-
"eslint-plugin-
|
|
30
|
-
"eslint-plugin-
|
|
23
|
+
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
|
|
24
|
+
"@eslint-react/eslint-plugin": "^1.53.0",
|
|
25
|
+
"@stylistic/eslint-plugin": "^5.3.1",
|
|
26
|
+
"@typescript-eslint/parser": "^8.42.0",
|
|
27
|
+
"eslint-import-resolver-typescript": "^4.4.4",
|
|
28
|
+
"eslint-plugin-command": "^3.3.1",
|
|
29
|
+
"eslint-plugin-depend": "^1.2.0",
|
|
30
|
+
"eslint-plugin-import-x": "^4.16.1",
|
|
31
|
+
"eslint-plugin-jsdoc": "^54.3.1",
|
|
31
32
|
"eslint-plugin-no-secrets": "^2.2.1",
|
|
32
|
-
"eslint-plugin-perfectionist": "^4.
|
|
33
|
+
"eslint-plugin-perfectionist": "^4.15.0",
|
|
33
34
|
"eslint-plugin-promise": "^7.2.1",
|
|
34
|
-
"eslint-plugin-
|
|
35
|
-
"eslint-plugin-
|
|
36
|
-
"eslint-plugin-regexp": "^2.7.0",
|
|
35
|
+
"eslint-plugin-redos": "^4.5.0",
|
|
36
|
+
"eslint-plugin-regexp": "^2.10.0",
|
|
37
37
|
"eslint-plugin-security": "^3.0.1",
|
|
38
|
-
"eslint-plugin-sonarjs": "^3.0.
|
|
39
|
-
"eslint-plugin-tailwindcss": "^
|
|
40
|
-
"eslint-plugin-unicorn": "^
|
|
41
|
-
"globals": "^16.
|
|
38
|
+
"eslint-plugin-sonarjs": "^3.0.5",
|
|
39
|
+
"eslint-plugin-tailwindcss": "^4.0.0-beta.0",
|
|
40
|
+
"eslint-plugin-unicorn": "^60.0.0",
|
|
41
|
+
"globals": "^16.3.0"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"eslint": "^9.
|
|
44
|
+
"eslint": "^9.34.0"
|
|
45
45
|
}
|
|
46
|
-
}
|
|
46
|
+
}
|
package/plugins.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
/* eslint-disable
|
|
1
|
+
// TODO [2025-10-01]: Remove this directive once https://github.com/eslint-stylistic/eslint-stylistic/issues/573 is resolved
|
|
2
|
+
/* eslint-disable object-shorthand -- see above */
|
|
3
3
|
/* eslint-disable import-x/max-dependencies -- collection file */
|
|
4
4
|
|
|
5
5
|
// import github from "eslint-plugin-github";
|
|
@@ -16,7 +16,7 @@ import noSecrets from "eslint-plugin-no-secrets";
|
|
|
16
16
|
import perfectionist from "eslint-plugin-perfectionist";
|
|
17
17
|
import promise from "eslint-plugin-promise";
|
|
18
18
|
import redos from "eslint-plugin-redos";
|
|
19
|
-
import regexp from "eslint-plugin-regexp";
|
|
19
|
+
import * as regexp from "eslint-plugin-regexp";
|
|
20
20
|
import security from "eslint-plugin-security";
|
|
21
21
|
import sonarjs from "eslint-plugin-sonarjs";
|
|
22
22
|
import tailwindcss from "eslint-plugin-tailwindcss";
|
|
@@ -38,22 +38,26 @@ const plugins = /** @type {const} */ ({
|
|
|
38
38
|
// "jsx-a11y": jsxA11y,
|
|
39
39
|
// "no-unsanitized": noUnsanitized,
|
|
40
40
|
"@eslint-community/eslint-comments": eslintComments,
|
|
41
|
-
"@stylistic":
|
|
41
|
+
"@stylistic": stylistic,
|
|
42
42
|
command,
|
|
43
43
|
depend,
|
|
44
|
+
// TODO [2025-10-01]: Remove assertion once https://github.com/un-ts/eslint-plugin-import-x/issues/421 is resolved
|
|
44
45
|
"import-x": /** @type {ESLint.Plugin} */ (
|
|
45
|
-
/** @type {unknown} */ (
|
|
46
|
+
/** @type {unknown} */ (
|
|
47
|
+
importX
|
|
48
|
+
)
|
|
46
49
|
),
|
|
47
50
|
jsdoc,
|
|
48
51
|
"no-secrets": noSecrets,
|
|
49
|
-
perfectionist
|
|
50
|
-
/** @type {unknown} */ (perfectionist)
|
|
51
|
-
),
|
|
52
|
+
perfectionist,
|
|
52
53
|
promise,
|
|
53
54
|
redos,
|
|
54
55
|
regexp,
|
|
55
56
|
security,
|
|
56
|
-
|
|
57
|
+
// TODO [2025-10-01]: Remove assertion once an issue is opened at https://community.sonarsource.com/ and resolved (:/)
|
|
58
|
+
sonarjs: /** @type {ESLint.Plugin} */ (
|
|
59
|
+
sonarjs
|
|
60
|
+
),
|
|
57
61
|
tailwindcss,
|
|
58
62
|
unicorn,
|
|
59
63
|
...reactPlugins
|
package/rules/command.js
CHANGED
package/rules/depend.js
CHANGED
package/rules/eslint-comments.js
CHANGED
package/rules/github.js
CHANGED
|
@@ -4,9 +4,9 @@ const helpfulWarningsRules = {
|
|
|
4
4
|
"import-x/no-empty-named-blocks": "error",
|
|
5
5
|
"import-x/no-extraneous-dependencies": "off",
|
|
6
6
|
"import-x/no-mutable-exports": "error",
|
|
7
|
-
"import-x/no-named-as-default": "
|
|
7
|
+
"import-x/no-named-as-default": "off",
|
|
8
8
|
"import-x/no-named-as-default-member": "error",
|
|
9
|
-
"import-x/no-rename-default": "
|
|
9
|
+
"import-x/no-rename-default": "off",
|
|
10
10
|
"import-x/no-unused-modules": [
|
|
11
11
|
"error",
|
|
12
12
|
{
|
|
@@ -57,7 +57,7 @@ const staticAnalysisRules = {
|
|
|
57
57
|
}
|
|
58
58
|
],
|
|
59
59
|
"import-x/no-self-import": "error",
|
|
60
|
-
// TODO [2025-
|
|
60
|
+
// TODO [2025-10-01]: Change to "error" when there is a resolver for deno (maybe https://github.com/redabacha/eslint-import-resolver-deno)
|
|
61
61
|
"import-x/no-unresolved": "off",
|
|
62
62
|
"import-x/no-useless-path-segments": [
|
|
63
63
|
"error",
|
|
@@ -4,7 +4,14 @@ const styleGuideRules = {
|
|
|
4
4
|
"import-x/consistent-type-specifier-style": "error",
|
|
5
5
|
"import-x/dynamic-import-chunkname": "off",
|
|
6
6
|
"import-x/exports-last": "error",
|
|
7
|
-
"import-x/extensions": [
|
|
7
|
+
"import-x/extensions": [
|
|
8
|
+
"error",
|
|
9
|
+
"ignorePackages",
|
|
10
|
+
{
|
|
11
|
+
checkTypeImports: true,
|
|
12
|
+
fix: true
|
|
13
|
+
}
|
|
14
|
+
],
|
|
8
15
|
"import-x/first": "error",
|
|
9
16
|
"import-x/group-exports": "error",
|
|
10
17
|
"import-x/max-dependencies": [
|
|
@@ -75,7 +82,8 @@ const styleGuideRules = {
|
|
|
75
82
|
warnOnUnassignedImports: false
|
|
76
83
|
}
|
|
77
84
|
],
|
|
78
|
-
"import-x/prefer-default-export": ["error", { target: "single" }]
|
|
85
|
+
"import-x/prefer-default-export": ["error", { target: "single" }],
|
|
86
|
+
"import-x/prefer-namespace-import": ["error", { patterns: ["react"] }]
|
|
79
87
|
};
|
|
80
88
|
|
|
81
89
|
export default styleGuideRules;
|
package/rules/import-x.js
CHANGED
package/rules/jsdoc.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @import { Linter } from "eslint"
|
|
2
|
+
* @import { Linter } from "eslint";
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -144,7 +144,7 @@ const jsdocRules = {
|
|
|
144
144
|
}
|
|
145
145
|
],
|
|
146
146
|
"jsdoc/require-description-complete-sentence": "off",
|
|
147
|
-
"jsdoc/require-example": "
|
|
147
|
+
"jsdoc/require-example": "off",
|
|
148
148
|
"jsdoc/require-file-overview": [
|
|
149
149
|
"off",
|
|
150
150
|
{
|
|
@@ -163,31 +163,7 @@ const jsdocRules = {
|
|
|
163
163
|
}
|
|
164
164
|
],
|
|
165
165
|
"jsdoc/require-hyphen-before-param-description": ["warn", "always"],
|
|
166
|
-
"jsdoc/require-jsdoc":
|
|
167
|
-
"warn",
|
|
168
|
-
{
|
|
169
|
-
contexts: [
|
|
170
|
-
`
|
|
171
|
-
:not(
|
|
172
|
-
:matches(
|
|
173
|
-
ObjectExpression > Property,
|
|
174
|
-
ArrayExpression:has(Literal ~ ArrowFunctionExpression),
|
|
175
|
-
CallExpression,
|
|
176
|
-
Property > AssignmentPattern
|
|
177
|
-
)
|
|
178
|
-
) > ArrowFunctionExpression
|
|
179
|
-
`.replaceAll(/\s/gv, "")
|
|
180
|
-
],
|
|
181
|
-
require: {
|
|
182
|
-
ArrowFunctionExpression: false,
|
|
183
|
-
ClassDeclaration: true,
|
|
184
|
-
ClassExpression: true,
|
|
185
|
-
FunctionDeclaration: true,
|
|
186
|
-
FunctionExpression: false,
|
|
187
|
-
MethodDefinition: true
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
],
|
|
166
|
+
"jsdoc/require-jsdoc": "off",
|
|
191
167
|
"jsdoc/require-param": ["warn", { unnamedRootBase: ["options"] }],
|
|
192
168
|
"jsdoc/require-param-description": [
|
|
193
169
|
"warn",
|
package/rules/jsx-a11y.js
CHANGED
package/rules/no-secrets.js
CHANGED
package/rules/no-unsanitized.js
CHANGED
package/rules/perfectionist.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @import { Linter } from "eslint"
|
|
2
|
+
* @import { Linter } from "eslint";
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -9,7 +9,8 @@ const perfectionistRules = {
|
|
|
9
9
|
"perfectionist/sort-array-includes": [
|
|
10
10
|
"error",
|
|
11
11
|
{
|
|
12
|
-
groupKind: "
|
|
12
|
+
groupKind: "mixed",
|
|
13
|
+
groups: ["literal", "spread"]
|
|
13
14
|
}
|
|
14
15
|
],
|
|
15
16
|
"perfectionist/sort-classes": [
|
|
@@ -43,8 +44,10 @@ const perfectionistRules = {
|
|
|
43
44
|
partitionByNewLine: false
|
|
44
45
|
}
|
|
45
46
|
],
|
|
46
|
-
"perfectionist/sort-
|
|
47
|
-
"perfectionist/sort-
|
|
47
|
+
"perfectionist/sort-decorators": "error",
|
|
48
|
+
"perfectionist/sort-enums": "error",
|
|
49
|
+
"perfectionist/sort-exports": "error",
|
|
50
|
+
"perfectionist/sort-heritage-clauses": "error",
|
|
48
51
|
"perfectionist/sort-imports": [
|
|
49
52
|
"error",
|
|
50
53
|
{
|
|
@@ -80,36 +83,25 @@ const perfectionistRules = {
|
|
|
80
83
|
"index",
|
|
81
84
|
"unknown"
|
|
82
85
|
],
|
|
83
|
-
internalPattern: ["
|
|
86
|
+
internalPattern: ["^@/.+"],
|
|
84
87
|
newlinesBetween: "always",
|
|
85
88
|
partitionByNewLine: false,
|
|
86
89
|
sortSideEffects: true
|
|
87
90
|
}
|
|
88
91
|
],
|
|
89
|
-
"perfectionist/sort-interfaces":
|
|
90
|
-
"perfectionist/sort-intersection-types":
|
|
92
|
+
"perfectionist/sort-interfaces": "error",
|
|
93
|
+
"perfectionist/sort-intersection-types": "error",
|
|
91
94
|
"perfectionist/sort-jsx-props": [
|
|
92
95
|
"error",
|
|
93
96
|
{
|
|
94
|
-
groups: [
|
|
95
|
-
"shorthand",
|
|
96
|
-
"unknown",
|
|
97
|
-
"multiline"
|
|
98
|
-
]
|
|
99
|
-
}
|
|
100
|
-
],
|
|
101
|
-
"perfectionist/sort-maps": [
|
|
102
|
-
"error",
|
|
103
|
-
{
|
|
104
|
-
ignoreCase: false,
|
|
105
|
-
order: "asc",
|
|
106
|
-
partitionByNewLine: true,
|
|
107
|
-
type: "natural"
|
|
97
|
+
groups: ["shorthand", "unknown", "multiline"]
|
|
108
98
|
}
|
|
109
99
|
],
|
|
110
|
-
"perfectionist/sort-
|
|
100
|
+
"perfectionist/sort-maps": "error",
|
|
101
|
+
"perfectionist/sort-modules": "off",
|
|
102
|
+
"perfectionist/sort-named-exports": "error",
|
|
111
103
|
"perfectionist/sort-named-imports": ["error", { partitionByComment: false }],
|
|
112
|
-
"perfectionist/sort-object-types":
|
|
104
|
+
"perfectionist/sort-object-types": "error",
|
|
113
105
|
"perfectionist/sort-objects": [
|
|
114
106
|
"error",
|
|
115
107
|
{
|
|
@@ -118,11 +110,7 @@ const perfectionistRules = {
|
|
|
118
110
|
groupBeforeAfter1: ["^before.*"],
|
|
119
111
|
groupBeforeAfter2: ["^after.*"],
|
|
120
112
|
groupColor1: ["^r$", "^l$"],
|
|
121
|
-
groupColor2: [
|
|
122
|
-
"^g$",
|
|
123
|
-
"^c$",
|
|
124
|
-
"^a$"
|
|
125
|
-
],
|
|
113
|
+
groupColor2: ["^g$", "^c$", "^a$"],
|
|
126
114
|
groupColor3: ["^b$", "^h$"],
|
|
127
115
|
groupMinimumMaximum1: ["^minimum(([A-Z].*)|$)"],
|
|
128
116
|
groupMinimumMaximum2: ["^maximum(([A-Z].*)|$)"],
|
|
@@ -196,9 +184,9 @@ const perfectionistRules = {
|
|
|
196
184
|
]
|
|
197
185
|
}
|
|
198
186
|
],
|
|
199
|
-
"perfectionist/sort-sets":
|
|
200
|
-
"perfectionist/sort-switch-case":
|
|
201
|
-
"perfectionist/sort-union-types":
|
|
187
|
+
"perfectionist/sort-sets": "error",
|
|
188
|
+
"perfectionist/sort-switch-case": "error",
|
|
189
|
+
"perfectionist/sort-union-types": "error",
|
|
202
190
|
"perfectionist/sort-variable-declarations": ["error", { partitionByComment: false }]
|
|
203
191
|
};
|
|
204
192
|
|
package/rules/promise.js
CHANGED
|
@@ -1,20 +1,34 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @import { Linter } from "eslint"
|
|
2
|
+
* @import { Linter } from "eslint";
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @satisfies {Linter.RulesRecord}
|
|
7
7
|
*/
|
|
8
8
|
const promiseRules = {
|
|
9
|
-
"promise/always-return":
|
|
9
|
+
"promise/always-return": [
|
|
10
|
+
"error",
|
|
11
|
+
{
|
|
12
|
+
ignoreAssignmentVariable: ["globalThis"],
|
|
13
|
+
ignoreLastCallback: false
|
|
14
|
+
}
|
|
15
|
+
],
|
|
10
16
|
"promise/avoid-new": "off",
|
|
11
|
-
"promise/catch-or-return":
|
|
17
|
+
"promise/catch-or-return": [
|
|
18
|
+
"error",
|
|
19
|
+
{
|
|
20
|
+
allowFinally: false,
|
|
21
|
+
allowThen: false,
|
|
22
|
+
allowThenStrict: false,
|
|
23
|
+
terminationMethod: ["catch"]
|
|
24
|
+
}
|
|
25
|
+
],
|
|
12
26
|
"promise/no-callback-in-promise": "error",
|
|
13
27
|
"promise/no-multiple-resolved": "error",
|
|
14
28
|
"promise/no-native": "off",
|
|
15
29
|
"promise/no-nesting": "error",
|
|
16
30
|
"promise/no-new-statics": "error",
|
|
17
|
-
"promise/no-promise-in-callback": "error",
|
|
31
|
+
"promise/no-promise-in-callback": ["error", { timeoutsErr: false }],
|
|
18
32
|
"promise/no-return-in-finally": "error",
|
|
19
33
|
"promise/no-return-wrap": "error",
|
|
20
34
|
"promise/param-names": [
|
|
@@ -26,8 +40,9 @@ const promiseRules = {
|
|
|
26
40
|
],
|
|
27
41
|
"promise/prefer-await-to-callbacks": "error",
|
|
28
42
|
"promise/prefer-await-to-then": ["error", { strict: true }],
|
|
43
|
+
"promise/prefer-catch": "error",
|
|
29
44
|
"promise/spec-only": "error",
|
|
30
|
-
"promise/valid-params": "error"
|
|
45
|
+
"promise/valid-params": ["error", { exclude: [] }]
|
|
31
46
|
};
|
|
32
47
|
|
|
33
48
|
export default promiseRules;
|
package/rules/react.js
CHANGED
package/rules/redos.js
CHANGED
package/rules/regexp.js
CHANGED
package/rules/security.js
CHANGED
|
@@ -6,7 +6,6 @@ const bugDetectionRules = {
|
|
|
6
6
|
"sonarjs/no-identical-conditions": "error",
|
|
7
7
|
"sonarjs/no-identical-expressions": "error",
|
|
8
8
|
"sonarjs/no-ignored-return": "error",
|
|
9
|
-
"sonarjs/no-one-iteration-loop": "error",
|
|
10
9
|
"sonarjs/no-use-of-empty-return-value": "error",
|
|
11
10
|
"sonarjs/non-existent-operator": "error"
|
|
12
11
|
};
|
package/rules/sonarjs.js
CHANGED
package/rules/stylistic/jsx.js
CHANGED
|
@@ -11,7 +11,6 @@ const jsxRules = {
|
|
|
11
11
|
],
|
|
12
12
|
"@stylistic/jsx-one-expression-per-line": ["error", { allow: "single-line" }],
|
|
13
13
|
"@stylistic/jsx-pascal-case": ["error", { allowNamespace: true }],
|
|
14
|
-
"@stylistic/jsx-props-no-multi-spaces": "error",
|
|
15
14
|
"@stylistic/jsx-self-closing-comp": "error",
|
|
16
15
|
"@stylistic/jsx-sort-props": [
|
|
17
16
|
"off",
|
|
@@ -38,25 +38,13 @@ const lineBreaksRules = {
|
|
|
38
38
|
blankLine: "always"
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
|
-
prev: [
|
|
42
|
-
"const",
|
|
43
|
-
"let",
|
|
44
|
-
"var"
|
|
45
|
-
],
|
|
41
|
+
prev: ["const", "let", "var"],
|
|
46
42
|
next: "*",
|
|
47
43
|
blankLine: "always"
|
|
48
44
|
},
|
|
49
45
|
{
|
|
50
|
-
prev: [
|
|
51
|
-
|
|
52
|
-
"let",
|
|
53
|
-
"var"
|
|
54
|
-
],
|
|
55
|
-
next: [
|
|
56
|
-
"const",
|
|
57
|
-
"let",
|
|
58
|
-
"var"
|
|
59
|
-
],
|
|
46
|
+
prev: ["const", "let", "var"],
|
|
47
|
+
next: ["const", "let", "var"],
|
|
60
48
|
blankLine: "any"
|
|
61
49
|
},
|
|
62
50
|
{
|
package/rules/stylistic.js
CHANGED
package/rules/suggestions.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @import { Linter } from "eslint"
|
|
2
|
+
* @import { Linter } from "eslint";
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
const minIdentifierLength = 2;
|
|
@@ -53,11 +53,7 @@ const suggestionsRules = {
|
|
|
53
53
|
"dot-notation": "error",
|
|
54
54
|
eqeqeq: "error",
|
|
55
55
|
"func-name-matching": "error",
|
|
56
|
-
"func-names": [
|
|
57
|
-
"error",
|
|
58
|
-
"as-needed",
|
|
59
|
-
{ generators: "as-needed" }
|
|
60
|
-
],
|
|
56
|
+
"func-names": ["error", "as-needed", { generators: "as-needed" }],
|
|
61
57
|
"func-style": "error",
|
|
62
58
|
"grouped-accessor-pairs": "error",
|
|
63
59
|
"guard-for-in": "off",
|
|
@@ -67,11 +63,7 @@ const suggestionsRules = {
|
|
|
67
63
|
{
|
|
68
64
|
min: minIdentifierLength,
|
|
69
65
|
max: maxIdentifierLength,
|
|
70
|
-
exceptions: [
|
|
71
|
-
"x",
|
|
72
|
-
"y",
|
|
73
|
-
"z"
|
|
74
|
-
],
|
|
66
|
+
exceptions: ["x", "y", "z"],
|
|
75
67
|
properties: "never"
|
|
76
68
|
}
|
|
77
69
|
],
|
|
@@ -88,11 +80,7 @@ const suggestionsRules = {
|
|
|
88
80
|
"no-console": [
|
|
89
81
|
"error",
|
|
90
82
|
{
|
|
91
|
-
allow: [
|
|
92
|
-
"warn",
|
|
93
|
-
"error",
|
|
94
|
-
"info"
|
|
95
|
-
]
|
|
83
|
+
allow: ["warn", "error", "info"]
|
|
96
84
|
}
|
|
97
85
|
],
|
|
98
86
|
"no-continue": "off",
|
package/rules/tailwindcss.js
CHANGED