-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
84 lines (84 loc) · 2.61 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
82
83
84
module.exports = {
'env': {
'browser': true,
'es6': true,
'jest': true,
},
'extends': [
'airbnb',
'eslint:recommended',
],
'globals': {
'it': 'readonly',
'describe': 'readonly',
'test': 'readonly',
'expect': 'readonly',
'beforeEach': 'readonly',
'jest': 'readonly',
'Atomics': 'readonly',
'SharedArrayBuffer': 'readonly',
},
'parserOptions': {
'ecmaFeatures': {
'jsx': true,
},
'ecmaVersion': 2018,
'sourceType': 'module',
},
'plugins': [
'react',
'jest',
'import'
],
'parser': 'babel-eslint',
'rules': {
"import/order": [
"error",
{
"groups": ["builtin", "external", "internal"],
"pathGroups": [
{
"pattern": "react",
"group": "external",
"position": "before"
}
],
"pathGroupsExcludedImportTypes": ["react"],
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
],
'react/prop-types': 0,
'import/prefer-default-export': 'off',
'import/no-default-export': 'error',
'no-var': 'error',
'semi': 'error',
'quotes': ['error', 'single'],
'no-multi-spaces': 'error',
'indent': ['error', 2, { 'SwitchCase': 1 }],
'no-multiple-empty-lines': ['error', { 'max': 2 }],
'prefer-const': 'error',
'import/newline-after-import': ['error', { 'count': 2 }],
'max-len': ['error', { 'code': 120 }],
'no-console': 'off',
'react/jsx-props-no-spreading': 'off',
'react/forbid-prop-types': 'off',
'no-plusplus': 'off',
'react/jsx-filename-extension': ['warn', { 'extensions': ['.js', '.jsx'] }],
'import/no-extraneous-dependencies': ['error', { 'devDependencies': true }],
'react/button-has-type': 'off',
'linebreak-style': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
'jsx-a11y/no-static-element-interactions': 'off',
'camelcase': 'error',
'react/jsx-indent': 'warn',
'no-use-before-define': ['error', { 'variables': false }],
'object-curly-newline': 'off',
'template-curly-spacing': 'off',
'import/no-unresolved': 'off',
'no-param-reassign': [2, { 'props': false }],
},
};