-
Notifications
You must be signed in to change notification settings - Fork 31
/
.eslintrc.js
58 lines (53 loc) · 1.47 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
module.exports = {
'parserOptions': {
'sourceType': 'module',
'ecmaVersion': 2017,
},
'extends': [
'eslint:recommended',
'google',
],
'plugins': [
'jsdoc',
],
'rules': {
// Don't allow assignment in conditionals
'no-cond-assign': ['error', 'except-parens'],
// We're allowed to log to console
'no-console': 'off',
// Don't prohibit whitespace around code blocks
'padded-blocks': 'off',
// Preferred indentation rules
'indent': ['error', 2, {
'FunctionExpression': {'parameters': 'first'},
'SwitchCase': 1,
'VariableDeclarator': 1,
}],
// Downgrade JSDoc requirement to a warning
'require-jsdoc': 'warn',
// Use @returns if the function returns
'valid-jsdoc': ['error', {
'requireReturn': false,
'prefer': {'return': 'returns'},
}],
// Turn on all jsdoc checks
'jsdoc/check-param-names': 'error',
'jsdoc/check-tag-names': 'error',
'jsdoc/check-types': 'error',
'jsdoc/newline-after-description': 'error',
'jsdoc/require-description-complete-sentence': 'error',
'jsdoc/require-hyphen-before-param-description': 'error',
'jsdoc/require-param': 'error',
'jsdoc/require-param-description': 'error',
'jsdoc/require-param-type': 'error',
'jsdoc/require-returns-description': 'error',
'jsdoc/require-returns-type': 'error',
},
'globals': {
},
'env': {
'es6': 'true',
'webextensions': 'true',
'browser': 'true',
},
};