@allthings/eslint-config 3.5.0-beta.1 → 3.5.1-alpha.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/index.js +13 -6
- package/node.js +12 -5
- package/package.json +6 -4
package/index.js
CHANGED
|
@@ -4,12 +4,12 @@ import globals from 'globals'
|
|
|
4
4
|
import jsxA11yPlugin from 'eslint-plugin-jsx-a11y'
|
|
5
5
|
import importPlugin from 'eslint-plugin-import'
|
|
6
6
|
import jestPlugin from 'eslint-plugin-jest'
|
|
7
|
+
import perfectionistPlugin from 'eslint-plugin-perfectionist'
|
|
7
8
|
import preferArrowPlugin from 'eslint-plugin-prefer-arrow'
|
|
8
9
|
import prettierConfig from 'eslint-plugin-prettier/recommended'
|
|
9
10
|
import reactPlugin from 'eslint-plugin-react'
|
|
10
11
|
import reactHooksPlugin from 'eslint-plugin-react-hooks'
|
|
11
12
|
import simpleImportSortPlugin from 'eslint-plugin-simple-import-sort'
|
|
12
|
-
import typescriptSortKeysPlugin from 'eslint-plugin-typescript-sort-keys'
|
|
13
13
|
import unicornPlugin from 'eslint-plugin-unicorn'
|
|
14
14
|
import vitestPlugin from '@vitest/eslint-plugin'
|
|
15
15
|
|
|
@@ -22,7 +22,7 @@ export default [
|
|
|
22
22
|
reactPlugin.configs.flat.recommended,
|
|
23
23
|
reactPlugin.configs.flat['jsx-runtime'],
|
|
24
24
|
jsxA11yPlugin.flatConfigs.recommended,
|
|
25
|
-
reactHooksPlugin.configs
|
|
25
|
+
reactHooksPlugin.configs['recommended-latest'],
|
|
26
26
|
vitestPlugin.configs.recommended,
|
|
27
27
|
{
|
|
28
28
|
languageOptions: {
|
|
@@ -44,9 +44,9 @@ export default [
|
|
|
44
44
|
plugins: {
|
|
45
45
|
'@stylistic': stylisticPlugin,
|
|
46
46
|
jest: jestPlugin,
|
|
47
|
+
perfectionist: perfectionistPlugin,
|
|
47
48
|
'prefer-arrow': preferArrowPlugin,
|
|
48
49
|
'simple-import-sort': simpleImportSortPlugin,
|
|
49
|
-
'typescript-sort-keys': typescriptSortKeysPlugin,
|
|
50
50
|
},
|
|
51
51
|
settings: {
|
|
52
52
|
react: { version: 'detect' },
|
|
@@ -59,9 +59,12 @@ export default [
|
|
|
59
59
|
},
|
|
60
60
|
},
|
|
61
61
|
rules: {
|
|
62
|
-
// typescript-sort-keys
|
|
63
|
-
|
|
64
|
-
'
|
|
62
|
+
// perfectionist — replaces eslint-plugin-typescript-sort-keys
|
|
63
|
+
// (string-enum equivalent: sort-enums with default sortByValue: 'ifNumericEnum')
|
|
64
|
+
'perfectionist/sort-enums': 'error',
|
|
65
|
+
'perfectionist/sort-heritage-clauses': 'error',
|
|
66
|
+
'perfectionist/sort-interfaces': 'error',
|
|
67
|
+
'perfectionist/sort-object-types': 'error',
|
|
65
68
|
// react-hooks override (recommended-latest has exhaustive-deps as 'warn')
|
|
66
69
|
'react-hooks/exhaustive-deps': 'error',
|
|
67
70
|
'@stylistic/padding-line-between-statements': [
|
|
@@ -314,6 +317,7 @@ export default [
|
|
|
314
317
|
allowList: {
|
|
315
318
|
params: true,
|
|
316
319
|
props: true,
|
|
320
|
+
utils: true,
|
|
317
321
|
},
|
|
318
322
|
replacements: {
|
|
319
323
|
params: {
|
|
@@ -322,6 +326,9 @@ export default [
|
|
|
322
326
|
props: {
|
|
323
327
|
properties: false,
|
|
324
328
|
},
|
|
329
|
+
utils: {
|
|
330
|
+
utilities: false,
|
|
331
|
+
},
|
|
325
332
|
},
|
|
326
333
|
},
|
|
327
334
|
],
|
package/node.js
CHANGED
|
@@ -3,10 +3,10 @@ import tsPlugin from '@typescript-eslint/eslint-plugin'
|
|
|
3
3
|
import globals from 'globals'
|
|
4
4
|
import importPlugin from 'eslint-plugin-import'
|
|
5
5
|
import jestPlugin from 'eslint-plugin-jest'
|
|
6
|
+
import perfectionistPlugin from 'eslint-plugin-perfectionist'
|
|
6
7
|
import preferArrowPlugin from 'eslint-plugin-prefer-arrow'
|
|
7
8
|
import prettierConfig from 'eslint-plugin-prettier/recommended'
|
|
8
9
|
import simpleImportSortPlugin from 'eslint-plugin-simple-import-sort'
|
|
9
|
-
import typescriptSortKeysPlugin from 'eslint-plugin-typescript-sort-keys'
|
|
10
10
|
import unicornPlugin from 'eslint-plugin-unicorn'
|
|
11
11
|
import vitestPlugin from '@vitest/eslint-plugin'
|
|
12
12
|
|
|
@@ -33,9 +33,9 @@ export default [
|
|
|
33
33
|
plugins: {
|
|
34
34
|
'@stylistic': stylisticPlugin,
|
|
35
35
|
jest: jestPlugin,
|
|
36
|
+
perfectionist: perfectionistPlugin,
|
|
36
37
|
'prefer-arrow': preferArrowPlugin,
|
|
37
38
|
'simple-import-sort': simpleImportSortPlugin,
|
|
38
|
-
'typescript-sort-keys': typescriptSortKeysPlugin,
|
|
39
39
|
},
|
|
40
40
|
settings: {
|
|
41
41
|
'import/parsers': {
|
|
@@ -47,9 +47,12 @@ export default [
|
|
|
47
47
|
},
|
|
48
48
|
},
|
|
49
49
|
rules: {
|
|
50
|
-
// typescript-sort-keys
|
|
51
|
-
|
|
52
|
-
'
|
|
50
|
+
// perfectionist — replaces eslint-plugin-typescript-sort-keys
|
|
51
|
+
// (string-enum equivalent: sort-enums with default sortByValue: 'ifNumericEnum')
|
|
52
|
+
'perfectionist/sort-enums': 'error',
|
|
53
|
+
'perfectionist/sort-heritage-clauses': 'error',
|
|
54
|
+
'perfectionist/sort-interfaces': 'error',
|
|
55
|
+
'perfectionist/sort-object-types': 'error',
|
|
53
56
|
'@stylistic/padding-line-between-statements': [
|
|
54
57
|
'error',
|
|
55
58
|
{
|
|
@@ -276,6 +279,7 @@ export default [
|
|
|
276
279
|
allowList: {
|
|
277
280
|
params: true,
|
|
278
281
|
props: true,
|
|
282
|
+
utils: true,
|
|
279
283
|
},
|
|
280
284
|
replacements: {
|
|
281
285
|
params: {
|
|
@@ -284,6 +288,9 @@ export default [
|
|
|
284
288
|
props: {
|
|
285
289
|
properties: false,
|
|
286
290
|
},
|
|
291
|
+
utils: {
|
|
292
|
+
utilities: false,
|
|
293
|
+
},
|
|
287
294
|
},
|
|
288
295
|
},
|
|
289
296
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allthings/eslint-config",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.1-alpha.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "ESlint shareable config for Allthings style",
|
|
6
6
|
"main": "index.js",
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"test": "yarn test:audit && yarn test:behavioral",
|
|
27
27
|
"test:audit": "node test/audit.js",
|
|
28
28
|
"test:behavioral": "node test/behavioral.js",
|
|
29
|
-
"deps": "yarn upgrade-interactive"
|
|
29
|
+
"deps": "yarn upgrade-interactive",
|
|
30
|
+
"prepare": "husky"
|
|
30
31
|
},
|
|
31
32
|
"dependencies": {
|
|
32
33
|
"@stylistic/eslint-plugin": "^5.0.0",
|
|
@@ -39,12 +40,12 @@
|
|
|
39
40
|
"eslint-plugin-import": "^2.32.0",
|
|
40
41
|
"eslint-plugin-jest": "^29.0.0",
|
|
41
42
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
43
|
+
"eslint-plugin-perfectionist": "^5.9.0",
|
|
42
44
|
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
43
45
|
"eslint-plugin-prettier": "^5.5.4",
|
|
44
46
|
"eslint-plugin-react": "^7.37.5",
|
|
45
|
-
"eslint-plugin-react-hooks": "^
|
|
47
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
46
48
|
"eslint-plugin-simple-import-sort": "^13.0.0",
|
|
47
|
-
"eslint-plugin-typescript-sort-keys": "^3.3.0",
|
|
48
49
|
"eslint-plugin-unicorn": "^64.0.0",
|
|
49
50
|
"globals": "^17.0.0"
|
|
50
51
|
},
|
|
@@ -57,6 +58,7 @@
|
|
|
57
58
|
"@types/jest": "30.0.0",
|
|
58
59
|
"@types/react": "18.3.28",
|
|
59
60
|
"eslint": "9.39.4",
|
|
61
|
+
"husky": "^9.1.7",
|
|
60
62
|
"prettier": "3.8.3",
|
|
61
63
|
"react": "18.3.1",
|
|
62
64
|
"semantic-release": "25.0.3",
|