-
Notifications
You must be signed in to change notification settings - Fork 285
/
.eslintrc.js
54 lines (52 loc) · 1.4 KB
/
.eslintrc.js
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
module.exports = {
env: {
browser: true,
commonjs: true,
es6: true,
node: true,
},
extends: 'google',
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parserOptions: {
ecmaVersion: 8,
},
rules: {
/*
* include rules you want to enforce/suppress/disable here
* they can be set to "off"(0) or "warn"(1) or "error"(2)
* for eg., "semi": "warn" or "semi": 1, that will display
* warnings for all snippets where semicolons aren't used
* but won't throw an error
*/
/*
* some rules have properties that can be modified for eg.,
* "quotes": ["error", "double"], i.e., display errors(2)
* (see above) ÿhen double quotes aren't used.
*/
/* rules */
'arrow-parens': [2, 'as-needed', {requireForBlockBody: true}],
'block-spacing': [2, 'always'],
'brace-style': ['off', '1tbs', {allowSingleLine: true}],
'comma-style': [2, 'last'],
'curly': [2, 'multi-line'],
'guard-for-in': 0,
'linebreak-style': [2, 'unix'],
'max-len': ['warn', {ignoreComments: true, ignoreStrings: true, tabWidth: 2}],
'new-cap': 0,
'no-trailing-spaces': 2,
'no-var': 0,
'prefer-const': 1,
'quotes': [2, 'single'],
'require-jsdoc': 0,
'valid-jsdoc': 0,
'overrides': [{
files: ['examples/js/*.js'],
parserOptions: {
sourceType: "module",
}
}],
},
};