Skip to content

Commit 31c474c

Browse files
committed
chore: add eslint-plugin-jest
1 parent adc44db commit 31c474c

File tree

3 files changed

+44
-0
lines changed

3 files changed

+44
-0
lines changed

eslint.config.js

+16
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import parser from '@typescript-eslint/parser'
77

88
import prettier from 'eslint-plugin-prettier'
99

10+
import jest from 'eslint-plugin-jest'
11+
1012
/** @type{import('eslint').Linter.Config[]} */
1113
const config = [
1214
js.configs.recommended,
@@ -37,6 +39,20 @@ const config = [
3739
rules: {
3840
...prettier.configs.recommended.rules
3941
}
42+
},
43+
{
44+
files: ['**/*.spec.ts', '**/*.test.ts'],
45+
plugins: {
46+
jest
47+
},
48+
languageOptions: {
49+
globals: {
50+
...globals.jest
51+
}
52+
},
53+
rules: {
54+
...jest.configs.recommended.rules
55+
}
4056
}
4157
]
4258

package-lock.json

+27
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
"@typescript-eslint/parser": "^8.29.0",
7171
"atob": "^2.1.2",
7272
"eslint": "^9.24.0",
73+
"eslint-plugin-jest": "^28.11.0",
7374
"eslint-plugin-prettier": "^5.2.6",
7475
"globals": "^16.0.0",
7576
"husky": "^9.1.7",

0 commit comments

Comments
 (0)