-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.js
61 lines (61 loc) · 1.93 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
module.exports = {
//"extends": "eslint-config-airbnb",
"env": {
"es6": true,
},
"parser": "babel-eslint",
"plugins": [
"import",
"react"
],
"rules": {
"array-bracket-spacing": [ "warn", "always", {
"objectsInArrays": false
} ],
"arrow-body-style": [ "warn", "as-needed" ],
"arrow-parens": [ "warn", "always" ],
"comma-dangle": [ "warn", "never" ],
"func-names": "off",
"function-paren-newline": "off",
"import/named": "warn",
//"import/no-named-as-default": "off", // kinda slow
//"import/no-named-as-default-member": "off", // kinda slow
"indent": [ "warn", 4, {
"SwitchCase": 1
} ],
/* https://github.com/facebookincubator/create-react-app/issues/2631 */
"jsx-a11y/href-no-hash": "off",
"no-console": [ "error", {
"allow": [ "info", "warn", "error" ]
} ],
"no-extra-semi": "warn",
"import/no-extraneous-dependencies": [ "warn", {
"devDependencies": true
} ],
"no-plusplus": [ "warn", {
"allowForLoopAfterthoughts": true
} ],
"no-trailing-spaces": "warn",
"no-undef": "warn",
"no-underscore-dangle": [ "warn", {
"allow": [ "_id" ] // mongoDB :|
} ],
"no-unused-vars": [ "warn", {
"ignoreRestSiblings": true
} ],
"prefer-arrow-callback": "off",
"prefer-destructuring": [ "warn" ],
"quotes": "off",
/* "quotes": [ "error", "backtick", {
"avoidEscape": true
} ], */
"react/jsx-filename-extension": "off",
"react/jsx-indent": [ "warn", 4 ],
"react/jsx-indent-props": [ "warn", 4 ],
"space-before-function-paren": [ "warn", {
"anonymous": "never",
"asyncArrow": "always",
"named": "never"
} ]
}
};