-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.cjs
More file actions
61 lines (59 loc) · 1.28 KB
/
Copy patheslint.config.cjs
File metadata and controls
61 lines (59 loc) · 1.28 KB
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
const js = require('@eslint/js');
const jsdoc = require('eslint-plugin-jsdoc');
const googleStyle = require('eslint-config-google');
const globals = require('globals');
// These rules are no longer supported, but the Google style package we depend
// on hasn't been updated in years to remove them, even though they have been
// removed from the repo. Manually delete them here to avoid breaking linting.
delete googleStyle.rules['valid-jsdoc'];
delete googleStyle.rules['require-jsdoc'];
module.exports = [
{
ignores: [
'node_modules/*',
'coverage/*'
]
},
js.configs.recommended,
jsdoc.configs['flat/recommended'],
googleStyle,
{
rules: {
'max-len': ['error', {
code: 120,
tabWidth: 2
}],
'comma-dangle': ['error', 'never'],
'jsdoc/check-values': ['off'],
'object-curly-spacing': ['error', 'always'],
'indent': ['error', 2, {
SwitchCase: 1
}]
}
},
{
files: [
'index.js',
'*.config.js'
],
languageOptions: {
globals: {
...globals.node
}
}
},
{
files: [
'test/**/*.js'
],
rules: {
'no-invalid-this': ['off']
},
languageOptions: {
globals: {
...globals.node,
...globals.jest
}
}
}
];