@pumpn/eslint-config 14.0.2 → 15.0.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/import-map.json CHANGED
@@ -1,27 +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.28",
5
- "@std/path": "jsr:@std/path",
6
- "@stylistic/eslint-plugin": "npm:@stylistic/eslint-plugin@^2.3.0",
7
- "@typescript-eslint/parser": "npm:@typescript-eslint/parser@^8.0.0-alpha.47",
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-disable-autofix": "npm:eslint-plugin-disable-autofix@^5.0.1",
9
10
  "eslint-plugin-func-params-args": "npm:eslint-plugin-func-params-args@^4.0.0",
10
- "eslint-plugin-import-x": "npm:eslint-plugin-import-x@^3.0.1",
11
- "eslint-plugin-jsdoc": "npm:eslint-plugin-jsdoc@^48.8.3",
11
+ "eslint-plugin-import-x": "npm:eslint-plugin-import-x@^3.1.0",
12
+ "eslint-plugin-jsdoc": "npm:eslint-plugin-jsdoc@^48.11.0",
12
13
  "eslint-plugin-no-secrets": "npm:eslint-plugin-no-secrets@^1.0.2",
13
- "eslint-plugin-perfectionist": "npm:eslint-plugin-perfectionist@^2.11.0",
14
- "eslint-plugin-promise": "npm:eslint-plugin-promise@^6.5.1",
14
+ "eslint-plugin-perfectionist": "npm:eslint-plugin-perfectionist@^3.1.0",
15
+ "eslint-plugin-promise": "npm:eslint-plugin-promise@^7.0.0",
15
16
  "eslint-plugin-react": "npm:eslint-plugin-react@^7.35.0",
16
17
  "eslint-plugin-redos": "npm:eslint-plugin-redos@^4.4.5",
17
18
  "eslint-plugin-regexp": "npm:eslint-plugin-regexp@^2.6.0",
18
19
  "eslint-plugin-security": "npm:eslint-plugin-security@^3.0.1",
19
- "eslint-plugin-sonarjs": "npm:eslint-plugin-sonarjs@^1.0.3",
20
+ "eslint-plugin-sonarjs": "npm:eslint-plugin-sonarjs@^1.0.4",
20
21
  "eslint-plugin-tailwindcss": "npm:eslint-plugin-tailwindcss@^3.17.4",
21
- "eslint-plugin-unicorn": "npm:eslint-plugin-unicorn@^54.0.0",
22
- "globals": "npm:globals@^15.8.0",
22
+ "eslint-plugin-unicorn": "npm:eslint-plugin-unicorn@^55.0.0",
23
+ "globals": "npm:globals@^15.9.0",
23
24
  "preact": "https://esm.sh/*preact@10.19.3?dev",
24
- "preact/jsx-runtime": "https://esm.sh/*preact@10.19.3/jsx-runtime?dev",
25
- "radash": "npm:radash"
25
+ "preact/jsx-runtime": "https://esm.sh/*preact@10.19.3/jsx-runtime?dev"
26
26
  }
27
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pumpn/eslint-config",
3
- "version": "14.0.2",
3
+ "version": "15.0.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,33 +17,35 @@
17
17
  "test": "echo 'no tests yet'"
18
18
  },
19
19
  "devDependencies": {
20
- "eslint": "^9.7.0"
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.5.28",
25
- "@stylistic/eslint-plugin": "^2.3.0",
26
- "@typescript-eslint/parser": "^8.0.0-alpha.47",
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-disable-autofix": "^5.0.1",
28
29
  "eslint-plugin-func-params-args": "^4.0.0",
29
- "eslint-plugin-import-x": "^3.0.1",
30
- "eslint-plugin-jsdoc": "^48.8.3",
30
+ "eslint-plugin-import-x": "^3.1.0",
31
+ "eslint-plugin-jsdoc": "^48.11.0",
31
32
  "eslint-plugin-no-secrets": "^1.0.2",
32
- "eslint-plugin-perfectionist": "^2.11.0",
33
- "eslint-plugin-promise": "^6.5.1",
33
+ "eslint-plugin-perfectionist": "^3.1.0",
34
+ "eslint-plugin-promise": "^7.0.0",
34
35
  "eslint-plugin-redos": "^4.4.5",
35
36
  "eslint-plugin-regexp": "^2.6.0",
36
37
  "eslint-plugin-security": "^3.0.1",
37
- "eslint-plugin-sonarjs": "^1.0.3",
38
+ "eslint-plugin-sonarjs": "^1.0.4",
38
39
  "eslint-plugin-tailwindcss": "^3.17.4",
39
- "eslint-plugin-unicorn": "^54.0.0",
40
- "globals": "^15.8.0"
40
+ "eslint-plugin-unicorn": "^55.0.0",
41
+ "globals": "^15.9.0"
41
42
  },
42
43
  "peerDependencies": {
43
- "eslint": "^9.4.0"
44
+ "eslint": "^9.8.0"
44
45
  },
45
46
  "overrides": {
46
47
  "@typescript-eslint/type-utils": "^8.0.0-alpha.47",
47
- "@typescript-eslint/utils": "^8.0.0-alpha.47"
48
+ "@typescript-eslint/utils": "^8.0.0-alpha.47",
49
+ "eslint": "^9.8.0"
48
50
  }
49
51
  }
package/plugins.js CHANGED
@@ -1,15 +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";
9
+ import disableAutofix from "eslint-plugin-disable-autofix";
6
10
  import funcParamsArgs from "eslint-plugin-func-params-args";
7
- // import github from "eslint-plugin-github";
8
11
  import importX from "eslint-plugin-import-x";
9
12
  import jsdoc from "eslint-plugin-jsdoc";
10
- // import jsxA11y from "eslint-plugin-jsx-a11y";
11
13
  import noSecrets from "eslint-plugin-no-secrets";
12
- // import noUnsanitized from "eslint-plugin-no-unsanitized";
13
14
  import perfectionist from "eslint-plugin-perfectionist";
14
15
  import promise from "eslint-plugin-promise";
15
16
  import redos from "eslint-plugin-redos";
@@ -20,16 +21,17 @@ import tailwindcss from "eslint-plugin-tailwindcss";
20
21
  import unicorn from "eslint-plugin-unicorn";
21
22
 
22
23
  const plugins = {
23
- "@eslint-community/eslint-comments": eslintComments,
24
- "@stylistic": stylistic,
25
24
  // github,
26
- "import-x": importX,
27
- jsdoc,
28
25
  // "jsx-a11y": jsxA11y,
29
- "no-secrets": noSecrets,
30
26
  // "no-unsanitized": noUnsanitized,
27
+ "@eslint-community/eslint-comments": eslintComments,
28
+ "@stylistic": stylistic,
31
29
  depend,
30
+ "disable-autofix": disableAutofix,
32
31
  "func-params-args": funcParamsArgs,
32
+ "import-x": importX,
33
+ jsdoc,
34
+ "no-secrets": noSecrets,
33
35
  perfectionist,
34
36
  promise,
35
37
  react,
@@ -9,6 +9,7 @@ const helpfulWarningsRules = {
9
9
  "import-x/no-unused-modules": [
10
10
  "error",
11
11
  {
12
+ ignoreUnusedTypeExports: true,
12
13
  missingExports: true,
13
14
  unusedExports: false
14
15
  }
@@ -57,7 +57,7 @@ const staticAnalysisRules = {
57
57
  }
58
58
  ],
59
59
  "import-x/no-self-import": "error",
60
- // TODO [2024-08-01]: Change to "error" when there is a resolver for deno
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
- // TODO [eslint-plugin-jsdoc@>=49]: enable when https://github.com/eslint/eslint/issues/14745 and https://github.com/gajus/eslint-plugin-jsdoc/issues/928 are closed
5
- "jsdoc/check-examples": "off",
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": "warn",
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": "warn",
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
- CallExpression > ObjectExpression > Property,
158
+ ObjectExpression > Property,
151
159
  ArrayExpression:has(Literal ~ ArrowFunctionExpression),
152
160
  CallExpression,
153
161
  Property > AssignmentPattern
@@ -2,16 +2,16 @@ const perfectionistRules = {
2
2
  "perfectionist/sort-array-includes": [
3
3
  "error",
4
4
  {
5
- "ignore-case": false,
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
- "ignore-case": false,
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
- "ignore-case": false,
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
- "ignore-case": false,
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
- "ignore-case": false,
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
- "custom-groups": {
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
- "ignore-case": false,
91
- "internal-pattern": ["@/**"],
92
- "newlines-between": "always",
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
- "ignore-case": false,
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
- "ignore-case": false,
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
- "ignore-case": false,
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
- "ignore-case": false,
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
- "ignore-case": false,
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
- "ignore-case": false,
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
- "ignore-case": false,
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
- "custom-groups": {
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
- "ignore-case": false,
243
+ ignoreCase: false,
244
244
  order: "asc",
245
- "partition-by-comment": true,
246
- "partition-by-new-line": true,
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
- "ignore-case": false,
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
- "ignore-case": false,
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
- "ignore-case": false,
285
+ ignoreCase: false,
270
286
  order: "asc",
271
287
  type: "natural"
272
288
  }
package/rules/promise.js CHANGED
@@ -18,7 +18,7 @@ const promiseRules = {
18
18
  }
19
19
  ],
20
20
  "promise/prefer-await-to-callbacks": "error",
21
- "promise/prefer-await-to-then": "error",
21
+ "promise/prefer-await-to-then": ["error", { strict: true }],
22
22
  "promise/valid-params": "error"
23
23
  };
24
24
 
@@ -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-08-01]: enable when https://github.com/microsoft/vscode/pull/206580 is resolved
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": "error",
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",
@@ -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": "error",
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/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": ["error", { disallowedPrefixes: ["new"] }],
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",