1
1
'use strict' ;
2
2
3
3
module . exports = {
4
- ' env' : {
5
- ' es6' : true ,
6
- ' node' : true ,
4
+ env : {
5
+ es6 : true ,
6
+ node : true ,
7
7
} ,
8
- ' parserOptions' : {
9
- ' ecmaVersion' : '2017'
8
+ parserOptions : {
9
+ ecmaVersion : '2017' ,
10
10
} ,
11
- 'extends' : [
12
- 'eslint:recommended'
13
- ] ,
14
- 'plugins' : [
15
- 'jsdoc'
16
- ] ,
17
- 'rules' : {
11
+ extends : [ 'eslint:recommended' ] ,
12
+ plugins : [ 'jsdoc' ] ,
13
+ rules : {
18
14
/*
19
15
* Possible errors
20
16
*/
@@ -34,10 +30,10 @@ module.exports = {
34
30
*/
35
31
36
32
// Enforce consistent brace style for all control statements
37
- ' curly' : 'error' ,
33
+ curly : 'error' ,
38
34
39
35
// Require the use of === and !==
40
- ' eqeqeq' : 'error' ,
36
+ eqeqeq : 'error' ,
41
37
42
38
// Disallow `else` blocks after `return` statements in `if` statements
43
39
'no-else-return' : 'error' ,
@@ -65,7 +61,7 @@ module.exports = {
65
61
*/
66
62
67
63
// Require global strict mode directive
68
- ' strict' : [ 'error' , 'global' ] ,
64
+ strict : [ 'error' , 'global' ] ,
69
65
70
66
/*
71
67
* Stylistic issues
@@ -80,10 +76,10 @@ module.exports = {
80
76
'array-bracket-spacing' : [ 'error' , 'never' ] ,
81
77
82
78
// Require CamelCase
83
- ' camelcase' : [ 'error' , { ' properties' : 'never' } ] ,
79
+ camelcase : [ 'error' , { properties : 'never' } ] ,
84
80
85
81
// Require space after comma
86
- 'comma-spacing' : [ 'error' , { ' after' : true } ] ,
82
+ 'comma-spacing' : [ 'error' , { after : true } ] ,
87
83
88
84
// Require newline at the end of files
89
85
'eol-last' : [ 'error' , 'always' ] ,
@@ -93,14 +89,10 @@ module.exports = {
93
89
94
90
// Use tabs as indentation
95
91
// Enforce indentation level for case clauses in switch statements
96
- 'indent' : [
97
- 'error' , 'tab' , { 'SwitchCase' : 1 }
98
- ] ,
92
+ indent : [ 'error' , 'tab' , { SwitchCase : 1 } ] ,
99
93
100
94
// Require space after colon in object literal properties
101
- 'key-spacing' : [
102
- 'error' , { 'afterColon' : true }
103
- ] ,
95
+ 'key-spacing' : [ 'error' , { afterColon : true } ] ,
104
96
105
97
// Require space before and after keywords
106
98
'keyword-spacing' : 'error' ,
@@ -109,9 +101,7 @@ module.exports = {
109
101
'linebreak-style' : [ 'error' , 'unix' ] ,
110
102
111
103
// Disallow empty block statements
112
- 'no-empty' : [
113
- 'error' , { 'allowEmptyCatch' : true }
114
- ] ,
104
+ 'no-empty' : [ 'error' , { allowEmptyCatch : true } ] ,
115
105
116
106
// Disallow `if` statements as the only statement in `else` blocks
117
107
'no-lonely-if' : 'error' ,
@@ -137,17 +127,20 @@ module.exports = {
137
127
'object-curly-spacing' : [ 'error' , 'always' ] ,
138
128
139
129
// Require single quotes
140
- ' quotes' : [ 'error' , 'single' ] ,
130
+ quotes : [ 'error' , 'single' ] ,
141
131
142
132
// Require space before blocks
143
133
'space-before-blocks' : [ 'error' , 'always' ] ,
144
134
145
135
// Disallow a space before function parenthesis
146
- 'space-before-function-paren' : [ 'error' , {
147
- 'named' : 'never' ,
148
- 'anonymous' : 'never' ,
149
- 'asyncArrow' : 'always' ,
150
- } ] ,
136
+ 'space-before-function-paren' : [
137
+ 'error' ,
138
+ {
139
+ named : 'never' ,
140
+ anonymous : 'never' ,
141
+ asyncArrow : 'always' ,
142
+ } ,
143
+ ] ,
151
144
152
145
// Disallow spaces inside of parentheses
153
146
'space-in-parens' : 'error' ,
@@ -159,12 +152,10 @@ module.exports = {
159
152
'spaced-comment' : 'error' ,
160
153
161
154
// Require semicolon at the end of statement
162
- ' semi' : [ 'error' , 'always' ] ,
155
+ semi : [ 'error' , 'always' ] ,
163
156
164
157
// Enforce spacing around colons of switch statements
165
- 'switch-colon-spacing' : [
166
- 'error' , { 'after' : true , 'before' : false }
167
- ] ,
158
+ 'switch-colon-spacing' : [ 'error' , { after : true , before : false } ] ,
168
159
169
160
/*
170
161
* ECMAScript 6
@@ -182,9 +173,7 @@ module.exports = {
182
173
183
174
// Require `const` declarations for variables
184
175
// that are never reassigned after declared
185
- 'prefer-const' : [
186
- 'error' , { 'destructuring' : 'all' }
187
- ] ,
176
+ 'prefer-const' : [ 'error' , { destructuring : 'all' } ] ,
188
177
189
178
// Require template literals instead of string concatenation
190
179
'prefer-template' : 'error' ,
@@ -199,9 +188,7 @@ module.exports = {
199
188
'jsdoc/check-param-names' : 'warn' ,
200
189
'jsdoc/check-syntax' : 'warn' ,
201
190
'jsdoc/check-tag-names' : 'warn' ,
202
- 'jsdoc/check-types' : [
203
- 'warn' , { 'noDefaults' : true }
204
- ] ,
191
+ 'jsdoc/check-types' : [ 'warn' , { noDefaults : true } ] ,
205
192
'jsdoc/no-undefined-types' : 'warn' ,
206
193
'jsdoc/require-param' : 'warn' ,
207
194
'jsdoc/require-param-description' : 'warn' ,
@@ -212,11 +199,12 @@ module.exports = {
212
199
'jsdoc/require-returns-type' : 'warn' ,
213
200
'jsdoc/valid-types' : 'warn' ,
214
201
} ,
215
- 'settings' : {
216
- 'jsdoc' : {
217
- 'tagNamePreference' : {
218
- 'class' : 'constructor' , 'returns' : 'return'
219
- }
202
+ settings : {
203
+ jsdoc : {
204
+ tagNamePreference : {
205
+ class : 'constructor' ,
206
+ returns : 'return' ,
207
+ } ,
220
208
} ,
221
209
} ,
222
210
} ;
0 commit comments