-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
40 lines (37 loc) · 1.24 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
// this file contains eslint configurations
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended", //eslint recommended rule
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"rules": {
"indent": ["error", 4], //4 spaces indentation
"brace-style": ["error", "stroustrup", {"allowSingleLine": true }], //brace style follows stroustrup conventions
"space-before-function-paren": ["error", "always"], //space between function name and parenthesis
"complexity": ["error", 10], //cyclomatic complexity
"max-len": ["error", { "code": 120 }], //max line length
//naming conventions
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "function",
"format": ["camelCase"]
},
{
"selector": "variable",
"modifiers": ["const"],
"format": ["UPPER_CASE"]
},
{
"selector": "class",
"format": ["PascalCase"]
}
]
}
}