-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
65 lines (65 loc) · 1.49 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
{
"env": {
"browser": true,
"commonjs": true,
"es2021": true
},
"extends": [
"standard-with-typescript",
"eslint:recommended",
"prettier",
"plugin:security/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"tsconfigRootDir": "./",
"project": ["./tsconfig.json"]
},
"plugins": ["@typescript-eslint"],
"rules": {
"comma-dangle": ["error", "always-multiline"],
"eol-last": ["error", "always"],
"indent": ["error", 2], // for 2 space
"linebreak-style": ["error", "unix"],
"semi": ["error", "never"],
"sort-imports": [
"error",
{
"allowSeparatedGroups": true,
"ignoreDeclarationSort": true,
"memberSyntaxSortOrder": ["all", "single", "multiple", "none"]
}
],
"sort-keys": 0,
"quotes": [
"error",
"single",
{
"avoidEscape": true
}
],
"no-unused-vars": "error",
"consistent-return": 1,
"no-else-return": 2,
"space-unary-ops": 2,
"@typescript-eslint/strict-boolean-expressions": [
2,
{
"allowString": false,
"allowNumber": false
}
],
"@typescript-eslint/explicit-function-return-type": "off"
},
"overrides": [
{
// enable the rule specifically for TypeScript files
"files": ["*.ts", "*.tsx"],
"rules": {
"@typescript-eslint/explicit-function-return-type": "error"
}
}
]
}