-
Notifications
You must be signed in to change notification settings - Fork 2k
/
.eslintrc
71 lines (67 loc) · 1.51 KB
/
.eslintrc
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint",
"react-hooks",
"no-for-of-loops",
"import",
"simple-import-sort"
],
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"settings": {
"react": {
"version": "17"
}
},
"env": {
"browser": true,
"jest": true,
"es6": true,
"node": true
},
"rules": {
"import/first": "error",
"import/no-amd": "error",
"import/no-anonymous-default-export": "warn",
"import/no-webpack-loader-syntax": "error",
"import/extensions": ["error", "always", { "ignorePackages": true }],
// use simple-import-sort
"import/order": "off",
// https://github.com/lydell/eslint-plugin-simple-import-sort#usage
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
"@typescript-eslint/consistent-type-imports": [
"error",
{
"prefer": "type-imports"
}
],
"no-for-of-loops/no-for-of-loops": 2,
"react/prop-types": 0,
"react/react-in-jsx-scope": 0,
// TODO: re-enable
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/explicit-module-boundary-types": 0
},
"overrides": [
{
"files": "packages/test-suite-*/**/*",
"rules": {
"import/extensions": ["error", "never"],
"@typescript-eslint/consistent-type-imports": "off"
}
},
{
"files": "packages/docsite/**/*",
"rules": {
"import/extensions": ["error", "never"],
"@typescript-eslint/consistent-type-imports": "off"
}
}
]
}