Skip to content

Commit e19358f

Browse files
committed
Update plugins, delete old rules and configure new rules
1 parent c33df89 commit e19358f

File tree

5 files changed

+392
-405
lines changed

5 files changed

+392
-405
lines changed

configs/base-plugins.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,9 @@ module.exports = {
202202
'unicorn/prefer-object-from-entries': 'error',
203203
'unicorn/no-useless-fallback-in-spread': 'error',
204204
'unicorn/no-invalid-remove-event-listener': 'off',
205+
'unicorn/template-indent': 'error',
206+
'unicorn/no-empty-file': 'error',
207+
'unicorn/prefer-export-from': 'error',
205208

206209
// enable in the future
207210
'unicorn/prefer-top-level-await': 'off',

configs/jest.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module.exports = {
2121
assertFunctionNames: ['expect']
2222
}
2323
],
24-
'jest/lowercase-name': ['error'],
24+
'jest/prefer-lowercase-title': ['error'],
2525
'jest/no-alias-methods': ['error'],
2626
'jest/no-commented-out-tests': ['error'],
2727
'jest/no-conditional-expect': ['error'],
@@ -40,31 +40,28 @@ module.exports = {
4040
'jest/no-test-return-statement': ['error'],
4141
'jest/prefer-called-with': ['error'],
4242
'jest/prefer-strict-equal': ['error'],
43-
'jest/prefer-to-be-null': ['error'],
44-
'jest/prefer-to-be-undefined': ['error'],
43+
'jest/prefer-to-be': ['error'],
4544
'jest/prefer-to-contain': ['error'],
4645
'jest/prefer-to-have-length': ['error'],
4746
'jest/require-to-throw-message': ['error'],
4847
'jest/require-top-level-describe': ['error'],
49-
'jest/no-expect-resolves': ['off'],
5048
'jest/no-interpolation-in-snapshots': ['off'],
5149
'jest/no-jest-import': ['off'],
5250
'jest/no-mocks-import': ['off'],
5351
'jest/no-restricted-matchers': ['off'],
54-
'jest/no-truthy-falsy': ['off'],
55-
'jest/no-try-expect': ['off'],
5652
'jest/prefer-expect-assertions': ['off'],
5753
'jest/prefer-hooks-on-top': ['off'],
58-
'jest/prefer-inline-snapshots': ['off'],
5954
'jest/prefer-spy-on': ['off'],
6055
'jest/prefer-todo': ['off'],
61-
'jest/valid-describe': ['off'],
56+
'jest/valid-describe-callback': ['off'],
6257
'jest/valid-expect-in-promise': ['off'],
6358
'jest/valid-expect': ['off'],
6459
'jest/valid-title': ['off'],
6560
'jest/no-if': ['off'],
6661
'jest/no-done-callback': ['off'],
6762
'jest/unbound-method': 'off',
68-
'jest/max-nested-describe': ['error', { max: 4 }]
63+
'jest/max-nested-describe': ['error', { max: 4 }],
64+
'jest/prefer-expect-resolves': 'error',
65+
'jest/require-hook': 'warn'
6966
}
7067
};

configs/typescript.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,6 @@ module.exports = {
258258
'@typescript-eslint/no-unsafe-call': ['warn'],
259259
'@typescript-eslint/no-unsafe-member-access': ['warn'],
260260
'@typescript-eslint/no-unsafe-return': ['warn'],
261-
'@typescript-eslint/no-unused-vars-experimental': ['off'],
262261
'no-use-before-define': 'off',
263262
'@typescript-eslint/no-use-before-define': ['error'],
264263
'@typescript-eslint/prefer-as-const': ['error'],
@@ -325,6 +324,9 @@ module.exports = {
325324
'@typescript-eslint/no-unsafe-argument': 'error',
326325
'@typescript-eslint/prefer-return-this-type': 'off',
327326
'@typescript-eslint/no-meaningless-void-operator': 'error',
328-
'@typescript-eslint/padding-line-between-statements': 'off'
327+
'@typescript-eslint/padding-line-between-statements': 'off',
328+
'@typescript-eslint/no-restricted-imports': 'warn',
329+
'@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error',
330+
'@typescript-eslint/consistent-type-exports': 'error'
329331
}
330332
};

0 commit comments

Comments
 (0)