@allthings/eslint-config 3.4.0 → 3.5.0-alpha.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/index.js +8 -5
- package/node.js +8 -5
- package/package.json +2 -2
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
|
|
|
@@ -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': [
|
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
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allthings/eslint-config",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0-alpha.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "ESlint shareable config for Allthings style",
|
|
6
6
|
"main": "index.js",
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
"eslint-plugin-import": "^2.32.0",
|
|
40
40
|
"eslint-plugin-jest": "^29.0.0",
|
|
41
41
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
42
|
+
"eslint-plugin-perfectionist": "^5.9.0",
|
|
42
43
|
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
43
44
|
"eslint-plugin-prettier": "^5.5.4",
|
|
44
45
|
"eslint-plugin-react": "^7.37.5",
|
|
45
46
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
46
47
|
"eslint-plugin-simple-import-sort": "^13.0.0",
|
|
47
|
-
"eslint-plugin-typescript-sort-keys": "^3.3.0",
|
|
48
48
|
"eslint-plugin-unicorn": "^64.0.0",
|
|
49
49
|
"globals": "^17.0.0"
|
|
50
50
|
},
|