-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
78 lines (70 loc) · 2.25 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
module.exports = {
"parser": "babel-eslint",
"extends": ["eslint:recommended", "plugin:react/recommended"],
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"impliedStrict": true,
"jsx": true,
"experimentalObjectRestSpread": true
}
},
"env": {
"browser": true,
"node": true,
"es6": true,
"mocha": true
},
"plugins": [
"react"
],
"globals": {
"define": true,
"__DEV__": true
},
"rules": {
"arrow-body-style": "off",
"arrow-parens": ["warn", "as-needed", { "requireForBlockBody": true }],
"arrow-spacing": "warn",
"camelcase": ["warn", { "properties": "always" }],
"consistent-return": "off",
"func-style": "off",
"jsx-quotes": ["warn", "prefer-double"],
"no-confusing-arrow": "off",
"no-console": ["warn", { allow: ["warn", "error"] }],
"no-constant-condition": "warn",
"no-debugger": "warn",
"no-labels": "warn",
"no-multiple-empty-lines": ["warn", { max: 1, maxEOF: 1 }],
"no-unused-vars": ["warn", { "vars": "all", "args": "after-used", "caughtErrors": "none" }],
"quotes": ["warn", "single", "avoid-escape"],
"semi": ["warn", "always"],
"strict": ["error", "global"],
// ESLint-plugin-React
// https://github.com/yannickcr/eslint-plugin-react
"react/forbid-prop-types": ["warn", { "forbid": ["any"] }],
"react/jsx-boolean-value": "warn",
"react/jsx-closing-bracket-location": "off",
"react/jsx-curly-spacing": ["warn", "always"],
"react/jsx-first-prop-new-line": ["warn", "multiline"],
"react/jsx-indent-props": "off",
"react/jsx-key": "warn",
"react/jsx-max-props-per-line": "off",
"react/jsx-no-bind": "off",
"react/jsx-no-literals": "off",
"react/jsx-pascal-case": "warn",
"react/jsx-sort-prop-types": "off",
"react/jsx-sort-props": "off",
"react/jsx-tag-spacing": ["warn", { "beforeSelfClosing": "always" }],
"react/jsx-wrap-multilines": "warn",
"react/no-multi-comp": "off",
"react/no-set-state": "off",
"react/no-unescaped-entities": "off",
"react/prefer-es6-class": "warn",
"react/prop-types": "warn",
"react/self-closing-comp": "warn",
"react/sort-comp": "warn",
"react/sort-prop-types": "off"
}
};