1
1
'use strict' ;
2
2
3
3
module . exports = {
4
- extends : 'eslint:recommended' ,
4
+ extends : 'airbnb' ,
5
+ parser : 'babel-eslint' ,
5
6
parserOptions : {
6
- ecmaVersion : 2017 ,
7
+ ecmaVersion : 2018 ,
8
+ sourceType : 'script' ,
7
9
ecmaFeatures : {
8
10
experimentalObjectRestSpread : true ,
9
11
} ,
@@ -16,18 +18,18 @@ module.exports = {
16
18
{
17
19
files : [ '*.jsx' ] ,
18
20
parserOptions : {
21
+ sourceType : 'module' ,
19
22
ecmaFeatures : { jsx : true } ,
20
23
} ,
21
24
} ,
22
25
{
23
26
files : [ '*.mjs' ] ,
24
27
parserOptions : { sourceType : 'module' } ,
25
28
env : {
26
- node : false ,
29
+ node : true ,
27
30
} ,
28
- globals : {
29
- Buffer : false ,
30
- process : false ,
31
+ rules : {
32
+ 'no-restricted-globals' : [ 'error' , 'require' ] ,
31
33
} ,
32
34
} ,
33
35
{
@@ -36,144 +38,26 @@ module.exports = {
36
38
} ,
37
39
] ,
38
40
rules : {
39
- 'no-await-in-loop' : 'warn' ,
40
- 'no-compare-neg-zero' : 'error' ,
41
- 'no-extra-parens' : [ 'warn' , 'all' , { nestedBinaryExpressions : false } ] ,
42
- 'no-template-curly-in-string' : 'error' ,
43
- 'no-unsafe-negation' : 'error' ,
44
- 'valid-jsdoc' : [
45
- 'error' ,
46
- {
47
- requireReturn : false ,
48
- requireReturnDescription : false ,
49
- prefer : { return : 'returns' , arg : 'param' } ,
50
- preferType : {
51
- String : 'string' ,
52
- Number : 'number' ,
53
- Boolean : 'boolean' ,
54
- Symbol : 'symbol' ,
55
- object : 'Object' ,
56
- function : 'Function' ,
57
- array : 'Array' ,
58
- date : 'Date' ,
59
- error : 'Error' ,
60
- null : 'void' ,
61
- } ,
62
- } ,
63
- ] ,
64
- 'accessor-pairs' : 'warn' ,
65
- 'array-callback-return' : 'error' ,
66
- complexity : 'warn' ,
67
- 'consistent-return' : 'off' ,
68
- curly : [ 'error' , 'multi-or-nest' , 'consistent' ] ,
69
- 'dot-location' : [ 'error' , 'property' ] ,
70
- 'dot-notation' : 'error' ,
71
- eqeqeq : 'error' ,
72
- 'no-empty-function' : 'error' ,
73
- 'no-floating-decimal' : 'error' ,
74
- 'no-implied-eval' : 'error' ,
75
- 'no-invalid-this' : 'error' ,
76
- 'no-lone-blocks' : 'error' ,
77
- 'no-multi-spaces' : 'error' ,
78
- 'no-new-func' : 'error' ,
79
- 'no-new-wrappers' : 'error' ,
80
- 'no-new' : 'error' ,
81
- 'no-octal-escape' : 'error' ,
82
- 'no-return-assign' : 'error' ,
83
- 'no-return-await' : 'error' ,
84
- 'no-self-compare' : 'error' ,
85
- 'no-sequences' : 'error' ,
86
- 'no-throw-literal' : 'error' ,
87
- 'no-unmodified-loop-condition' : 'error' ,
88
- 'no-unused-expressions' : 'error' ,
89
- 'no-useless-call' : 'error' ,
90
- 'no-useless-concat' : 'error' ,
91
- 'no-useless-escape' : 'error' ,
92
- 'no-useless-return' : 'error' ,
93
- 'no-void' : 'error' ,
94
- 'no-warning-comments' : 'warn' ,
95
- 'prefer-promise-reject-errors' : 'error' ,
96
- 'require-await' : 'warn' ,
97
- 'wrap-iife' : 'error' ,
98
- yoda : 'error' ,
99
- 'no-label-var' : 'error' ,
100
- 'no-shadow' : 'error' ,
101
- 'no-undef-init' : 'error' ,
102
- 'callback-return' : 'error' ,
103
- 'handle-callback-err' : 'error' ,
104
- 'no-mixed-requires' : 'error' ,
105
- 'no-new-require' : 'error' ,
106
- 'no-path-concat' : 'error' ,
107
- 'array-bracket-spacing' : 'error' ,
108
- 'block-spacing' : 'error' ,
109
- 'brace-style' : [ 'error' , '1tbs' , { allowSingleLine : true } ] ,
110
- 'capitalized-comments' : [ 'off' , 'always' , { ignoreConsecutiveComments : true } ] ,
111
- 'comma-dangle' : [ 'error' , 'always-multiline' ] ,
112
- 'comma-spacing' : 'error' ,
113
- 'comma-style' : 'error' ,
114
- 'computed-property-spacing' : 'error' ,
115
- 'consistent-this' : [ 'error' , '$this' ] ,
116
- 'eol-last' : 'error' ,
117
- 'func-names' : 'error' ,
118
- 'func-name-matching' : 'error' ,
119
- 'func-style' : [ 'error' , 'declaration' , { allowArrowFunctions : true } ] ,
120
- indent : [ 'error' , 2 , { SwitchCase : 1 } ] ,
121
- 'key-spacing' : 'error' ,
122
- 'keyword-spacing' : 'error' ,
123
- 'max-depth' : 'error' ,
124
- 'max-len' : [ 'error' , 120 , 2 ] ,
125
- 'max-nested-callbacks' : [ 'error' , { max : 4 } ] ,
126
- 'max-statements-per-line' : [ 'error' , { max : 2 } ] ,
127
- 'new-cap' : 'off' ,
128
- 'newline-per-chained-call' : [ 'error' , { ignoreChainWithDepth : 3 } ] ,
129
- 'no-array-constructor' : 'error' ,
130
- 'no-inline-comments' : 'off' ,
131
- 'no-lonely-if' : 'error' ,
132
- 'no-mixed-operators' : 'error' ,
133
- 'no-multiple-empty-lines' : [ 'error' , { max : 2 , maxEOF : 1 , maxBOF : 0 } ] ,
134
- 'no-new-object' : 'error' ,
135
- 'no-spaced-func' : 'error' ,
136
- 'no-trailing-spaces' : 'error' ,
137
- 'no-unneeded-ternary' : 'error' ,
138
- 'no-whitespace-before-property' : 'error' ,
139
- 'nonblock-statement-body-position' : [ 'error' , 'below' ] ,
140
- 'object-curly-spacing' : [ 'error' , 'always' ] ,
141
- 'operator-assignment' : 'error' ,
142
- 'operator-linebreak' : [ 'error' , 'after' ] ,
143
- 'padded-blocks' : [ 'error' , 'never' ] ,
144
- 'quote-props' : [ 'error' , 'as-needed' ] ,
145
- quotes : [
146
- 'error' ,
147
- 'single' ,
148
- { avoidEscape : true , allowTemplateLiterals : true } ,
149
- ] ,
150
- 'semi-spacing' : 'error' ,
151
- semi : 'error' ,
152
- 'space-before-blocks' : 'error' ,
153
- 'space-before-function-paren' : [
154
- 'error' ,
155
- { anonymous : 'never' , named : 'never' , asyncArrow : 'always' } ,
156
- ] ,
157
- 'space-in-parens' : 'error' ,
158
- 'space-infix-ops' : 'error' ,
159
- 'space-unary-ops' : 'error' ,
160
- 'spaced-comment' : 'error' ,
161
- 'template-tag-spacing' : 'error' ,
162
- 'unicode-bom' : 'error' ,
163
- 'arrow-body-style' : 'error' ,
41
+ 'strict' : [ 'error' , 'global' ] ,
42
+ 'curly' : [ 'error' , 'multi-or-nest' , 'consistent' ] ,
43
+ 'no-iterator' : 'off' ,
44
+ 'global-require' : 'off' ,
45
+ 'quote-props' : [ 'error' , 'consistent-as-needed' ] ,
46
+ 'no-param-reassign' : 'off' ,
164
47
'arrow-parens' : [ 'error' , 'always' ] ,
165
- 'arrow-spacing' : 'error' ,
166
- 'no-duplicate-imports' : 'error' ,
167
- 'no-useless-computed-key' : 'error' ,
168
- 'no-useless-constructor' : 'error' ,
169
- 'prefer-arrow-callback' : 'error' ,
170
- 'prefer-numeric-literals' : 'error' ,
171
- 'prefer-rest-params' : 'error' ,
172
- 'prefer-spread' : 'error' ,
173
- 'prefer-template' : 'error' ,
174
- 'rest-spread-spacing' : 'error' ,
175
- 'template-curly-spacing' : 'error' ,
176
- 'yield-star-spacing' : 'error' ,
177
- strict : [ 'error' , 'global' ] ,
48
+ 'no-multi-assign' : 'off' ,
49
+ 'no-underscore-dangle' : 'off' ,
50
+ 'no-restricted-syntax' : 'off' ,
51
+ 'object-curly-newline' : 'off' ,
52
+ 'import/no-dynamic-require' : 'off' ,
53
+ 'import/no-extraneous-dependencies' : [ 'error' , {
54
+ devDependencies : true ,
55
+ } ] ,
56
+ 'import/extensions' : 'off' ,
57
+ } ,
58
+ globals : {
59
+ WebAssembly : false ,
60
+ BigInt : false ,
61
+ URL : false ,
178
62
} ,
179
63
} ;
0 commit comments