@pumpn/eslint-config 15.5.2 → 15.6.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/config.js +29 -2
- package/deno.json +9 -8
- package/deno.lock +1047 -1375
- package/package.json +11 -15
- package/plugins.js +23 -6
- package/rules/depend.js +7 -0
- package/rules/eslint-comments.js +7 -0
- package/rules/func-params-args.js +8 -0
- package/rules/github.js +7 -0
- package/rules/import-x/static-analysis.js +1 -1
- package/rules/import-x.js +7 -0
- package/rules/jsdoc.js +8 -1
- package/rules/jsx-a11y.js +7 -0
- package/rules/layout-and-formatting.js +7 -0
- package/rules/no-secrets.js +7 -0
- package/rules/no-unsanitized.js +7 -0
- package/rules/perfectionist.js +56 -48
- package/rules/possible-problems.js +7 -0
- package/rules/promise.js +7 -0
- package/rules/react.js +7 -0
- package/rules/redos.js +7 -0
- package/rules/regexp/best-practices.js +1 -2
- package/rules/regexp.js +7 -0
- package/rules/security.js +7 -0
- package/rules/sonarjs.js +7 -0
- package/rules/stylistic.js +7 -0
- package/rules/suggestions.js +7 -0
- package/rules/tailwindcss.js +7 -0
- package/rules/unicorn.js +17 -10
- package/rules.js +8 -1
- package/scripts/update-package-json.js +46 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pumpn/eslint-config",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.6.1",
|
|
4
4
|
"description": "standard eslint config for pumpn code projects",
|
|
5
5
|
"main": "config.js",
|
|
6
6
|
"author": "Nano Miratus <nanomiratus@gmail.com>",
|
|
@@ -17,35 +17,31 @@
|
|
|
17
17
|
"test": "echo 'no tests yet'"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"eslint": "^9.
|
|
20
|
+
"eslint": "^9.19.0"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
|
|
24
24
|
"@eslint-react/eslint-plugin": "^1.15.0",
|
|
25
|
-
"@stylistic/eslint-plugin": "^
|
|
25
|
+
"@stylistic/eslint-plugin": "^3.0.1",
|
|
26
26
|
"@typescript-eslint/parser": "^8.11.0",
|
|
27
|
-
"eslint-plugin-depend": "^0.
|
|
27
|
+
"eslint-plugin-depend": "^0.12.0",
|
|
28
28
|
"eslint-plugin-disable-autofix": "^5.0.1",
|
|
29
29
|
"eslint-plugin-func-params-args": "^4.0.0",
|
|
30
30
|
"eslint-plugin-import-x": "^4.3.1",
|
|
31
31
|
"eslint-plugin-jsdoc": "^50.4.3",
|
|
32
|
-
"eslint-plugin-no-secrets": "^
|
|
33
|
-
"eslint-plugin-perfectionist": "^
|
|
32
|
+
"eslint-plugin-no-secrets": "^2.2.1",
|
|
33
|
+
"eslint-plugin-perfectionist": "^4.8.0",
|
|
34
34
|
"eslint-plugin-promise": "^7.1.0",
|
|
35
|
+
"eslint-plugin-react": "^7.35.0",
|
|
35
36
|
"eslint-plugin-redos": "^4.4.5",
|
|
36
37
|
"eslint-plugin-regexp": "^2.6.0",
|
|
37
38
|
"eslint-plugin-security": "^3.0.1",
|
|
38
|
-
"eslint-plugin-sonarjs": "^
|
|
39
|
-
"eslint-plugin-tailwindcss": "^3.
|
|
39
|
+
"eslint-plugin-sonarjs": "^3.0.1",
|
|
40
|
+
"eslint-plugin-tailwindcss": "^3.18.0",
|
|
40
41
|
"eslint-plugin-unicorn": "^56.0.0",
|
|
41
|
-
"globals": "^15.
|
|
42
|
+
"globals": "^15.14.0"
|
|
42
43
|
},
|
|
43
44
|
"peerDependencies": {
|
|
44
|
-
"eslint": "^9.
|
|
45
|
-
},
|
|
46
|
-
"overrides": {
|
|
47
|
-
"@typescript-eslint/type-utils": "^8.11.0",
|
|
48
|
-
"@typescript-eslint/utils": "^8.11.0",
|
|
49
|
-
"eslint": "^9.13.0"
|
|
45
|
+
"eslint": "^9.19.0"
|
|
50
46
|
}
|
|
51
47
|
}
|
package/plugins.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
/* eslint-disable object-shorthand -- const types */
|
|
1
2
|
/* eslint-disable import-x/no-rename-default -- bad export names */
|
|
2
3
|
/* eslint-disable import-x/max-dependencies -- collection file */
|
|
4
|
+
|
|
3
5
|
// import github from "eslint-plugin-github";
|
|
4
6
|
// import jsxA11y from "eslint-plugin-jsx-a11y";
|
|
5
7
|
// import noUnsanitized from "eslint-plugin-no-unsanitized";
|
|
@@ -21,19 +23,34 @@ import sonarjs from "eslint-plugin-sonarjs";
|
|
|
21
23
|
import tailwindcss from "eslint-plugin-tailwindcss";
|
|
22
24
|
import unicorn from "eslint-plugin-unicorn";
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
/**
|
|
27
|
+
* @import { Linter, ESLint } from "eslint"
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
const reactPlugins = /** @type {Record<string, ESLint.Plugin>} */ (
|
|
31
|
+
/** @type {unknown} */ (react.configs.all.plugins)
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @satisfies { Linter.Config["plugins"] }
|
|
36
|
+
*/
|
|
37
|
+
const plugins = /** @type {const} */ ({
|
|
25
38
|
// github,
|
|
26
39
|
// "jsx-a11y": jsxA11y,
|
|
27
40
|
// "no-unsanitized": noUnsanitized,
|
|
28
41
|
"@eslint-community/eslint-comments": eslintComments,
|
|
29
|
-
"@stylistic": stylistic,
|
|
42
|
+
"@stylistic": /** @type {ESLint.Plugin} */ (stylistic),
|
|
30
43
|
depend,
|
|
31
44
|
"disable-autofix": disableAutofix,
|
|
32
45
|
"func-params-args": funcParamsArgs,
|
|
33
|
-
"import-x":
|
|
46
|
+
"import-x": /** @type {ESLint.Plugin} */ (
|
|
47
|
+
/** @type {unknown} */ (importX)
|
|
48
|
+
),
|
|
34
49
|
jsdoc,
|
|
35
50
|
"no-secrets": noSecrets,
|
|
36
|
-
perfectionist
|
|
51
|
+
perfectionist: /** @type {ESLint.Plugin} */ (
|
|
52
|
+
/** @type {unknown} */ (perfectionist)
|
|
53
|
+
),
|
|
37
54
|
promise,
|
|
38
55
|
redos,
|
|
39
56
|
regexp,
|
|
@@ -41,7 +58,7 @@ const plugins = {
|
|
|
41
58
|
sonarjs,
|
|
42
59
|
tailwindcss,
|
|
43
60
|
unicorn,
|
|
44
|
-
...
|
|
45
|
-
};
|
|
61
|
+
...reactPlugins
|
|
62
|
+
});
|
|
46
63
|
|
|
47
64
|
export default plugins;
|
package/rules/depend.js
CHANGED
package/rules/eslint-comments.js
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import * as eslintCommentsRuleSets from "./eslint-comments/_exports.js";
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @import { Linter } from "eslint"
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @satisfies {Linter.RulesRecord}
|
|
9
|
+
*/
|
|
3
10
|
const eslintCommentsRules = Object.values(eslintCommentsRuleSets)
|
|
4
11
|
.reduce(
|
|
5
12
|
(allRules, ruleSet) => ({
|
package/rules/github.js
CHANGED
|
@@ -57,7 +57,7 @@ const staticAnalysisRules = {
|
|
|
57
57
|
}
|
|
58
58
|
],
|
|
59
59
|
"import-x/no-self-import": "error",
|
|
60
|
-
// TODO [
|
|
60
|
+
// TODO [2025-03-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",
|
package/rules/import-x.js
CHANGED
package/rules/jsdoc.js
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @import { Linter } from "eslint"
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @satisfies {Linter.RulesRecord}
|
|
7
|
+
*/
|
|
1
8
|
const jsdocRules = {
|
|
2
9
|
"jsdoc/check-access": "warn",
|
|
3
10
|
"jsdoc/check-alignment": "warn",
|
|
@@ -169,7 +176,7 @@ const jsdocRules = {
|
|
|
169
176
|
Property > AssignmentPattern
|
|
170
177
|
)
|
|
171
178
|
) > ArrowFunctionExpression
|
|
172
|
-
`.replaceAll(/\s/
|
|
179
|
+
`.replaceAll(/\s/gv, "")
|
|
173
180
|
],
|
|
174
181
|
require: {
|
|
175
182
|
ArrowFunctionExpression: false,
|
package/rules/jsx-a11y.js
CHANGED
package/rules/no-secrets.js
CHANGED
package/rules/no-unsanitized.js
CHANGED
package/rules/perfectionist.js
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @import { Linter } from "eslint"
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @satisfies {Linter.RulesRecord}
|
|
7
|
+
*/
|
|
1
8
|
const perfectionistRules = {
|
|
2
9
|
"perfectionist/sort-array-includes": [
|
|
3
10
|
"error",
|
|
@@ -10,12 +17,12 @@ const perfectionistRules = {
|
|
|
10
17
|
{
|
|
11
18
|
groups: [
|
|
12
19
|
"index-signature",
|
|
20
|
+
["private-static-property", "private-static-accessor-property"],
|
|
21
|
+
["private-static-get-method", "private-static-set-method"],
|
|
13
22
|
["static-property", "static-accessor-property"],
|
|
14
23
|
["static-get-method", "static-set-method"],
|
|
15
24
|
["protected-static-property", "protected-static-accessor-property"],
|
|
16
25
|
["protected-static-get-method", "protected-static-set-method"],
|
|
17
|
-
["private-static-property", "private-static-accessor-property"],
|
|
18
|
-
["private-static-get-method", "private-static-set-method"],
|
|
19
26
|
"static-block",
|
|
20
27
|
["property", "accessor-property"],
|
|
21
28
|
["get-method", "set-method"],
|
|
@@ -32,7 +39,7 @@ const perfectionistRules = {
|
|
|
32
39
|
["private-method", "private-function-property"],
|
|
33
40
|
"unknown"
|
|
34
41
|
],
|
|
35
|
-
partitionByComment:
|
|
42
|
+
partitionByComment: String.raw`\/\/`
|
|
36
43
|
}
|
|
37
44
|
],
|
|
38
45
|
"perfectionist/sort-enums": ["error"],
|
|
@@ -43,12 +50,12 @@ const perfectionistRules = {
|
|
|
43
50
|
customGroups: {
|
|
44
51
|
type: {},
|
|
45
52
|
value: {
|
|
46
|
-
components: "
|
|
47
|
-
islands: "
|
|
48
|
-
logic: "
|
|
49
|
-
plugins: "
|
|
50
|
-
std: "
|
|
51
|
-
utilities: "
|
|
53
|
+
components: "^@/components/.*",
|
|
54
|
+
islands: "^@/islands/.*",
|
|
55
|
+
logic: "^@/logic/.*",
|
|
56
|
+
plugins: "^@/plugins/.*",
|
|
57
|
+
std: "^@std/.*",
|
|
58
|
+
utilities: "^@/utilities/.*"
|
|
52
59
|
}
|
|
53
60
|
},
|
|
54
61
|
groups: [
|
|
@@ -72,8 +79,9 @@ const perfectionistRules = {
|
|
|
72
79
|
"index",
|
|
73
80
|
"unknown"
|
|
74
81
|
],
|
|
75
|
-
internalPattern: ["
|
|
82
|
+
internalPattern: ["^@/.*"],
|
|
76
83
|
newlinesBetween: "always",
|
|
84
|
+
partitionByNewLine: false,
|
|
77
85
|
sortSideEffects: true
|
|
78
86
|
}
|
|
79
87
|
],
|
|
@@ -97,46 +105,46 @@ const perfectionistRules = {
|
|
|
97
105
|
"error",
|
|
98
106
|
{
|
|
99
107
|
customGroups: {
|
|
100
|
-
id: ["id"],
|
|
101
|
-
groupBeforeAfter1: ["before
|
|
102
|
-
groupBeforeAfter2: ["after
|
|
103
|
-
groupColor1: ["r", "l"],
|
|
108
|
+
id: ["^id$"],
|
|
109
|
+
groupBeforeAfter1: ["^before.*"],
|
|
110
|
+
groupBeforeAfter2: ["^after.*"],
|
|
111
|
+
groupColor1: ["^r$", "^l$"],
|
|
104
112
|
groupColor2: [
|
|
105
|
-
"g",
|
|
106
|
-
"c",
|
|
107
|
-
"a"
|
|
113
|
+
"^g$",
|
|
114
|
+
"^c$",
|
|
115
|
+
"^a$"
|
|
108
116
|
],
|
|
109
|
-
groupColor3: ["b", "h"],
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
groupPrecedenceOrdinal1: ["primary
|
|
115
|
-
groupPrecedenceOrdinal2: ["secondary
|
|
116
|
-
groupPrecedenceOrdinal3: ["tertiary
|
|
117
|
-
groupPrecedenceOrdinal4: ["quaternary
|
|
118
|
-
groupPrecedenceOrdinal5: ["quinary
|
|
119
|
-
groupPrecedenceOrdinal6: ["senary
|
|
120
|
-
groupPrecedenceOrdinal7: ["septenary
|
|
121
|
-
groupPrecedenceOrdinal8: ["octonary
|
|
122
|
-
groupPrecedenceOrdinal9: ["nonary
|
|
123
|
-
groupPrecedenceOrdinal10: ["denary
|
|
124
|
-
groupPrecedenceOrdinalLast: ["ultimate
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
groupSpatialOrdinal1: ["first
|
|
130
|
-
groupSpatialOrdinal2: ["second
|
|
131
|
-
groupSpatialOrdinal3: ["third
|
|
132
|
-
groupSpatialOrdinal4: ["fourth
|
|
133
|
-
groupSpatialOrdinal5: ["fifth
|
|
134
|
-
groupSpatialOrdinal6: ["sixth
|
|
135
|
-
groupSpatialOrdinal7: ["seventh
|
|
136
|
-
groupSpatialOrdinal8: ["eighth
|
|
137
|
-
groupSpatialOrdinal9: ["ninth
|
|
138
|
-
groupSpatialOrdinal10: ["tenth
|
|
139
|
-
groupSpatialOrdinalLast: ["last
|
|
117
|
+
groupColor3: ["^b$", "^h$"],
|
|
118
|
+
groupMinimumMaximum1: ["^minimum(([A-Z].*)|$)"],
|
|
119
|
+
groupMinimumMaximum2: ["^maximum(([A-Z].*)|$)"],
|
|
120
|
+
groupMinMax1: ["^min(([A-Z_-].*)|$)"],
|
|
121
|
+
groupMinMax2: ["^max(([A-Z_-].*)|$)"],
|
|
122
|
+
groupPrecedenceOrdinal1: ["^primary.*"],
|
|
123
|
+
groupPrecedenceOrdinal2: ["^secondary.*"],
|
|
124
|
+
groupPrecedenceOrdinal3: ["^tertiary.*"],
|
|
125
|
+
groupPrecedenceOrdinal4: ["^quaternary.*"],
|
|
126
|
+
groupPrecedenceOrdinal5: ["^quinary.*"],
|
|
127
|
+
groupPrecedenceOrdinal6: ["^senary.*"],
|
|
128
|
+
groupPrecedenceOrdinal7: ["^septenary.*"],
|
|
129
|
+
groupPrecedenceOrdinal8: ["^octonary.*"],
|
|
130
|
+
groupPrecedenceOrdinal9: ["^nonary.*"],
|
|
131
|
+
groupPrecedenceOrdinal10: ["^denary.*"],
|
|
132
|
+
groupPrecedenceOrdinalLast: ["^ultimate.*"],
|
|
133
|
+
groupPreviousNext1: ["^previous.*"],
|
|
134
|
+
groupPreviousNext2: ["^next.*"],
|
|
135
|
+
groupPrevNext1: ["^prev(?!ent).*"],
|
|
136
|
+
groupPrevNext2: ["^next.*"],
|
|
137
|
+
groupSpatialOrdinal1: ["^first.*"],
|
|
138
|
+
groupSpatialOrdinal2: ["^second.*"],
|
|
139
|
+
groupSpatialOrdinal3: ["^third.*"],
|
|
140
|
+
groupSpatialOrdinal4: ["^fourth.*"],
|
|
141
|
+
groupSpatialOrdinal5: ["^fifth.*"],
|
|
142
|
+
groupSpatialOrdinal6: ["^sixth.*"],
|
|
143
|
+
groupSpatialOrdinal7: ["^seventh.*"],
|
|
144
|
+
groupSpatialOrdinal8: ["^eighth.*"],
|
|
145
|
+
groupSpatialOrdinal9: ["^ninth.*"],
|
|
146
|
+
groupSpatialOrdinal10: ["^tenth.*"],
|
|
147
|
+
groupSpatialOrdinalLast: ["^last.*"]
|
|
140
148
|
},
|
|
141
149
|
groups: [
|
|
142
150
|
"id",
|
package/rules/promise.js
CHANGED
package/rules/react.js
CHANGED
package/rules/redos.js
CHANGED
|
@@ -33,8 +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
|
-
|
|
37
|
-
"regexp/require-unicode-sets-regexp": "off",
|
|
36
|
+
"regexp/require-unicode-sets-regexp": "error",
|
|
38
37
|
"regexp/simplify-set-operations": "error",
|
|
39
38
|
"regexp/sort-alternatives": "error",
|
|
40
39
|
"regexp/use-ignore-case": "error"
|
package/rules/regexp.js
CHANGED
package/rules/security.js
CHANGED
package/rules/sonarjs.js
CHANGED
package/rules/stylistic.js
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import * as stylisticRuleSets from "./stylistic/_exports.js";
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @import { Linter } from "eslint"
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @satisfies {Linter.RulesRecord}
|
|
9
|
+
*/
|
|
3
10
|
const stylisticRules = Object.values(stylisticRuleSets)
|
|
4
11
|
.reduce(
|
|
5
12
|
(allRules, ruleSet) => ({
|
package/rules/suggestions.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @import { Linter } from "eslint"
|
|
3
|
+
*/
|
|
4
|
+
|
|
1
5
|
const minIdentifierLength = 2;
|
|
2
6
|
const maxIdentifierLength = 30;
|
|
3
7
|
const maxClassesPerFile = 1;
|
|
@@ -8,6 +12,9 @@ const maxNestedCallbacks = 10;
|
|
|
8
12
|
const maxParameters = 3;
|
|
9
13
|
const maxStatements = 20;
|
|
10
14
|
|
|
15
|
+
/**
|
|
16
|
+
* @satisfies {Linter.RulesRecord}
|
|
17
|
+
*/
|
|
11
18
|
const suggestionsRules = {
|
|
12
19
|
"max-classes-per-file": ["error", maxClassesPerFile],
|
|
13
20
|
"max-depth": ["error", maxDepth],
|
package/rules/tailwindcss.js
CHANGED
package/rules/unicorn.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @import { Linter } from "eslint"
|
|
3
|
+
*/
|
|
4
|
+
|
|
1
5
|
const hexadecimalGroupLength = 2;
|
|
2
6
|
const binaryGroupLength = 4;
|
|
3
7
|
const octalGroupLength = 4;
|
|
@@ -5,31 +9,34 @@ const numberGroupLength = 3;
|
|
|
5
9
|
|
|
6
10
|
const patterns = {
|
|
7
11
|
"'": "’",
|
|
8
|
-
"(
|
|
12
|
+
"(?<=“[^“]*?\\s)['‘]([^'‘]+?)['’](?=\\s[^“]*?”)": "‘$1’",
|
|
9
13
|
"(?<=[!?])”\\.(?=(?:(?:\\s+[\\p{Letter}\\p{Number}])|$))": "”",
|
|
14
|
+
"(?<=[!?])\\.": "",
|
|
10
15
|
"(?<=[\\p{Letter}\\p{Number}] )-+(?= [\\p{Letter}\\p{Number}])": "—",
|
|
11
16
|
"(?<=\\p{Punctuation})\\p{Zs}{2,}(?=[\\p{Letter}\\p{Number}])": " ",
|
|
12
|
-
"(?<=“[^“]*?\\s)['‘]([^'‘]+?)['’](?=\\s[^“]*?”)": "‘$1’",
|
|
13
17
|
"([\"'])((?:\\\\.|[^\\\\])*?)\\1": "“$2”",
|
|
18
|
+
"-->": "⟶",
|
|
19
|
+
"->": "→",
|
|
20
|
+
"\\.”\\.(?=(?:(?:\\s+[\\p{Letter}\\p{Number}])|$))": ".”",
|
|
21
|
+
"<-": "←",
|
|
22
|
+
"<--": "⟵",
|
|
23
|
+
"<-->": "⟷",
|
|
24
|
+
"<->": "↔",
|
|
14
25
|
"<=": "≤",
|
|
15
26
|
"<==": "⇐",
|
|
16
27
|
"<===": "⟸",
|
|
17
28
|
"<==>": "⟺",
|
|
18
29
|
"<=>": "⇔",
|
|
19
|
-
"<-": "←",
|
|
20
|
-
"<->": "↔",
|
|
21
|
-
"<--": "⟵",
|
|
22
|
-
"<-->": "⟷",
|
|
23
30
|
"===>": "⟹",
|
|
24
31
|
"==>": "⇒",
|
|
25
32
|
">=": "≥",
|
|
26
33
|
"\\.\\.(?=(?:(?:\\s+[\\p{Letter}\\p{Number}])|$))": ".",
|
|
27
|
-
"\\.\\.\\.": "…"
|
|
28
|
-
"\\.”\\.(?=(?:(?:\\s+[\\p{Letter}\\p{Number}])|$))": ".”",
|
|
29
|
-
"->": "→",
|
|
30
|
-
"-->": "⟶"
|
|
34
|
+
"\\.\\.\\.": "…"
|
|
31
35
|
};
|
|
32
36
|
|
|
37
|
+
/**
|
|
38
|
+
* @satisfies {Linter.RulesRecord}
|
|
39
|
+
*/
|
|
33
40
|
const unicornRules = {
|
|
34
41
|
"unicorn/catch-error-name": "error",
|
|
35
42
|
"unicorn/consistent-destructuring": "error",
|
package/rules.js
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import * as ruleSets from "./rules/_exports.js";
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @import { Linter } from "eslint"
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @satisfies {Linter.RulesRecord}
|
|
9
|
+
*/
|
|
3
10
|
const rules = Object.values(ruleSets)
|
|
4
11
|
.reduce(
|
|
5
|
-
(allRules, ruleSet) => ({
|
|
12
|
+
(allRules, ruleSet) => /** @type {const} */ ({
|
|
6
13
|
...allRules,
|
|
7
14
|
...ruleSet
|
|
8
15
|
}),
|