-
Notifications
You must be signed in to change notification settings - Fork 75
/
.eslintrc.js
81 lines (81 loc) · 2.15 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
module.exports = {
parser: 'babel-eslint',
env: {
browser: true,
commonjs: true,
es6: true,
},
globals: {
page: true,
browser: true,
__dirname: true,
describe: true,
beforeAll: true,
it: true,
afterAll: true,
expect: true,
jest: true,
process: true,
},
extends: ['airbnb'],
parserOptions: {
ecmaFeatures: {
experimentalObjectRestSpread: true,
experimentalDecorators: true,
legacyDecorators: true,
jsx: true,
},
sourceType: 'module',
},
plugins: ['react'],
rules: {
'implicit-arrow-linebreak': 'off',
'import/extensions': 'off',
'import/order': [
'error',
{
groups: ['external', 'builtin', 'sibling', 'parent'],
'newlines-between': 'always',
},
],
indent: ['error', 4],
'no-multiple-empty-lines': [
2,
{
max: 1,
},
],
'import/no-extraneous-dependencies': 'off',
'import/no-named-as-default': 'off',
'import/prefer-default-export': 'off',
'jsx-a11y/anchor-is-valid': 'off',
'jsx-a11y/label-has-for': 'off',
'linebreak-style': ['error', 'unix'],
'no-console': 'off',
'no-param-reassign': 'off',
'no-return-await': 'off',
'no-unused-expressions': 'off',
quotes: ['error', 'single'],
'react/jsx-indent': 'off',
'react/jsx-indent-props': 'off',
'react/jsx-uses-react': 'error',
'react/jsx-uses-vars': 'error',
'react/jsx-no-bind': [
'error',
{
ignoreRefs: true,
allowArrowFunctions: true,
allowFunctions: true,
allowBind: true,
},
],
'react/prop-types': 'off',
'react/sort-comp': [
2,
{
order: ['static-methods', 'lifecycle', 'render', 'everything-else'],
},
],
semi: ['error', 'always'],
},
};