diff --git a/index.js b/index.js index fb67dc8..c378e71 100644 --- a/index.js +++ b/index.js @@ -306,6 +306,20 @@ module.exports = { '@typescript-eslint/require-await': 'error', '@typescript-eslint/return-await': 'error', }, + overrides: [ + { + files: ['**/__tests__/**/*'], + plugins: ['jest', 'testing-library'], + extends: [ + 'plugin:jest/recommended', + 'plugin:jest/style', + 'plugin:testing-library/react', + ], + rules: { + 'testing-library/prefer-screen-queries': 'off', + }, + }, + ], globals: { fetch: true, }, diff --git a/package.json b/package.json index bfb73a4..7d6bbb1 100644 --- a/package.json +++ b/package.json @@ -33,9 +33,11 @@ "eslint-config-prettier": "8.5.0", "eslint-import-resolver-babel-plugin-root-import": "1.1.1", "eslint-plugin-import": "2.26.0", + "eslint-plugin-jest": "27.0.4", "eslint-plugin-react": "7.31.8", "eslint-plugin-react-hooks": "4.6.0", "eslint-plugin-react-native": "4.0.0", + "eslint-plugin-testing-library": "5.6.4", "typescript": "4.8.3" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index 781a979..6d15055 100644 --- a/yarn.lock +++ b/yarn.lock @@ -844,7 +844,7 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/utils@5.37.0": +"@typescript-eslint/utils@5.37.0", "@typescript-eslint/utils@^5.10.0", "@typescript-eslint/utils@^5.13.0": version "5.37.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.37.0.tgz#7784cb8e91390c4f90ccaffd24a0cf9874df81b2" integrity sha512-jUEJoQrWbZhmikbcWSMDuUSxEE7ID2W/QCV/uz10WtQqfOuKZUqFGjqLJ+qhDd17rjgp+QJPqTdPIBWwoob2NQ== @@ -2947,6 +2947,13 @@ eslint-plugin-import@2.26.0: resolve "^1.22.0" tsconfig-paths "^3.14.1" +eslint-plugin-jest@27.0.4: + version "27.0.4" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-27.0.4.tgz#ab9c7b3f48bfade4762c24c415a5d9bbc0174a61" + integrity sha512-BuvY78pHMpMJ6Cio7sKg6jrqEcnRYPUc4Nlihku4vKx3FjlmMINSX4vcYokZIe+8TKcyr1aI5Kq7vYwgJNdQSA== + dependencies: + "@typescript-eslint/utils" "^5.10.0" + eslint-plugin-react-hooks@4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz#4c3e697ad95b77e93f8646aaa1630c1ba607edd3" @@ -2985,6 +2992,13 @@ eslint-plugin-react@7.31.8: semver "^6.3.0" string.prototype.matchall "^4.0.7" +eslint-plugin-testing-library@5.6.4: + version "5.6.4" + resolved "https://registry.yarnpkg.com/eslint-plugin-testing-library/-/eslint-plugin-testing-library-5.6.4.tgz#9dffd9feafbb08a36240f88156357685b56f0b8a" + integrity sha512-0oW3tC5NNT2WexmJ3848a/utawOymw4ibl3/NkwywndVAz2hT9+ab70imA7ccg3RaScQgMvJT60OL00hpmJvrg== + dependencies: + "@typescript-eslint/utils" "^5.13.0" + eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz"