-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.yml
86 lines (70 loc) · 2.03 KB
/
.eslintrc.yml
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Use typescript-eslint to lint our TypeScript code
parser: "@typescript-eslint/parser"
# Use Airbnb rules to check code
extends:
- airbnb-base
- plugin:@typescript-eslint/recommended
plugins:
- import
- chai-friendly
env:
browser: true
node: true
settings:
# TypeScript compatibility
import/parsers:
"@typescript-eslint/parser":
- .ts
# TypeScript compatibility
import/resolver:
typescript: {}
# Modules that should be a devDependency and will be used in the application
import/core-modules:
- electron
# Additional rules
rules:
# Turn off linting about having wrong line ending, handled in .gitattributes
linebreak-style: off
# Have chai friendly no-unused-expressions rules, otherwise code can look nasty
no-unused-expressions: off
chai-friendly/no-unused-expressions: error
# Add strictness to type declarations in TypeScript
"@typescript-eslint/explicit-function-return-type": error
"@typescript-eslint/no-explicit-any": error
# Move no-useless-constructor to @typescript-eslint/no-useless-constructor
no-useless-constructor: off
"@typescript-eslint/no-useless-constructor": error
# @typescript-eslint/no-use-before-define is already defined
no-use-before-define: off
# Prevent usage of file extension in import statements
import/extensions:
- error
- never
# Re-adding changed Airbnb rules (removed most likely from @typescript-eslint/recommended)
"@typescript-eslint/camelcase":
- error
- properties: never
"@typescript-eslint/indent":
- error
- 2
- SwitchCase: 1
VariableDeclarator: 1
outerIIFEBody: 1
FunctionDeclaration:
parameters: 1
body: 1
FunctionExpression:
parameters: 1
body: 1
CallExpression:
arguments: 1
ArrayExpression: 1
ObjectExpression: 1
ImportDeclaration: 1
flatTernaryExpressions: false
ignoreComments: false
"@typescript-eslint/no-unused-vars":
- error
- vars: all
args: after-used
ignoreRestSiblings: true