-
Notifications
You must be signed in to change notification settings - Fork 15
/
.eslintrc.json
56 lines (56 loc) · 1.52 KB
/
.eslintrc.json
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
44
45
46
47
48
49
50
51
52
53
54
55
56
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"project": ["./tsconfig.json", "./test/tsconfig.json", "./website/tsconfig.json", "./exampleWidget/tsconfig.json"]
},
"plugins": [
"@typescript-eslint",
"unused-imports",
"testing-library",
"jest-dom"
],
"rules": {
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/semi": [2, "never"],
"@typescript-eslint/space-before-function-paren": [2, "always"],
"@typescript-eslint/indent": [2, 2],
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": 0,
"max-len": [2, 120],
"quotes": [2, "single"],
"curly": "warn",
"eqeqeq": "warn",
"no-throw-literal": "warn",
"semi": "off"
},
"overrides": [
{
"files": ["*.ts", "*.tsx"],
"rules": {
// see https://stackoverflow.com/questions/55280555/typescript-eslint-eslint-plugin-error-route-is-defined-but-never-used-no-un
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error",
"no-undef": "off",
// allow overloads
"no-redeclare": "off"
}
},
{
"files": [
"**/__tests__/**/*.[jt]s?(x)",
"**/?(*.)+(spec|test).[jt]s?(x)"
],
"extends": [
"plugin:testing-library/react",
"plugin:jest-dom/recommended"
],
"rules": {
"testing-library/no-container": 1,
"testing-library/no-node-access": 1
}
}
]
}