-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
42 lines (42 loc) · 1.26 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
// Setup based on https://github.com/standard/eslint-config-standard-with-typescript
{
"root": true,
"extends": "standard-with-typescript",
"parserOptions": { "project": "tsconfig.json" },
"ignorePatterns": [ "/dist/" ],
"rules": {
// Rules to avoid potential bugs and unintended behavior
"@typescript-eslint/no-shadow": [ "error", { "builtinGlobals": true } ],
"no-alert": "error",
"no-console": "error",
"no-param-reassign": "error",
"no-shadow": "off",
"no-var": "error",
// Readability and maintainability rules
"complexity": "error",
"max-depth": "error",
"max-len": [ "error", { "code": 120, "ignoreUrls": true } ],
// Rules to disallow JavaScript obsoleted syntax and API
"prefer-rest-params": "error",
"prefer-spread": "error",
// Coding style rules, can be removed based on personal preference
"@typescript-eslint/consistent-type-imports": "error",
"import/no-default-export": "error",
"import/order": [ "error", { "newlines-between": "always" } ],
"sort-imports": [ "error", { "ignoreDeclarationSort": true } ]
},
"overrides": [
{
"files": [ "src/test/**/*.test.ts" ],
"rules": {
"@typescript-eslint/no-non-null-assertion": "off"
}
},
{
"files": [ "example/*.js" ],
"rules": {
"no-console": "off"
}
}
]
}