-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.json
64 lines (59 loc) · 1.45 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
// see also: https://eslint.org/docs/user-guide/configuring
{
"ignorePatterns": ["/lib/"],
// config common to all
"env": {
"es6": true,
"es2017": true,
"node": true
},
"parserOptions": {
"ecmaVersion": 2019,
"sourceType": "module"
},
"overrides": [
// all files to be preformatted
{
"files": ["**/*.js", "lib/**/*.d.ts"],
"rules": {
"lines-around-comment": [
"error",
{
"beforeBlockComment": true,
"beforeLineComment": true,
"allowBlockStart": true,
"allowObjectStart": true,
"allowArrayStart": true,
"allowClassStart": true
}
]
}
},
// all TypeScript files
{
"files": ["**/*.ts"],
"plugins": ["@typescript-eslint"],
"parser": "@typescript-eslint/parser"
},
// basic rules
{
"files": ["src/**/*.ts"],
"extends": ["eslint:recommended", "prettier"]
},
// rules for source code in TypeScript
{
"files": ["src/**/*.ts"],
"parserOptions": { "project": "tsconfig.json" },
"plugins": ["total-functions"],
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:total-functions/recommended",
"prettier"
],
"rules": {
"no-fallthrough": "off" // already checked by TypeScript
}
}
]
}