@fullstacksjs/eslint-config 8.4.2 → 8.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fullstacksjs/eslint-config",
3
- "version": "8.4.2",
3
+ "version": "8.5.1",
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.3",
51
- "@typescript-eslint/eslint-plugin": "5.20.0",
52
- "@typescript-eslint/parser": "5.20.0",
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": "2.7.1",
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.1.5",
58
+ "eslint-plugin-jest": "26.6.0",
59
59
  "eslint-plugin-jest-formatting": "3.1.0",
60
- "eslint-plugin-jsx-a11y": "6.5.1",
60
+ "eslint-plugin-jsx-a11y": "6.6.1",
61
61
  "eslint-plugin-node": "11.1.0",
62
- "eslint-plugin-prettier": "4.0.0",
62
+ "eslint-plugin-prettier": "4.2.1",
63
63
  "eslint-plugin-promise": "6.0.0",
64
- "eslint-plugin-react": "7.29.4",
65
- "eslint-plugin-react-hooks": "4.4.0",
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.5.11",
67
+ "eslint-plugin-storybook": "0.6.1",
68
68
  "read-pkg-up": "7.0.1"
69
69
  },
70
70
  "devDependencies": {
71
- "cspell": "5.19.7",
72
- "eslint": "8.14.0",
71
+ "cspell": "6.4.1",
72
+ "eslint": "8.20.0",
73
73
  "eslint-find-rules": "4.1.0",
74
- "husky": "7.0.4",
75
- "lint-staged": "12.4.0",
76
- "np": "7.6.1",
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.6.2",
80
- "typescript": "4.6.3"
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': 'off',
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': 'off',
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',
@@ -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',
@@ -14,6 +14,13 @@ module.exports = {
14
14
  '@typescript-eslint/no-redundant-type-constituents': 'warn',
15
15
  '@typescript-eslint/no-throw-literal': 'error',
16
16
  '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
17
+ '@typescript-eslint/no-unnecessary-condition': [
18
+ 'warn',
19
+ {
20
+ allowConstantLoopConditions: false,
21
+ allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,
22
+ },
23
+ ],
17
24
  '@typescript-eslint/no-unnecessary-qualifier': 'error',
18
25
  '@typescript-eslint/no-unnecessary-type-arguments': 'error',
19
26
  '@typescript-eslint/no-unnecessary-type-assertion': 'error',
@@ -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'],
@@ -51,8 +52,7 @@ module.exports = {
51
52
  },
52
53
  {
53
54
  selector: 'memberLike',
54
- format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
55
- leadingUnderscore: 'allow',
55
+ format: null,
56
56
  },
57
57
  {
58
58
  selector: 'memberLike',
@@ -85,7 +85,7 @@ module.exports = {
85
85
  '@typescript-eslint/no-base-to-string': 'off', // false negative
86
86
  '@typescript-eslint/no-confusing-non-null-assertion': 'error',
87
87
  '@typescript-eslint/no-dupe-class-members': 'error',
88
- '@typescript-eslint/no-duplicate-imports': ['error'],
88
+ '@typescript-eslint/no-duplicate-enum-values': 'error',
89
89
  '@typescript-eslint/no-dynamic-delete': 'error',
90
90
  '@typescript-eslint/no-empty-function': 'error',
91
91
  '@typescript-eslint/no-empty-interface': 'off', // Annoying with auto-fix on save.
@@ -93,7 +93,6 @@ module.exports = {
93
93
  '@typescript-eslint/no-extra-non-null-assertion': 'error',
94
94
  '@typescript-eslint/no-extraneous-class': 'error',
95
95
  '@typescript-eslint/no-for-in-array': 'error',
96
- '@typescript-eslint/no-implicit-any-catch': 'off',
97
96
  '@typescript-eslint/no-inferrable-types': 'off',
98
97
  '@typescript-eslint/no-invalid-this': ['error', { capIsConstructor: false }],
99
98
  '@typescript-eslint/no-invalid-void-type': 'error',
@@ -105,7 +104,6 @@ module.exports = {
105
104
  '@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error',
106
105
  '@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
107
106
  '@typescript-eslint/no-non-null-assertion': 'off',
108
- '@typescript-eslint/no-parameter-properties': 'off',
109
107
  '@typescript-eslint/no-redeclare': ['off', { ignoreDeclarationMerge: true }], // useful in FP.
110
108
  '@typescript-eslint/no-require-imports': 'error',
111
109
  '@typescript-eslint/no-restricted-imports': 'off',
@@ -113,7 +111,6 @@ module.exports = {
113
111
  '@typescript-eslint/no-shadow': 'error',
114
112
  '@typescript-eslint/no-this-alias': 'error',
115
113
  '@typescript-eslint/no-type-alias': 'off',
116
- '@typescript-eslint/no-unnecessary-condition': 'off',
117
114
  '@typescript-eslint/no-unnecessary-type-constraint': 'warn',
118
115
  '@typescript-eslint/no-unsafe-argument': 'off',
119
116
  '@typescript-eslint/no-unsafe-assignment': 'off',
@@ -132,6 +129,7 @@ module.exports = {
132
129
  '@typescript-eslint/no-useless-empty-export': 'warn',
133
130
  '@typescript-eslint/no-var-requires': 'error',
134
131
  '@typescript-eslint/object-curly-spacing': 'warn',
132
+ '@typescript-eslint/parameter-properties': 'off',
135
133
  '@typescript-eslint/padding-line-between-statements': ['warn', { blankLine: 'always', prev: ['return'], next: ['export'] }],
136
134
  '@typescript-eslint/prefer-as-const': 'warn',
137
135
  '@typescript-eslint/prefer-enum-initializers': 'off',
@@ -187,7 +185,6 @@ module.exports = {
187
185
  'default-param-last': 'off',
188
186
  'init-declarations': 'off',
189
187
  'lines-between-class-members': 'off',
190
- 'no-duplicate-imports': 'off',
191
188
  'no-invalid-this': 'off',
192
189
  'no-loop-func': 'off',
193
190
  'no-redeclare': 'off',