-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
113 lines (113 loc) · 2.83 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
module.exports = {
env: {
browser: true,
es6: true,
jest: true,
mocha: true,
node: true
},
extends: ['plugin:import/recommended', 'airbnb', 'eslint:recommended', 'react-app'],
globals: {
document: true,
shallow: true,
sinon: true,
window: true
},
parser: 'babel-eslint',
parserOptions: {
ecmaFeatures: {
experimentalDecorators: true,
jsx: true
},
ecmaVersion: 2018,
sourceType: 'module'
},
plugins: ['babel', 'import', 'jsx-a11y', 'mocha', 'react'],
rules: {
'comma-dangle': [
'warn',
{
arrays: 'never',
exports: 'ignore',
functions: 'never',
imports: 'ignore',
objects: 'never'
}
],
'func-names': 0,
'import/prefer-default-export': 'off',
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: true
}
],
indent: [
'error',
4,
{
FunctionDeclaration: {
body: 1,
parameters: 3
}
}
],
'key-spacing': [
2,
{
align: 'colon'
}
],
'no-console': 'warn',
'no-template-curly-in-string': 'off',
'no-undef': 'warn',
'no-underscore-dangle': 0,
'no-use-before-define': 'warn',
'prefer-rest-params': 'warn',
'react/forbid-prop-types': 'off',
'react/jsx-filename-extension': [
1,
{
extensions: ['.js', '.jsx']
}
],
'react/jsx-indent': [2, 4],
'react/jsx-indent-props': [2, 4],
semi: 2,
'space-before-function-paren': [
'error',
{
anonymous: 'never',
asyncArrow: 'ignore',
named: 'never'
}
],
'valid-jsdoc': [
'warn',
{
prefer: {
returns: 'return',
yield: 'yields'
},
preferType: {
Boolean: 'boolean',
Number: 'number',
String: 'string',
array: 'Array',
function: 'Function',
object: 'Object'
},
requireParamDescription: false,
requireReturn: false,
requireReturnDescription: false
}
]
},
settings: {
'import/resolver': {
node: {
moduleDirectory: ['./', 'node_modules']
}
}
}
};