-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathindex.js
77 lines (77 loc) · 1.47 KB
/
index.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
module.exports = {
extends: 'eslint:recommended',
env: {
node: true,
es6: true,
},
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: [
'import',
],
rules: {
'array-bracket-spacing': [ 'error', 'always' ],
'arrow-parens': [ 2, 'as-needed' ],
'comma-dangle': [ 'error', 'always-multiline' ],
'comma-spacing': 'error',
'dot-location': [ 'error', 'property' ],
'dot-notation': 'error',
'eol-last': 'error',
indent: [
'error', 'tab', {
SwitchCase: 1,
FunctionDeclaration: {
body: 1,
parameters: 2,
},
},
],
'no-multiple-empty-lines': [
'error', {
max: 1,
maxBOF: 0,
maxEOF: 0,
},
],
'no-implicit-globals': 'error',
'no-multi-spaces': 'error',
'no-trailing-spaces': 'error',
'object-curly-spacing': [ 'error', 'always' ],
quotes: [ 'error', 'single' ],
semi: [ 'error', 'always' ],
'import/no-self-import': 2,
'import/no-internal-modules': 0,
'import/no-dynamic-require': 0,
'import/no-useless-path-segments': 2,
'import/order': 1,
'import/newline-after-import': 2,
},
overrides: [
{
files: [ '**/spec.js', '**/test.js', '**/spec.mjs', '**/test.mjs' ],
env: {
mocha: true,
},
globals: {
expect: true,
assert: true,
},
},
{
files: [ 'bin.js', '**/bin.js' ],
rules: {
'no-console': 0,
'no-octal': 0,
},
},
{
files: [ 'sw.js', 'serviceworker.js' ],
env: {
browser: true,
serviceworker: true,
},
},
],
};