-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
46 lines (45 loc) · 1.88 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
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"rules": {
// Default overrides
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/semi": ["warn"],
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/explicit-member-accessibility": ["warn",
{ "accessibility": "explicit", "overrides": { "constructors": "no-public", "methods": "off"}}],
// Style rules
"array-bracket-spacing": ["warn", "always", { "arraysInArrays": false, "objectsInArrays": false }],
"block-spacing": ["warn", "always"],
"capitalized-comments": "off", // Ideally this would be on, but the "comment line" shortcut causes trouble
"comma-dangle": "off",
"computed-property-spacing": ["warn", "always"],
"func-call-spacing": ["warn", "never"],
"func-name-matching": ["error"],
"func-names": ["error", "as-needed"],
"func-style": ["error", "declaration", { "allowArrowFunctions": true }],
"key-spacing": ["warn" ],
"keyword-spacing": ["warn", { "overrides": {
"if": { "after": false },
"for": { "after": false },
"while": { "after": false }
} }],
"max-len": ["warn", {"code": 120}],
"new-cap": ["warn"],
"new-parens": ["warn"],
"no-trailing-spaces": ["warn"],
"object-curly-spacing": ["warn", "always", { "arraysInObjects": false, "objectsInObjects": false }],
"space-before-blocks": ["warn", "always"],
"space-in-parens": ["warn", "always" ],
"spaced-comment": ["warn", "always", { "exceptions": ["-"] }],
"curly": ["warn"]
}
}