-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
50 lines (45 loc) · 1.18 KB
/
.eslintrc.cjs
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
const error = 'error';
const warn = 'warn';
const off = 'off';
const always = 'always';
module.exports = {
parserOptions: {
ecmaVersion: 'latest',
},
extends: [
'airbnb-base',
],
env: {
browser: true,
},
rules: {
'arrow-parens': [error, 'as-needed'],
camelcase: [warn],
'no-param-reassign': [warn],
'object-curly-newline': [warn, { consistent: true }],
'implicit-arrow-linebreak': [off],
'prefer-template': [warn],
'space-before-function-paren': [error, always],
'import/extensions': [warn],
'import/no-extraneous-dependencies': [warn, { devDependencies: ['**/*.test.js', '**/*.spec.js', '**/*.stories.js'] }],
'import/no-named-as-default': [off],
'import/no-unresolved': [warn],
'key-spacing': [error, {
singleLine: { mode: 'strict' },
multiLine: { mode: 'minimum' },
}],
'no-multi-spaces': [warn, {
exceptions: {
Property: true,
VariableDeclarator: true,
ImportDeclaration: true,
BinaryExpression: true,
},
}],
'no-unused-expressions': [warn, {
allowShortCircuit: true,
allowTernary: true,
allowTaggedTemplates: true,
}],
},
};