-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy path.eslintrc
85 lines (85 loc) · 1.62 KB
/
.eslintrc
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
{
"extends": [
"airbnb",
"prettier",
"prettier/react"
],
"plugins": [
"prettier"
],
"settings": {
"import/resolver": {
"webpack": {
"config": "./webpack.config.js"
}
}
},
"rules": {
"react/jsx-filename-extension": [
1,
{
"extensions": [
".js",
".jsx"
]
}
],
"react/prefer-stateless-function": "off",
"react/destructuring-assignment": 0,
"react/prop-types": 0,
"no-underscore-dangle": 0,
"import/imports-first": [
"error",
"absolute-first"
],
"import/newline-after-import": "error",
"react/forbid-prop-types": "off",
"react/no-danger": "off",
"no-console": "off",
"jsx-a11y/click-events-have-key-events": 0,
"jsx-a11y/no-static-element-interactions": 0,
"template-curly-spacing": [
"error",
"never"
],
"object-curly-spacing": [
"error",
"always",
{
"objectsInObjects": true,
"arraysInObjects": true
}
],
"jsx-a11y/label-has-for": 0,
"quotes": [
"error",
"single"
],
// jsx 中属性全部使用双引
"jsx-quotes": [
"error",
"prefer-double"
],
"space-infix-ops": [
"error"
],
"react/jsx-props-no-spreading": "off",
"jsx-a11y/label-has-associated-control": "off",
"class-methods-use-this": "off",
"no-param-reassign": "off",
"react/sort-comp": "off",
"import/no-cycle": "off",
"react/no-array-index-key": "off"
},
"globals": {
"window": true,
"document": true,
"localStorage": true,
"FormData": true,
"FileReader": true,
"Blob": true,
"XMLHttpRequest": true,
"navigator": true
},
"parser": "babel-eslint"
}