-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.yml
149 lines (143 loc) · 2.77 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
---
root: true
env:
node: true
jest: true
es2017: true
parserOptions:
sourceType: module
extends:
- eslint:recommended
reportUnusedDisableDirectives: true
overrides:
- files:
- '*.config.js'
parserOptions:
# allowing the strict mode for CommonJS configs
sourceType: script
rules:
# redundant
no-extra-boolean-cast: 'off'
no-prototype-builtins: 'off'
# text safe
eol-last: warn
indent: 'off'
indent-legacy:
- warn
- 2
linebreak-style: warn
no-trailing-spaces: warn
no-multiple-empty-lines:
- warn
- max: 1
maxBOF: 0
maxEOF: 0
# spacing safe
key-spacing:
- warn
- mode: minimum
arrow-spacing: warn
block-spacing: warn
comma-spacing: warn
keyword-spacing: warn
space-in-parens: warn
space-unary-ops: warn
func-call-spacing: warn
rest-spread-spacing: warn
space-before-blocks: warn
object-curly-spacing:
- warn
- always
array-bracket-newline:
- warn
- consistent
array-element-newline:
- warn
- consistent
array-bracket-spacing: warn
computed-property-spacing: warn
space-before-function-paren:
- warn
- anonymous: never
named: never
asyncArrow: always
no-whitespace-before-property: warn
# vars safe
prefer-const: warn
no-var: warn
no-unused-vars:
- warn
- args: all
argsIgnorePattern: "^_"
caughtErrors: all
caughtErrorsIgnorePattern: "^_"
no-unused-expressions:
- warn
- allowTernary: true
# code-style safe
semi:
- warn
- never
curly:
- warn
- multi-line
- consistent
strict: warn
eqeqeq: warn
quotes:
- warn
- single
- avoidEscape: true
wrap-iife: warn
brace-style: warn
comma-style: warn
quote-props:
- warn
- as-needed
comma-dangle: warn
dot-notation: warn
object-shorthand: warn
prefer-arrow-callback: warn
no-extra-parens:
- warn
- functions
no-new-wrappers: warn
no-useless-call: warn
no-throw-literal: warn
no-empty-function: warn
no-useless-escape: warn
no-useless-rename: warn
no-unneeded-ternary: warn
no-useless-constructor: warn
no-useless-computed-key: warn
no-template-curly-in-string: warn
no-misleading-character-class: warn
# code-style unsafe
new-parens: error
guard-for-in: error
array-callback-return: error
no-eval: error
no-void: error
no-labels: error
no-bitwise: error
no-loop-func: error
no-multi-str: error
no-sequences: error
no-lone-blocks: error
no-implied-eval: error
no-octal-escape: error
no-self-compare: error
no-useless-return: error
no-floating-decimal: error
no-use-before-define:
- error
- classes: false
variables: false
functions: false
no-restricted-globals:
- error
- toString
no-unmodified-loop-condition: error
# code-style unsafe but often used during development
no-alert: warn
no-debugger: warn