-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
94 lines (94 loc) · 3.24 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
module.exports = {
extends: [
'eslint:recommended',
'standard',
'react-app',
'plugin:react/recommended'
],
rules: {
'no-console': [1, { allow: ['info', 'error'] }],
'no-labels': 0,
indent: [
2,
4,
{ SwitchCase: 1, ignoredNodes: ['TemplateLiteral > *'] }
],
'jsx-quotes': [2, 'prefer-single'],
'jsx-a11y/href-no-hash': 'off',
'react/jsx-boolean-value': [2, 'always'],
'react/jsx-closing-bracket-location': [
2,
{ selfClosing: 'after-props', nonEmpty: 'after-props' }
],
'react/jsx-curly-spacing': [2, 'never', { allowMultiline: false }],
'react/jsx-max-props-per-line': [2, { maximum: 3 }],
'react/self-closing-comp': 2,
'react/sort-comp': [
1,
{
order: [
'propTypes',
'defaultProps',
'static-methods',
'lifecycle',
'everything-else',
'render'
]
}
],
semi: [2, 'always'],
'space-before-function-paren': [
'error',
{
anonymous: 'never',
named: 'never',
asyncArrow: 'ignore'
}
],
'valid-jsdoc': [
'error',
{
prefer: {
arg: 'param',
argument: 'param',
return: 'returns'
},
preferType: {
object: 'Object',
array: 'Array',
string: 'String',
number: 'Number',
boolean: 'Boolean',
promise: 'Promise'
},
requireReturn: false,
requireReturnType: true,
requireParamDescription: false,
requireReturnDescription: false,
matchDescription: '.+'
}
],
'padding-line-between-statements': [
'error',
{ blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' },
{
blankLine: 'any',
prev: ['const', 'let', 'var'],
next: ['const', 'let', 'var']
},
{ blankLine: 'always', prev: '*', next: 'return' },
{ blankLine: 'always', prev: 'directive', next: '*' },
{ blankLine: 'any', prev: 'directive', next: 'directive' },
{ blankLine: 'always', prev: 'import', next: '*' },
{ blankLine: 'any', prev: 'import', next: 'import' },
{ blankLine: 'any', prev: ['const', 'let', 'var'], next: 'export' },
{ blankLine: 'any', prev: 'export', next: 'export' },
{ blankLine: 'always', prev: 'function', next: '*' },
{ blankLine: 'always', prev: '*', next: 'function' },
{ blankLine: 'always', prev: 'block-like', next: '*' },
{ blankLine: 'always', prev: '*', next: 'block-like' },
{ blankLine: 'always', prev: 'class', next: '*' },
{ blankLine: 'always', prev: '*', next: 'class' }
]
}
};