From 5c9fc225bb785cb2174377dd622da8637064966e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Sat, 4 Sep 2021 18:57:32 +0200 Subject: [PATCH] feat: support ESLint 8.x BREAKING CHANGE: Requires ESLint@^8.0.0 --- index.js | 2 ++ jest.js | 11 +++-------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/index.js b/index.js index 946fba3..1473f30 100644 --- a/index.js +++ b/index.js @@ -172,6 +172,7 @@ module.exports = { 'no-unsafe-optional-chaining': 'error', 'no-unused-expressions': 'off', 'no-unused-labels': 'error', + 'no-unused-private-class-members': 'error', 'no-unused-vars': [ 'error', { @@ -208,6 +209,7 @@ module.exports = { 'prefer-exponentiation-operator': 'warn', 'prefer-named-capture-group': 'off', // maybe one day... But I'm not used to it yet. 'prefer-numeric-literals': 'error', + 'prefer-object-has-own': 'error', 'prefer-object-spread': 'warn', 'prefer-promise-reject-errors': 'off', // maybe one day... Not sure I'm in... 'prefer-regex-literals': 'off', diff --git a/jest.js b/jest.js index 175f265..982c393 100644 --- a/jest.js +++ b/jest.js @@ -36,7 +36,6 @@ const rules = { 'jest/consistent-test-it': 'off', 'jest/expect-expect': 'off', - 'jest/lowercase-name': 'off', 'jest/max-nested-describe': 'error', 'jest/no-alias-methods': 'off', 'jest/no-commented-out-tests': 'warn', @@ -59,17 +58,13 @@ const rules = { 'jest/no-standalone-expect': 'off', 'jest/no-test-prefixes': 'error', 'jest/no-test-return-statement': 'off', - 'jest/no-truthy-falsy': 'off', - 'jest/no-try-expect': 'error', 'jest/prefer-called-with': 'error', 'jest/prefer-expect-assertions': 'off', 'jest/prefer-expect-resolves': 'off', 'jest/prefer-hooks-on-top': 'error', - 'jest/prefer-inline-snapshots': 'off', + 'jest/prefer-lowercase-title': 'off', 'jest/prefer-spy-on': 'off', 'jest/prefer-strict-equal': 'off', - 'jest/prefer-to-be-null': 'off', - 'jest/prefer-to-be-undefined': 'off', 'jest/prefer-to-be': 'off', 'jest/prefer-to-contain': 'warn', 'jest/prefer-to-have-length': 'warn', @@ -78,7 +73,7 @@ const rules = { 'jest/require-to-throw-message': 'off', 'jest/require-top-level-describe': 'off', 'jest/unbound-method': 'off', - 'jest/valid-describe': 'error', + 'jest/valid-describe-callback': 'error', 'jest/valid-expect': 'error', 'jest/valid-expect-in-promise': 'error', 'jest/valid-title': 'warn', @@ -108,7 +103,7 @@ const rules = { 'testing-library/no-await-sync-events': 'error', 'testing-library/no-await-sync-query': 'error', 'testing-library/no-container': 'error', - 'testing-library/no-debug': 'error', + 'testing-library/no-debugging-utils': 'error', 'testing-library/no-dom-import': ['error', 'react'], 'testing-library/no-manual-cleanup': 'error', 'testing-library/no-node-access': 'error',