@fullstacksjs/eslint-config 8.4.3 → 8.5.0
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/package.json +23 -23
- package/rules/import.js +1 -1
- package/rules/jsx-a11y.js +0 -1
- package/rules/react.js +2 -1
- package/rules/storybook.js +1 -0
- package/rules/typescript.js +10 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fullstacksjs/eslint-config",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.5.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "fullstacks <fullstacksjs@gmail.com>",
|
|
6
6
|
"description": "fullstacks eslint config",
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
"scripts": {
|
|
33
33
|
"lint": "eslint .",
|
|
34
34
|
"check-rules:base": "eslint-find-rules --unused ./base.js",
|
|
35
|
-
"check-rules:jest": "eslint-find-rules --no-core --unused ./tests/jest.js",
|
|
35
|
+
"check-rules:jest": "eslint-find-rules --no-core --deprecated --unused ./tests/jest.js",
|
|
36
36
|
"check-rules:react": "eslint-find-rules --no-core --unused ./tests/react.js",
|
|
37
|
-
"check-rules:typescript": "eslint-find-rules --no-core --unused ./tests/typescript.js",
|
|
38
|
-
"check-rules:cypress": "eslint-find-rules --no-core --unused ./tests/cypress.js",
|
|
39
|
-
"check-rules:graphql": "eslint-find-rules --no-core --unused ./tests/graphql.js",
|
|
40
|
-
"check-rules:storybook": "eslint-find-rules --no-core --unused ./tests/storybook.js",
|
|
37
|
+
"check-rules:typescript": "eslint-find-rules --no-core --deprecated --unused ./tests/typescript.js",
|
|
38
|
+
"check-rules:cypress": "eslint-find-rules --no-core --deprecated --unused ./tests/cypress.js",
|
|
39
|
+
"check-rules:graphql": "eslint-find-rules --no-core --deprecated --unused ./tests/graphql.js",
|
|
40
|
+
"check-rules:storybook": "eslint-find-rules --no-core --deprecated --unused ./tests/storybook.js",
|
|
41
41
|
"spell": "cspell ./* --no-progress",
|
|
42
42
|
"test": "npm-run-all --parallel check-rules:* && npm run spell",
|
|
43
43
|
"prepublishOnly": "pinst --disable",
|
|
@@ -47,37 +47,37 @@
|
|
|
47
47
|
"main": "index.js",
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@frontendmonster/utils": "0.3.11",
|
|
50
|
-
"@graphql-eslint/eslint-plugin": "3.10.
|
|
51
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
52
|
-
"@typescript-eslint/parser": "5.
|
|
50
|
+
"@graphql-eslint/eslint-plugin": "3.10.6",
|
|
51
|
+
"@typescript-eslint/eslint-plugin": "5.30.7",
|
|
52
|
+
"@typescript-eslint/parser": "5.30.7",
|
|
53
53
|
"eslint-config-prettier": "8.5.0",
|
|
54
|
-
"eslint-import-resolver-typescript": "
|
|
54
|
+
"eslint-import-resolver-typescript": "3.3.0",
|
|
55
55
|
"eslint-plugin-cypress": "2.12.1",
|
|
56
56
|
"eslint-plugin-fp": "2.3.0",
|
|
57
57
|
"eslint-plugin-import": "2.26.0",
|
|
58
|
-
"eslint-plugin-jest": "26.
|
|
58
|
+
"eslint-plugin-jest": "26.6.0",
|
|
59
59
|
"eslint-plugin-jest-formatting": "3.1.0",
|
|
60
|
-
"eslint-plugin-jsx-a11y": "6.
|
|
60
|
+
"eslint-plugin-jsx-a11y": "6.6.1",
|
|
61
61
|
"eslint-plugin-node": "11.1.0",
|
|
62
|
-
"eslint-plugin-prettier": "4.
|
|
62
|
+
"eslint-plugin-prettier": "4.2.1",
|
|
63
63
|
"eslint-plugin-promise": "6.0.0",
|
|
64
|
-
"eslint-plugin-react": "7.
|
|
65
|
-
"eslint-plugin-react-hooks": "4.
|
|
64
|
+
"eslint-plugin-react": "7.30.1",
|
|
65
|
+
"eslint-plugin-react-hooks": "4.6.0",
|
|
66
66
|
"eslint-plugin-simple-import-sort": "7.0.0",
|
|
67
|
-
"eslint-plugin-storybook": "0.
|
|
67
|
+
"eslint-plugin-storybook": "0.6.1",
|
|
68
68
|
"read-pkg-up": "7.0.1"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
|
-
"cspell": "
|
|
72
|
-
"eslint": "8.
|
|
71
|
+
"cspell": "6.4.1",
|
|
72
|
+
"eslint": "8.20.0",
|
|
73
73
|
"eslint-find-rules": "4.1.0",
|
|
74
|
-
"husky": "
|
|
75
|
-
"lint-staged": "
|
|
76
|
-
"np": "7.6.
|
|
74
|
+
"husky": "8.0.1",
|
|
75
|
+
"lint-staged": "13.0.3",
|
|
76
|
+
"np": "7.6.2",
|
|
77
77
|
"npm-run-all": "4.1.5",
|
|
78
78
|
"pinst": "3.0.0",
|
|
79
|
-
"prettier": "2.
|
|
80
|
-
"typescript": "4.
|
|
79
|
+
"prettier": "2.7.1",
|
|
80
|
+
"typescript": "4.7.4"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
83
83
|
"cypress": ">=8",
|
package/rules/import.js
CHANGED
|
@@ -37,7 +37,7 @@ module.exports = {
|
|
|
37
37
|
'import/no-unassigned-import': 'off',
|
|
38
38
|
'import/no-unresolved': ['error', { caseSensitiveStrict: true }],
|
|
39
39
|
'import/no-unused-modules': 'off',
|
|
40
|
-
'import/no-useless-path-segments': '
|
|
40
|
+
'import/no-useless-path-segments': 'warn',
|
|
41
41
|
'import/no-webpack-loader-syntax': 'error',
|
|
42
42
|
'import/order': ['off', { groups: ['builtin', ['external', 'internal'], 'parent', ['sibling', 'index']] }], // collision
|
|
43
43
|
'import/prefer-default-export': 'off',
|
package/rules/jsx-a11y.js
CHANGED
|
@@ -25,7 +25,6 @@ module.exports = {
|
|
|
25
25
|
'jsx-a11y/no-noninteractive-element-interactions': 'warn',
|
|
26
26
|
'jsx-a11y/no-noninteractive-element-to-interactive-role': 'warn',
|
|
27
27
|
'jsx-a11y/no-noninteractive-tabindex': 'off',
|
|
28
|
-
'jsx-a11y/no-onchange': 'off',
|
|
29
28
|
'jsx-a11y/no-redundant-roles': 'error',
|
|
30
29
|
'jsx-a11y/no-static-element-interactions': 'off',
|
|
31
30
|
'jsx-a11y/role-has-required-aria-props': 'error',
|
package/rules/react.js
CHANGED
|
@@ -13,7 +13,7 @@ module.exports = {
|
|
|
13
13
|
'react/function-component-definition': ['warn', { namedComponents: 'arrow-function', unnamedComponents: 'arrow-function' }],
|
|
14
14
|
'react/hook-use-state': 'warn',
|
|
15
15
|
'react/iframe-missing-sandbox': 'error',
|
|
16
|
-
'react/jsx-boolean-value': '
|
|
16
|
+
'react/jsx-boolean-value': 'warn',
|
|
17
17
|
'react/jsx-child-element-spacing': 'warn',
|
|
18
18
|
'react/jsx-curly-brace-presence': ['warn', { props: 'never', children: 'ignore' }],
|
|
19
19
|
'react/jsx-filename-extension': ['error', { extensions: ['.jsx', '.tsx'] }],
|
|
@@ -26,6 +26,7 @@ module.exports = {
|
|
|
26
26
|
'react/jsx-no-comment-textnodes': 'error',
|
|
27
27
|
'react/jsx-no-constructed-context-values': 'error',
|
|
28
28
|
'react/jsx-no-duplicate-props': 'error',
|
|
29
|
+
'react/jsx-no-leaked-render': 'error',
|
|
29
30
|
'react/jsx-no-literals': 'off',
|
|
30
31
|
'react/jsx-no-script-url': 'error',
|
|
31
32
|
'react/jsx-no-target-blank': 'error',
|
package/rules/storybook.js
CHANGED
|
@@ -5,6 +5,7 @@ module.exports = {
|
|
|
5
5
|
'storybook/default-exports': 'error',
|
|
6
6
|
'storybook/hierarchy-separator': 'warn',
|
|
7
7
|
'storybook/no-redundant-story-name': 'warn',
|
|
8
|
+
'storybook/no-uninstalled-addons': 'error',
|
|
8
9
|
'storybook/prefer-pascal-case': 'warn',
|
|
9
10
|
'storybook/story-exports': 'error',
|
|
10
11
|
'storybook/use-storybook-expect': 'error',
|
package/rules/typescript.js
CHANGED
|
@@ -16,6 +16,7 @@ module.exports = {
|
|
|
16
16
|
'@typescript-eslint/ban-types': 'error',
|
|
17
17
|
'@typescript-eslint/camelcase': 'off',
|
|
18
18
|
'@typescript-eslint/class-literal-property-style': ['error', 'getters'],
|
|
19
|
+
'@typescript-eslint/consistent-generic-constructors': ['warn', 'constructor'],
|
|
19
20
|
'@typescript-eslint/consistent-indexed-object-style': 'off',
|
|
20
21
|
'@typescript-eslint/consistent-type-assertions': 'error',
|
|
21
22
|
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
|
|
@@ -84,7 +85,7 @@ module.exports = {
|
|
|
84
85
|
'@typescript-eslint/no-base-to-string': 'off', // false negative
|
|
85
86
|
'@typescript-eslint/no-confusing-non-null-assertion': 'error',
|
|
86
87
|
'@typescript-eslint/no-dupe-class-members': 'error',
|
|
87
|
-
'@typescript-eslint/no-duplicate-
|
|
88
|
+
'@typescript-eslint/no-duplicate-enum-values': 'error',
|
|
88
89
|
'@typescript-eslint/no-dynamic-delete': 'error',
|
|
89
90
|
'@typescript-eslint/no-empty-function': 'error',
|
|
90
91
|
'@typescript-eslint/no-empty-interface': 'off', // Annoying with auto-fix on save.
|
|
@@ -92,7 +93,6 @@ module.exports = {
|
|
|
92
93
|
'@typescript-eslint/no-extra-non-null-assertion': 'error',
|
|
93
94
|
'@typescript-eslint/no-extraneous-class': 'error',
|
|
94
95
|
'@typescript-eslint/no-for-in-array': 'error',
|
|
95
|
-
'@typescript-eslint/no-implicit-any-catch': 'off',
|
|
96
96
|
'@typescript-eslint/no-inferrable-types': 'off',
|
|
97
97
|
'@typescript-eslint/no-invalid-this': ['error', { capIsConstructor: false }],
|
|
98
98
|
'@typescript-eslint/no-invalid-void-type': 'error',
|
|
@@ -104,7 +104,6 @@ module.exports = {
|
|
|
104
104
|
'@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error',
|
|
105
105
|
'@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
|
|
106
106
|
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
107
|
-
'@typescript-eslint/no-parameter-properties': 'off',
|
|
108
107
|
'@typescript-eslint/no-redeclare': ['off', { ignoreDeclarationMerge: true }], // useful in FP.
|
|
109
108
|
'@typescript-eslint/no-require-imports': 'error',
|
|
110
109
|
'@typescript-eslint/no-restricted-imports': 'off',
|
|
@@ -112,7 +111,13 @@ module.exports = {
|
|
|
112
111
|
'@typescript-eslint/no-shadow': 'error',
|
|
113
112
|
'@typescript-eslint/no-this-alias': 'error',
|
|
114
113
|
'@typescript-eslint/no-type-alias': 'off',
|
|
115
|
-
'@typescript-eslint/no-unnecessary-condition':
|
|
114
|
+
'@typescript-eslint/no-unnecessary-condition': [
|
|
115
|
+
'warn',
|
|
116
|
+
{
|
|
117
|
+
allowConstantLoopConditions: false,
|
|
118
|
+
allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,
|
|
119
|
+
},
|
|
120
|
+
],
|
|
116
121
|
'@typescript-eslint/no-unnecessary-type-constraint': 'warn',
|
|
117
122
|
'@typescript-eslint/no-unsafe-argument': 'off',
|
|
118
123
|
'@typescript-eslint/no-unsafe-assignment': 'off',
|
|
@@ -131,6 +136,7 @@ module.exports = {
|
|
|
131
136
|
'@typescript-eslint/no-useless-empty-export': 'warn',
|
|
132
137
|
'@typescript-eslint/no-var-requires': 'error',
|
|
133
138
|
'@typescript-eslint/object-curly-spacing': 'warn',
|
|
139
|
+
'@typescript-eslint/parameter-properties': 'off',
|
|
134
140
|
'@typescript-eslint/padding-line-between-statements': ['warn', { blankLine: 'always', prev: ['return'], next: ['export'] }],
|
|
135
141
|
'@typescript-eslint/prefer-as-const': 'warn',
|
|
136
142
|
'@typescript-eslint/prefer-enum-initializers': 'off',
|
|
@@ -186,7 +192,6 @@ module.exports = {
|
|
|
186
192
|
'default-param-last': 'off',
|
|
187
193
|
'init-declarations': 'off',
|
|
188
194
|
'lines-between-class-members': 'off',
|
|
189
|
-
'no-duplicate-imports': 'off',
|
|
190
195
|
'no-invalid-this': 'off',
|
|
191
196
|
'no-loop-func': 'off',
|
|
192
197
|
'no-redeclare': 'off',
|