-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.eslintrc
89 lines (89 loc) · 2.73 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
{
"extends": "airbnb",
"env": {
"browser": true,
"node": true,
"mocha": true
},
"settings": {
"import/parser": "babel-eslint",
"import/resolve": {
"moduleDirectory": ["node_modules", "src"]
},
"propWrapperFunctions": [ "forbidExtraProps" ] // The names of any functions used to wrap the propTypes object, such as `forbidExtraProps`. If this isn't set, any propTypes wrapped in a function will be skipped.
},
"parser": "babel-eslint",
"plugins": [
"react", "import", "jsx-a11y"
],
"rules": {
"jsx-a11y/href-no-hash": "off",
"jsx-a11y/anchor-is-valid": ["warn", { "aspects": ["invalidHref"] }],
"import/newline-after-import": 0,
"import/no-extraneous-dependencies": 0,
"import/extensions":0,
"import/first":0,
"import/no-dynamic-require":0,
"react/require-default-props":0,
"react/no-unused-prop-types":0,
"class-methods-use-this":0,
"react/no-array-index-key":0,
"prefer-template":0,
"jsx-a11y/no-static-element-interactions":0,
"no-underscore-dangle": 0,
"react/jsx-uses-react": 2,
"react/forbid-prop-types":0,
"jsx-a11y/click-events-have-key-events":0,
"react/jsx-uses-vars": 2,
"prefer-destructuring": 0,
"react/no-unused-state": 0,
"react/jsx-closing-tag-location": 0,
"react/no-multi-comp": 0,
"react/jsx-curly-brace-presence": 0,
"import/default": 0,
"import/no-duplicates": 0,
"import/named": 0,
"no-proto": 0,
"no-prototype-builtins": 0,
"import/namespace": 0,
"import/no-unresolved": 0,
"import/no-named-as-default": 2,
"comma-dangle": 0, // not sure why airbnb turned this on. gross!
"indent": [2, 2, {"SwitchCase": 1}],
"no-console": 0,
"no-alert": 0,
"id-length": 0,
"no-trailing-spaces": 0,
"no-nested-ternary": 0,
"camelcase": [0],
"semi": 2,
"eqeqeq": "off",
"curly": "error",
"no-cond-assign": 2,
"linebreak-style": 0,
"arrow-body-style": 0,
"arrow-parens": ["error", "always"],
"max-len": 0,
"global-require": 0,
"no-return-assign": 0,
"no-extra-boolean-cast": 0,
"no-multi-spaces": 0,
"no-restricted-syntax": 0,
"no-param-reassign": 0,
"prefer-rest-params": 0,
"react/jsx-no-bind": 0,
"object-property-newline": 0,
"import/no-webpack-loader-syntax":0,
"react/jsx-closing-bracket-location":0,
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
"no-confusing-arrow": 0, // ["error", {"allowParens": false}],
"prefer-arrow-callback": 2, // 箭头回调函数优先
"no-var": "error" // 禁用var变量
// "quotes": ["error", "double"]
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
}
}
}