-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy patheslint.config.js
46 lines (44 loc) · 1.11 KB
/
eslint.config.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
const google = require('eslint-config-google');
if (google.rules['valid-jsdoc']) {
delete google.rules['valid-jsdoc'];
delete google.rules['require-jsdoc'];
}
module.exports = [
google,
{
languageOptions: {
parserOptions: {
ecmaVersion: 13,
},
},
rules: {
'no-unused-vars': 'off',
'no-tabs': 'off',
'one-var': 'off',
'brace-style': [ 'error', 'stroustrup', { allowSingleLine: true } ],
'max-len': 'off',
'no-multiple-empty-lines': [ 'error', { max: 1, maxBOF: 1 } ],
'padded-blocks': 'off',
'curly': 'off',
'object-curly-spacing': [ 'error', 'always' ],
'block-spacing': [ 'error', 'always' ],
'array-bracket-spacing': [ 'error', 'always' ],
'prefer-template': 'error',
'new-cap': 'off',
'guard-for-in': 'off',
'indent': [
'error',
'tab',
{
CallExpression: { arguments: 1 },
FunctionDeclaration: { body: 1, parameters: 2 },
FunctionExpression: { body: 1, parameters: 2 },
MemberExpression: 2,
ObjectExpression: 1,
SwitchCase: 1,
ignoredNodes: [ 'ConditionalExpression', 'VariableDeclarator' ],
},
],
},
},
];