-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.js
More file actions
43 lines (41 loc) · 1.6 KB
/
jest.js
File metadata and controls
43 lines (41 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// @ts-check
import jest from "eslint-plugin-jest"
import tseslint from "typescript-eslint"
export default tseslint.config({
files: ["**/*.ts"],
plugins: { jest },
linterOptions: {
reportUnusedDisableDirectives: true
},
rules: {
"jest/consistent-test-it": ["error", { fn: "test", withinDescribe: "test" }],
"jest/expect-expect": "error",
"jest/max-nested-describe": ["error", { max: 2 }],
"jest/no-alias-methods": "error",
"jest/no-commented-out-tests": "error",
"jest/no-disabled-tests": "error",
"jest/no-conditional-expect": "error",
"jest/no-deprecated-functions": "error",
"jest/no-done-callback": "error",
"jest/no-duplicate-hooks": "error",
"jest/no-export": "error",
"jest/no-focused-tests": "error",
"jest/no-identical-title": "error",
"jest/no-conditional-in-test": "error",
"jest/no-mocks-import": "error",
"jest/no-standalone-expect": "error",
"jest/no-test-prefixes": "error",
"jest/no-test-return-statement": "error",
"jest/prefer-hooks-on-top": "error",
"jest/prefer-spy-on": "error",
"jest/prefer-strict-equal": "error",
"jest/prefer-to-be": "error",
"jest/prefer-to-contain": "error",
"jest/prefer-to-have-length": "error",
"jest/prefer-todo": "error",
"jest/require-to-throw-message": "error",
"jest/valid-describe-callback": "error",
"jest/valid-expect": ["error", { alwaysAwait: true, minArgs: 1, maxArgs: 2 }],
"jest/valid-expect-in-promise": "error"
}
})