-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc
149 lines (149 loc) · 4.81 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
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
{
"extends": ["airbnb", "prettier"],
"env": {
"browser": true,
"node": true,
"jest": true
},
"globals": {
"shallow": false,
"render": false,
"mount": false,
"shallowToJson": false,
"renderToJson": false,
"mountToJson": false,
"shallowWithIntl": false,
"mountWithIntl": false
},
"parser": "babel-eslint",
"settings": {
"import/resolver": "webpack",
"flowtype": {
"onlyFilesWithFlowAnnotation": true
}
},
"plugins": ["react", "jsx-a11y", "flowtype"],
"rules": {
"linebreak-style": ["off"],
"indent": [
"error",
4,
{
"SwitchCase": 1
}
],
"camelcase": ["off", "never"],
"max-len": [
"off",
100,
{
"ignoreComments": true
}
],
"no-multiple-empty-lines": [
"error",
{
"max": 1,
"maxEOF": 0,
"maxBOF": 0
}
],
"arrow-parens": ["error", "as-needed"],
"arrow-body-style": ["error", "as-needed"],
"comma-dangle": ["error", "never"],
"no-param-reassign": ["off"],
"no-useless-escape": ["off"],
"no-template-curly-in-string": ["off"],
"one-var": ["off"],
"function-paren-newline": ["error", "consistent"],
"dot-notation": [
"error",
{
"allowPattern": "^[a-zA-Z]+(_[a-zA-Z]+)+$"
}
],
"no-unused-vars": ["warn"],
"no-plusplus": [
"error",
{
"allowForLoopAfterthoughts": true
}
],
"no-console": ["error", { "allow": ["info", "warn", "error", "verbose", "silly", "debug"] }],
"no-case-declarations": ["off"],
"no-underscore-dangle": ["off"],
"quotes": ["error", "double", "avoid-escape"],
"eqeqeq": ["warn", "smart"],
"prefer-destructuring": [
"warn",
{
"object": true,
"array": false
}
],
"spaced-comment": ["off"],
"import/no-unresolved": ["off"],
"import/no-absolute-path": ["off"],
"import/no-dynamic-require": ["off"],
"import/no-extraneous-dependencies": ["off"],
"import/prefer-default-export": ["off"],
"import/extensions": ["off"],
"object-curly-newline": ["off"],
"global-require": ["off"],
"react/no-unused-state": ["warn"],
"react/no-unused-prop-types":["off"],
"react/prop-types": ["off"],
"react/jsx-filename-extension": ["off"],
"react/jsx-indent": ["error", 4],
"react/jsx-indent-props": ["error", 4],
"react/jsx-uses-vars": ["error"],
"react/jsx-uses-react": ["error"],
"react/no-this-in-sfc":["error"],
"react/jsx-key":["error"],
"react/jsx-handler-names": ["warn", {
"eventHandlerPrefix": "handle",
"eventHandlerPropPrefix": "on"
}],
"jsx-a11y/anchor-is-valid": [
"error",
{
"components": ["Link"],
"specialLink": ["to", "hrefLeft", "hrefRight"],
"aspects": ["noHref", "invalidHref", "preferButton"]
}
],
"react/no-array-index-key": ["off"],
"react/sort-comp": [
"error",
{
"order": ["lifecycle", "static-methods", "everything-else", "render"]
}
],
"class-methods-use-this": ["off"],
"flowtype/boolean-style": ["error", "boolean"],
"flowtype/define-flow-type": "warn",
"flowtype/delimiter-dangle": ["error", "never"],
"flowtype/generic-spacing": ["error", "never"],
"flowtype/no-primitive-constructor-types": "error",
"flowtype/no-types-missing-file-annotation": "error",
"flowtype/no-weak-types": ["off"],
"flowtype/object-type-delimiter": ["error", "comma"],
"flowtype/require-parameter-type": "error",
"flowtype/require-return-type": [
"error",
"always",
{
"annotateUndefined": "never"
}
],
"flowtype/require-valid-file-annotation": "error",
"flowtype/semi": ["error", "always"],
"flowtype/space-after-type-colon": ["error", "always"],
"flowtype/space-before-generic-bracket": ["error", "never"],
"flowtype/space-before-type-colon": ["error", "never"],
"flowtype/type-id-match": ["error", "^([A-Za-z0-9]+)+Type$"],
"flowtype/union-intersection-spacing": ["error", "always"],
"flowtype/use-flow-type": "warn",
"flowtype/valid-syntax": "warn"
}
}