-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.js
60 lines (55 loc) · 1.64 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
const off = 'off';
const warn = 'warn';
const error = 'error';
const always = 'always';
module.exports = {
extends: 'airbnb-base',
parser: '@babel/eslint-parser',
parserOptions: {
ecmaVersion: "latest",
requireConfigFile: false,
},
env: {
browser: true,
jest: true,
},
globals: {
},
rules: {
'func-names': [off],
'no-console': [off],
'no-param-reassign': [off],
'no-underscore-dangle': [off],
'no-case-declarations': [off],
strict: [off],
'global-require': [warn],
'max-len': [1, 500, 4],
'arrow-parens': [error, 'as-needed'],
camelcase: [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,
}],
},
};