@fullstacksjs/eslint-config 13.10.0 → 13.11.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.
@@ -81,6 +81,7 @@ function base(options = {}) {
81
81
  'no-dupe-else-if': 'error',
82
82
  'no-dupe-keys': 'error',
83
83
  'no-duplicate-case': 'error',
84
+ 'no-duplicate-imports': 'error',
84
85
  'no-empty-character-class': 'error',
85
86
  'no-empty-function': 'warn',
86
87
  'no-empty-pattern': 'error',
@@ -161,6 +162,7 @@ function base(options = {}) {
161
162
  ignoreRestSiblings: true
162
163
  }],
163
164
  'no-use-before-define': ['error', 'nofunc'],
165
+ 'no-useless-assignment': 'warn',
164
166
  'no-useless-backreference': 'error',
165
167
  'no-useless-call': 'error',
166
168
  'no-useless-catch': 'error',
@@ -188,12 +190,17 @@ function base(options = {}) {
188
190
  'preserve-caught-error': (0, _conditions.strict)(options, ['warn', {
189
191
  requireCatchParameter: true
190
192
  }]),
193
+ 'prefer-destructuring': ['warn', {
194
+ object: true,
195
+ array: true
196
+ }],
191
197
  'prefer-exponentiation-operator': 'warn',
192
198
  'prefer-numeric-literals': 'error',
193
199
  'prefer-object-has-own': 'warn',
194
200
  'prefer-rest-params': 'error',
195
201
  'prefer-spread': 'error',
196
202
  'prefer-template': 'error',
203
+ 'prefer-promise-reject-errors': 'warn',
197
204
  'radix': 'error',
198
205
  'require-await': 'error',
199
206
  'require-yield': 'error',
@@ -208,6 +215,9 @@ function base(options = {}) {
208
215
  'grouped-accessor-pairs': 'warn',
209
216
  'no-extra-boolean-cast': 'warn',
210
217
  'no-param-reassign': 'warn',
218
+ 'no-plusplus': ['warn', {
219
+ allowForLoopAfterthoughts: true
220
+ }],
211
221
  'prefer-regex-literals': ['warn', {
212
222
  disallowRedundantWrapping: true
213
223
  }],
@@ -75,7 +75,8 @@ function jest() {
75
75
  'jest/valid-expect-in-promise': 'error',
76
76
  'jest/valid-expect': 'error',
77
77
  'jest/valid-title': 'warn',
78
- 'jest/no-deprecated-functions': 'error'
78
+ 'jest/no-deprecated-functions': 'error',
79
+ 'jest/valid-mock-module-path': 'warn'
79
80
 
80
81
  // ...predicate(options.typescript, {
81
82
  // '@typescript-eslint/unbound-method': 'off',
@@ -16,7 +16,7 @@ function perfectionist() {
16
16
  },
17
17
  rules: {
18
18
  'perfectionist/sort-array-includes': 'warn',
19
- 'perfectionist/sort-classes': 'warn',
19
+ 'perfectionist/sort-classes': 'off',
20
20
  'perfectionist/sort-enums': 'off',
21
21
  'perfectionist/sort-exports': 'warn',
22
22
  'perfectionist/sort-imports': ['warn', {}],
@@ -103,7 +103,6 @@ function typescript(options = {}) {
103
103
  '@typescript-eslint/no-restricted-imports': 'off',
104
104
  '@typescript-eslint/no-shadow': 'error',
105
105
  '@typescript-eslint/no-this-alias': 'error',
106
- '@typescript-eslint/no-type-alias': 'off',
107
106
  '@typescript-eslint/no-unnecessary-type-constraint': 'warn',
108
107
  '@typescript-eslint/no-unsafe-argument': (0, _conditions.strict)(options, 'warn'),
109
108
  '@typescript-eslint/no-unsafe-assignment': (0, _conditions.strict)(options, 'warn'),
@@ -148,9 +147,9 @@ function typescript(options = {}) {
148
147
  '@typescript-eslint/prefer-readonly': 'off',
149
148
  '@typescript-eslint/prefer-readonlysemi': 'off',
150
149
  // Annoying with auto-fix on save.
151
- '@typescript-eslint/prefer-ts-expect-error': 'off',
152
150
  '@typescript-eslint/promise-function-async': 'off',
153
- '@typescript-eslint/restrict-plus-operands': 'off',
151
+ // Breaks react component when return type is React.ReactNode
152
+ '@typescript-eslint/restrict-plus-operands': 'warn',
154
153
  '@typescript-eslint/strict-boolean-expressions': 'off',
155
154
  // Annoying
156
155
  '@typescript-eslint/space-before-blocks': 'off',
@@ -178,6 +177,7 @@ function typescript(options = {}) {
178
177
  }],
179
178
  // Annoying and conflict with @typescript-eslint/no-meaningless-void-operator
180
179
  '@typescript-eslint/no-duplicate-type-constituents': 'warn',
180
+ '@typescript-eslint/no-deprecated': 'error',
181
181
  '@typescript-eslint/no-for-in-array': 'error',
182
182
  '@typescript-eslint/no-implied-eval': 'error',
183
183
  '@typescript-eslint/no-meaningless-void-operator': ['warn', {
@@ -208,6 +208,7 @@ function typescript(options = {}) {
208
208
  '@typescript-eslint/no-unnecessary-type-arguments': 'error',
209
209
  '@typescript-eslint/no-unnecessary-type-assertion': 'error',
210
210
  '@typescript-eslint/no-unsafe-unary-minus': 'error',
211
+ '@typescript-eslint/no-unused-private-class-members': 'warn',
211
212
  '@typescript-eslint/non-nullable-type-assertion-style': 'warn',
212
213
  '@typescript-eslint/only-throw-error': ['warn', {
213
214
  allowRethrowing: true
@@ -247,6 +248,7 @@ function typescript(options = {}) {
247
248
  'consistent-return': 'off'
248
249
  }),
249
250
  // Conflicts with @typescript-eslint
251
+ 'no-unused-private-class-members': 'off',
250
252
  'no-empty-function': 'off',
251
253
  'default-case': 'off',
252
254
  'import/named': 'off',
@@ -271,7 +273,8 @@ function typescript(options = {}) {
271
273
  'dot-notation': 'off',
272
274
  'no-throw-literal': 'off',
273
275
  'require-await': 'off',
274
- 'no-undef': 'off'
276
+ 'no-undef': 'off',
277
+ 'no-duplicate-imports': 'off'
275
278
  }
276
279
  };
277
280
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fullstacksjs/eslint-config",
3
- "version": "13.10.0",
3
+ "version": "13.11.1",
4
4
  "license": "MIT",
5
5
  "author": "fullstacks <fullstacksjs@gmail.com>",
6
6
  "description": "fullstacks eslint config",
@@ -35,16 +35,16 @@
35
35
  }
36
36
  },
37
37
  "dependencies": {
38
- "@eslint-react/eslint-plugin": "2.3.1",
39
- "@eslint/compat": "1.4.1",
40
- "@next/eslint-plugin-next": "16.0.1",
41
- "@stylistic/eslint-plugin": "5.5.0",
42
- "@vitest/eslint-plugin": "1.4.1",
38
+ "@eslint-react/eslint-plugin": "2.3.9",
39
+ "@eslint/compat": "2.0.0",
40
+ "@next/eslint-plugin-next": "16.0.6",
41
+ "@stylistic/eslint-plugin": "5.6.1",
42
+ "@vitest/eslint-plugin": "1.5.1",
43
43
  "deepmerge": "4.3.1",
44
- "eslint-plugin-better-tailwindcss": "3.7.10",
44
+ "eslint-plugin-better-tailwindcss": "3.7.11",
45
45
  "eslint-plugin-cypress": "5.2.0",
46
46
  "eslint-plugin-import-x": "4.16.1",
47
- "eslint-plugin-jest": "29.0.1",
47
+ "eslint-plugin-jest": "29.2.1",
48
48
  "eslint-plugin-jsx-a11y": "6.10.2",
49
49
  "eslint-plugin-n": "17.23.1",
50
50
  "eslint-plugin-perfectionist": "4.15.1",
@@ -53,27 +53,27 @@
53
53
  "eslint-plugin-promise": "7.2.1",
54
54
  "eslint-plugin-react-hooks": "7.0.1",
55
55
  "eslint-plugin-regexp": "2.10.0",
56
- "eslint-plugin-storybook": "10.0.6",
56
+ "eslint-plugin-storybook": "10.1.2",
57
57
  "globals": "16.5.0",
58
58
  "local-pkg": "1.1.2",
59
- "typescript-eslint": "8.46.3"
59
+ "typescript-eslint": "8.48.0"
60
60
  },
61
61
  "devDependencies": {
62
- "@eslint/eslintrc": "3.3.1",
62
+ "@eslint/eslintrc": "3.3.3",
63
63
  "@eslint/js": "9.39.1",
64
- "@semantic-release/github": "12.0.1",
65
- "@semantic-release/npm": "13.1.1",
64
+ "@semantic-release/github": "12.0.2",
65
+ "@semantic-release/npm": "13.1.2",
66
66
  "@semantic-release/release-notes-generator": "14.1.0",
67
67
  "@types/eslint": "9.6.1",
68
- "cspell": "9.3.0",
68
+ "cspell": "9.4.0",
69
69
  "eslint": "9.39.1",
70
70
  "husky": "9.1.7",
71
71
  "jest": "30.2.0",
72
- "lint-staged": "16.2.6",
72
+ "lint-staged": "16.2.7",
73
73
  "pinst": "3.0.0",
74
- "prettier": "3.6.2",
74
+ "prettier": "3.7.3",
75
75
  "semantic-release": "25.0.2",
76
- "storybook": "10.0.6",
76
+ "storybook": "10.1.2",
77
77
  "typescript": "5.9.3",
78
78
  "unbuild": "3.6.1"
79
79
  },
@@ -69,6 +69,7 @@ function base(options = {}) {
69
69
  'no-dupe-else-if': 'error',
70
70
  'no-dupe-keys': 'error',
71
71
  'no-duplicate-case': 'error',
72
+ 'no-duplicate-imports': 'error',
72
73
  'no-empty-character-class': 'error',
73
74
  'no-empty-function': 'warn',
74
75
  'no-empty-pattern': 'error',
@@ -142,6 +143,7 @@ function base(options = {}) {
142
143
  { argsIgnorePattern: '^_', varsIgnorePattern: '^ignore(d)?', args: 'after-used', ignoreRestSiblings: true },
143
144
  ],
144
145
  'no-use-before-define': ['error', 'nofunc'],
146
+ 'no-useless-assignment': 'warn',
145
147
  'no-useless-backreference': 'error',
146
148
  'no-useless-call': 'error',
147
149
  'no-useless-catch': 'error',
@@ -163,12 +165,14 @@ function base(options = {}) {
163
165
  requireCatchParameter: true,
164
166
  },
165
167
  ]),
168
+ 'prefer-destructuring': ['warn', { object: true, array: true }],
166
169
  'prefer-exponentiation-operator': 'warn',
167
170
  'prefer-numeric-literals': 'error',
168
171
  'prefer-object-has-own': 'warn',
169
172
  'prefer-rest-params': 'error',
170
173
  'prefer-spread': 'error',
171
174
  'prefer-template': 'error',
175
+ 'prefer-promise-reject-errors': 'warn',
172
176
  'radix': 'error',
173
177
  'require-await': 'error',
174
178
  'require-yield': 'error',
@@ -184,6 +188,7 @@ function base(options = {}) {
184
188
  'grouped-accessor-pairs': 'warn',
185
189
  'no-extra-boolean-cast': 'warn',
186
190
  'no-param-reassign': 'warn',
191
+ 'no-plusplus': ['warn', { allowForLoopAfterthoughts: true }],
187
192
  'prefer-regex-literals': ['warn', { disallowRedundantWrapping: true }],
188
193
 
189
194
  'no-console': strict(options, 'warn'),
@@ -65,6 +65,7 @@ function jest() {
65
65
  'jest/valid-expect': 'error',
66
66
  'jest/valid-title': 'warn',
67
67
  'jest/no-deprecated-functions': 'error',
68
+ 'jest/valid-mock-module-path': 'warn',
68
69
 
69
70
  // ...predicate(options.typescript, {
70
71
  // '@typescript-eslint/unbound-method': 'off',
@@ -8,7 +8,7 @@ function perfectionist() {
8
8
  plugins: { perfectionist: plugin },
9
9
  rules: {
10
10
  'perfectionist/sort-array-includes': 'warn',
11
- 'perfectionist/sort-classes': 'warn',
11
+ 'perfectionist/sort-classes': 'off',
12
12
  'perfectionist/sort-enums': 'off',
13
13
  'perfectionist/sort-exports': 'warn',
14
14
  'perfectionist/sort-imports': ['warn', {}],
@@ -94,7 +94,6 @@ function typescript(options = {}) {
94
94
  '@typescript-eslint/no-restricted-imports': 'off',
95
95
  '@typescript-eslint/no-shadow': 'error',
96
96
  '@typescript-eslint/no-this-alias': 'error',
97
- '@typescript-eslint/no-type-alias': 'off',
98
97
  '@typescript-eslint/no-unnecessary-type-constraint': 'warn',
99
98
  '@typescript-eslint/no-unsafe-argument': strict(options, 'warn'),
100
99
  '@typescript-eslint/no-unsafe-assignment': strict(options, 'warn'),
@@ -132,9 +131,8 @@ function typescript(options = {}) {
132
131
  ], // I'm not sure...
133
132
  '@typescript-eslint/prefer-readonly': 'off',
134
133
  '@typescript-eslint/prefer-readonlysemi': 'off', // Annoying with auto-fix on save.
135
- '@typescript-eslint/prefer-ts-expect-error': 'off',
136
- '@typescript-eslint/promise-function-async': 'off',
137
- '@typescript-eslint/restrict-plus-operands': 'off',
134
+ '@typescript-eslint/promise-function-async': 'off', // Breaks react component when return type is React.ReactNode
135
+ '@typescript-eslint/restrict-plus-operands': 'warn',
138
136
  '@typescript-eslint/strict-boolean-expressions': 'off', // Annoying
139
137
  '@typescript-eslint/space-before-blocks': 'off',
140
138
 
@@ -158,6 +156,7 @@ function typescript(options = {}) {
158
156
  '@typescript-eslint/no-base-to-string': 'error',
159
157
  '@typescript-eslint/no-confusing-void-expression': ['off', { ignoreArrowShorthand: true, ignoreVoidOperator: true }], // Annoying and conflict with @typescript-eslint/no-meaningless-void-operator
160
158
  '@typescript-eslint/no-duplicate-type-constituents': 'warn',
159
+ '@typescript-eslint/no-deprecated': 'error',
161
160
  '@typescript-eslint/no-for-in-array': 'error',
162
161
  '@typescript-eslint/no-implied-eval': 'error',
163
162
  '@typescript-eslint/no-meaningless-void-operator': ['warn', { checkNever: false }],
@@ -183,6 +182,7 @@ function typescript(options = {}) {
183
182
  '@typescript-eslint/no-unnecessary-type-arguments': 'error',
184
183
  '@typescript-eslint/no-unnecessary-type-assertion': 'error',
185
184
  '@typescript-eslint/no-unsafe-unary-minus': 'error',
185
+ '@typescript-eslint/no-unused-private-class-members': 'warn',
186
186
  '@typescript-eslint/non-nullable-type-assertion-style': 'warn',
187
187
  '@typescript-eslint/only-throw-error': ['warn', { allowRethrowing: true }],
188
188
  '@typescript-eslint/prefer-includes': 'warn',
@@ -217,6 +217,7 @@ function typescript(options = {}) {
217
217
  }),
218
218
 
219
219
  // Conflicts with @typescript-eslint
220
+ 'no-unused-private-class-members': 'off',
220
221
  'no-empty-function': 'off',
221
222
  'default-case': 'off',
222
223
  'import/named': 'off',
@@ -242,6 +243,7 @@ function typescript(options = {}) {
242
243
  'no-throw-literal': 'off',
243
244
  'require-await': 'off',
244
245
  'no-undef': 'off',
246
+ 'no-duplicate-imports': 'off',
245
247
  },
246
248
  };
247
249
  }