forked from haixiangyan/jest-tutorial-example
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
34 lines (34 loc) · 955 Bytes
/
.eslintrc.js
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
module.exports = {
root: true,
env: {
browser: true,
node: true,
"jest/globals": true,
},
plugins: [],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:jest/recommended",
"plugin:testing-library/react",
"plugin:prettier/recommended",
],
rules: {
// 关闭规则
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-explicit-any": "off",
"no-var": "off",
"@typescript-eslint/no-var-requires": "off",
"testing-library/no-dom-import": "off",
// 错误提示
"jest/no-focused-tests": "error",
"jest/no-identical-title": "error",
"jest/valid-expect": "error",
"testing-library/await-async-query": "error",
"testing-library/no-await-sync-query": "error",
// 告警提示
"jest/no-disabled-tests": "warn",
"jest/prefer-to-have-length": "warn",
"testing-library/no-debugging-utils": "warn",
},
};