Skip to content

Commit f170066

Browse files
committed
feat(lint): add Jest support to ESLint
1 parent 75b903f commit f170066

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
"eslint-config-kentcdodds": "^14.3.4",
6363
"eslint-config-prettier": "^6.0.0",
6464
"eslint-plugin-import": "^2.18.2",
65+
"eslint-plugin-jest": "^22.15.0",
6566
"eslint-plugin-jsx-a11y": "^6.2.3",
6667
"eslint-plugin-prettier": "^3.1.0",
6768
"eslint-plugin-react": "^7.14.3",

src/config/eslintrc.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@ const airbnb = withBaseConfig('eslint-config-airbnb-typescript')
77
const prettier = withBaseConfig('eslint-config-prettier')
88

99
module.exports = {
10-
plugins: ['prettier', ifAnyDep('react', 'react-hooks')].filter(Boolean),
10+
plugins: ['prettier', 'jest', ifAnyDep('react', 'react-hooks')].filter(
11+
Boolean,
12+
),
1113
extends: [
1214
ifAnyDep('react', airbnb(), airbnb('base')),
15+
'plugin:jest/recommended',
1316
prettier(),
1417
prettier('@typescript-eslint'),
1518
ifAnyDep('react', prettier('react')),

yarn.lock

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2877,6 +2877,13 @@ eslint-plugin-import@^2.17.1, eslint-plugin-import@^2.18.2:
28772877
read-pkg-up "^2.0.0"
28782878
resolve "^1.11.0"
28792879

2880+
eslint-plugin-jest@^22.15.0:
2881+
version "22.15.0"
2882+
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-22.15.0.tgz#fe70bfff7eeb47ca0ab229588a867f82bb8592c5"
2883+
integrity sha512-hgnPbSqAIcLLS9ePb12hNHTRkXnkVaCfOwCt2pzQ8KpOKPWGA4HhLMaFN38NBa/0uvLfrZpcIRjT+6tMAfr58Q==
2884+
dependencies:
2885+
"@typescript-eslint/experimental-utils" "^1.13.0"
2886+
28802887
eslint-plugin-jest@^22.4.1:
28812888
version "22.14.1"
28822889
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-22.14.1.tgz#32287dade9bc0a1920c61e25a71cf11363d78015"

0 commit comments

Comments
 (0)