Skip to content

Commit db9965a

Browse files
committed
feat: support ESLint 8.x
BREAKING CHANGE: Requires ESLint@^8.0.0
1 parent e677dc8 commit db9965a

File tree

3 files changed

+14
-17
lines changed

3 files changed

+14
-17
lines changed

index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ module.exports = {
172172
'no-unsafe-optional-chaining': 'error',
173173
'no-unused-expressions': 'off',
174174
'no-unused-labels': 'error',
175+
'no-unused-private-class-members': 'error',
175176
'no-unused-vars': [
176177
'error',
177178
{
@@ -208,6 +209,7 @@ module.exports = {
208209
'prefer-exponentiation-operator': 'warn',
209210
'prefer-named-capture-group': 'off', // maybe one day... But I'm not used to it yet.
210211
'prefer-numeric-literals': 'error',
212+
'prefer-object-has-own': 'error',
211213
'prefer-object-spread': 'warn',
212214
'prefer-promise-reject-errors': 'off', // maybe one day... Not sure I'm in...
213215
'prefer-regex-literals': 'off',

jest.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ const rules = {
3636

3737
'jest/consistent-test-it': 'off',
3838
'jest/expect-expect': 'off',
39-
'jest/lowercase-name': 'off',
4039
'jest/max-nested-describe': 'error',
4140
'jest/no-alias-methods': 'off',
4241
'jest/no-commented-out-tests': 'warn',
@@ -59,17 +58,13 @@ const rules = {
5958
'jest/no-standalone-expect': 'off',
6059
'jest/no-test-prefixes': 'error',
6160
'jest/no-test-return-statement': 'off',
62-
'jest/no-truthy-falsy': 'off',
63-
'jest/no-try-expect': 'error',
6461
'jest/prefer-called-with': 'error',
6562
'jest/prefer-expect-assertions': 'off',
6663
'jest/prefer-expect-resolves': 'off',
6764
'jest/prefer-hooks-on-top': 'error',
68-
'jest/prefer-inline-snapshots': 'off',
65+
'jest/prefer-lowercase-title': 'off',
6966
'jest/prefer-spy-on': 'off',
7067
'jest/prefer-strict-equal': 'off',
71-
'jest/prefer-to-be-null': 'off',
72-
'jest/prefer-to-be-undefined': 'off',
7368
'jest/prefer-to-be': 'off',
7469
'jest/prefer-to-contain': 'warn',
7570
'jest/prefer-to-have-length': 'warn',
@@ -78,7 +73,7 @@ const rules = {
7873
'jest/require-to-throw-message': 'off',
7974
'jest/require-top-level-describe': 'off',
8075
'jest/unbound-method': 'off',
81-
'jest/valid-describe': 'error',
76+
'jest/valid-describe-callback': 'error',
8277
'jest/valid-expect': 'error',
8378
'jest/valid-expect-in-promise': 'error',
8479
'jest/valid-title': 'warn',
@@ -108,7 +103,7 @@ const rules = {
108103
'testing-library/no-await-sync-events': 'error',
109104
'testing-library/no-await-sync-query': 'error',
110105
'testing-library/no-container': 'error',
111-
'testing-library/no-debug': 'error',
106+
'testing-library/no-debugging-utils': 'error',
112107
'testing-library/no-dom-import': ['error', 'react'],
113108
'testing-library/no-manual-cleanup': 'error',
114109
'testing-library/no-node-access': 'error',

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,24 @@
3333
},
3434
"homepage": "https://github.com/kentcdodds/eslint-config-kentcdodds#readme",
3535
"dependencies": {
36-
"@typescript-eslint/eslint-plugin": "^4.33.0",
37-
"@typescript-eslint/parser": "^4.33.0",
36+
"@typescript-eslint/eslint-plugin": "^5.9.0",
37+
"@typescript-eslint/parser": "^5.9.0",
3838
"eslint-config-prettier": "^8.3.0",
39-
"eslint-plugin-import": "^2.25.3",
40-
"eslint-plugin-jest": "^24.7.0",
41-
"eslint-plugin-jest-dom": "^3.9.4",
39+
"eslint-plugin-import": "^2.25.4",
40+
"eslint-plugin-jest": "^25.3.4",
41+
"eslint-plugin-jest-dom": "^4.0.1",
4242
"eslint-plugin-jsx-a11y": "^6.5.1",
4343
"eslint-plugin-react": "^7.28.0",
4444
"eslint-plugin-react-hooks": "^4.3.0",
45-
"eslint-plugin-testing-library": "^4.12.4",
45+
"eslint-plugin-testing-library": "^5.0.1",
4646
"read-pkg-up": "^7.0.1",
4747
"semver": "^7.3.5"
4848
},
4949
"devDependencies": {
5050
"@testing-library/dom": "^8.11.1",
5151
"@testing-library/jest-dom": "^5.16.1",
52-
"eslint": "^7.32.0",
53-
"eslint-find-rules": "^3.6.1",
52+
"eslint": "^8.6.0",
53+
"eslint-find-rules": "^4.1.0",
5454
"husky": "^7.0.4",
5555
"jest": "^27.4.7",
5656
"npm-run-all": "^4.1.5",
@@ -60,7 +60,7 @@
6060
"typescript": "^4.5.4"
6161
},
6262
"peerDependencies": {
63-
"eslint": "^7.5.0",
63+
"eslint": "^8.0.0",
6464
"typescript": "^4.0.0"
6565
},
6666
"peerDependenciesMeta": {

0 commit comments

Comments
 (0)