forked from GoogleChrome/workbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
113 lines (113 loc) · 1.92 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
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
module.exports = {
extends: ['eslint:recommended', 'google'],
env: {
serviceworker: true,
browser: true,
node: true,
es6: true,
},
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module',
},
globals: {
workbox: false,
WorkboxSW: false,
SyncEvent: false,
BroadcastChannel: false,
Comlink: false,
},
rules: {
"jsdoc/check-types": 2,
"jsdoc/newline-after-description": 2,
},
plugins: [
'jsdoc',
],
parser: 'babel-eslint',
overrides: [{
files: ['test/**/*.{js,mjs}'],
env: {
mocha: true,
},
rules: {
'max-len': 0,
'require-jsdoc': 0,
'valid-jsdoc': 0,
'no-invalid-this': 0,
},
}, {
files: [
'packages/workbox-core/_private/logger.mjs',
'packages/workbox-sw/_default.mjs',
'infra/utils/log-helper.js',
'packages/workbox-cli/src/lib/logger.js',
],
rules: {
'no-console': 0,
},
}, {
files: [
'infra/**/*.js',
],
rules: {
'max-len': 0,
},
}, {
files: [
'gulp-tasks/**/*.js',
'infra/**/*.js'
],
rules: {
'valid-jsdoc': 0,
'require-jsdoc': 0,
},
}, {
files: [
'infra/testing/**/*',
],
env: {
'mocha': true
}
}, {
files: [
'test/workbox-build/static/**/*.js',
],
rules: {
'no-unused-vars': 0,
'no-undef': 0,
},
}, {
files: [
'packages/workbox-build/src/templates/**/*.js',
],
rules: {
'max-len': 0,
},
}
, {
files: [
'packages/workbox-sw/**/*',
],
globals: {
'workbox': false,
},
}, {
files: [
'infra/testing/env-it.js',
],
rules: {
'no-invalid-this': 0,
},
}, {
files: [
'packages/**/*.{mjs,js}',
],
plugins: [
'header',
],
rules: {
'header/header': [2, 'block', {pattern: 'Copyright \\d{4} Google Inc.'}]
}
}],
};