-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
84 lines (81 loc) · 1.97 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,
node: true,
},
'parserOptions': {
ecmaFeatures: {
experimentalObjectRestSpread: true,
jsx: true,
},
sourceType: 'module',
},
'plugins': [
'react',
],
'extends': [
'eslint:recommended',
'plugin:react/recommended'
],
'rules': {
'indent': ['error', 2],
'linebreak-style': ['error', 'unix'],
'quotes': ['error', 'single'],
'semi': ['error', 'always'],
'comma-dangle': [2, 'always-multiline'],
'comma-spacing': [2, {
before: false,
after: true,
}],
'comma-style': [2, 'last'],
'quote-props': [2, 'as-needed', { keywords: false, unnecessary: true, numbers: false }],
/**
* Variables
*/
'no-shadow': 2,
'no-shadow-restricted-names': 2,
'no-undef': 2,
'no-unused-vars': [2, {
'vars': 'local',
'args': 'after-used'
}],
'no-use-before-define': 2,
/**
* React
*/
'react/jsx-boolean-value': [2, 'never'],
'react/jsx-closing-bracket-location': 0,
'react/jsx-curly-spacing': [2, 'never'],
'react/jsx-equals-spacing': [2, 'never'],
'react/jsx-handler-names': [2, {
'eventHandlerPrefix': 'handle',
'eventHandlerPropPrefix': 'on'
}],
'react/jsx-indent': [2, 2],
'react/jsx-indent-props': [2, 2],
'react/jsx-key': 2,
'react/jsx-max-props-per-line': 0,
'react/jsx-no-bind': 0,
'react/jsx-no-duplicate-props': 2,
'react/jsx-no-literals': 0,
'react/jsx-no-undef': 2,
'react/jsx-pascal-case': 2,
'react/jsx-sort-prop-types': 0,
'react/jsx-sort-props': 0,
'react/jsx-tag-spacing': [2, {
'beforeSelfClosing': 'always',
}],
'react/jsx-uses-vars': 2,
'react/jsx-filename-extension': [2, { 'extensions': ['.js', '.jsx'] }],
'react/jsx-wrap-multilines': [2, {
'declaration': true,
'assignment': true,
'return': true
}],
/**
* Style
*/
'semi': [2, 'always'],
},
};