-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.eslintrc
More file actions
71 lines (68 loc) · 1.82 KB
/
.eslintrc
File metadata and controls
71 lines (68 loc) · 1.82 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
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
{
"extends": [
"airbnb",
"airbnb-typescript",
"airbnb/hooks",
"prettier"
],
"plugins": ["prettier"],
"parserOptions": {
"project": "./tsconfig.json"
},
"rules": {
// * All JS rules
"no-console": "off",
"no-underscore-dangle": 0,
"no-warning-comments": [
2,
{ "terms": ["temp", "no-commit", "dont-commit"], "location": "start" }
],
"radix": 0,
"global-require": 0,
"quote-props": ["error", "consistent-as-needed"],
"no-unused-expressions": [
"error",
{
"allowShortCircuit": true,
"allowTernary": true,
"allowTaggedTemplates": true
}
],
// "arrow-parens": ["error", "as-needed", { "requireForBlockBody": true }],
"object-shorthand": ["error", "properties"],
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }],
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error"],
// * All react rules
"react/jsx-filename-extension": [1, { "extensions": [".js", "tsx"] }],
"react/destructuring-assignment": 0,
// * React 17 special
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off",
"no-restricted-syntax": [
"error",
{
"selector": "ImportDeclaration[source.value=/.*\\.css/]:matches(!ImportDeclaration[source.value=/.*\\.css/] ~ ImportDeclaration[source.value!=/.*\\.css/])",
"message": "CSS imports should be after all other imports"
}
]
},
"overrides": [
{
"files": ["serviceWorker.ts"],
"rules": {
"no-restricted-globals": [
"error",
{
"name": "window",
"message": "window is not available in service worker, did you mean \"self\" ?"
}
]
}
}
],
"env": {
"browser": true,
"jest": true
}
}