-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
executable file
·109 lines (109 loc) · 2.76 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
{
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "import", "prettier"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"prettier"
],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
"import/no-cycle": ["error", { "maxDepth": "∞" }],
"prettier/prettier": "error",
"no-restricted-syntax": [
"error",
{
"selector": "ImportDeclaration[source.value=/^\\./][source.value!=/\\.(c|m)?(js(on(c)?)?|ts)$/]",
"message": "Local imports must have the explicit extension"
}
],
"max-len": [
"error",
{
"code": 80,
"ignoreComments": true,
"ignoreTrailingComments": true,
"ignoreUrls": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true,
"ignoreRegExpLiterals": true
}
],
"eol-last": ["error", "always"],
"import/no-default-export": "error",
"eqeqeq": [2, "always"],
"no-var": 2,
"block-scoped-var": 2,
"no-async-promise-executor": "off",
"no-bitwise": [2, { "allow": ["~"] }],
"no-duplicate-imports": [2, { "includeExports": true }],
"no-eq-null": 2,
"no-multiple-empty-lines": [2, { "max": 1, "maxEOF": 0 }],
"no-template-curly-in-string": 2,
"no-unneeded-ternary": 2,
"quote-props": [2, "as-needed"],
"require-await": 2,
"rest-spread-spacing": [2, "never"],
"semi-spacing": 2,
"space-before-function-paren": [
2,
{ "anonymous": "always", "named": "never", "asyncArrow": "always" }
],
"space-unary-ops": 2,
"yoda": 2,
"no-const-assign": 2,
"no-extra-semi": 2,
"for-direction": 2,
"no-eval": 2,
"no-empty": ["error", { "allowEmptyCatch": true }]
},
"env": {
"browser": false,
"node": true
},
"overrides": [
{
"files": ["*.ts"],
"rules": {
"@typescript-eslint/semi": ["error", "always"],
// "@typescript-eslint/quotes": [
// "error",
// "single",
// { "avoidEscape": true, "allowTemplateLiterals": true }
// ],
"@typescript-eslint/no-empty-function": [
"error",
{ "allow": ["arrowFunctions"] }
]
}
},
{
"files": ["*.js"],
"parserOptions": {
"project": null
},
"rules": {
"semi": ["error", "always"],
"quotes": [
"error",
"single",
{ "avoidEscape": true, "allowTemplateLiterals": true }
],
"no-unused-vars": 2
}
}
],
"settings": {
"import/resolver": {
"typescript": {
"alwaysTryTypes": true,
"extensions": [".js", ".ts"]
}
}
}
}