-
Notifications
You must be signed in to change notification settings - Fork 91
/
.eslintrc
90 lines (90 loc) · 2.52 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
{
"extends": ["airbnb"],
"env": {
"browser": true,
"jest": true,
"node": true
},
"globals": {
__CLIENT__: true,
__DEVELOPMENT__: true,
__PRODUCTION__: true
},
"parser": "babel-eslint",
"rules": {
"class-methods-use-this": "warn",
"global-require": "off",
"indent": ["error", 2, { "SwitchCase": 1 }],
"key-spacing": [
"error",
{
"mode": "minimum",
"beforeColon": false,
"afterColon": true
}
],
"react/react-in-jsx-scope": "off",
"arrow-parens": "off",
"react/jsx-curly-brace-presence": "off",
"react/jsx-wrap-multilines": "off",
"max-len": "off",
"new-cap": ["error", { "capIsNewExceptions": ["Immutable"] }],
"no-confusing-arrow": ["error", { "allowParens": true }],
"no-fallthrough": ["error", { "commentPattern": "break[\\s\\w]*omitted" }],
"no-lonely-if": "warn",
"no-mixed-operators": "warn",
"no-multi-spaces": [
"error",
{
"exceptions": {
"VariableDeclarator": true,
"AssignmentExpression": true,
"ImportDeclaration": true
}
}
],
"no-plusplus": "off",
"no-underscore-dangle": "off",
"no-use-before-define": "warn",
"no-useless-escape": "warn",
"quotes": 0,
// React rules
"react/forbid-prop-types": "off",
"react/jsx-filename-extension": [
"error",
{ "extensions": [".jsx", ".js"] }
],
"react/jsx-first-prop-new-line": "off",
"react/no-unused-prop-types": "off",
"react/self-closing-comp": ["error", { "component": true, "html": false }],
// jsx-a11y
"jsx-a11y/img-has-alt": "warn",
"jsx-a11y/label-has-for": "warn",
"jsx-a11y/no-static-element-interactions": "warn",
// Import rules
"import/default": "error",
"import/named": "error",
"import/namespace": "error",
"import/no-extraneous-dependencies": "warn",
"import/no-named-as-default": "warn",
"import/prefer-default-export": "warn",
"jsx-a11y/href-no-hash": "off",
"jsx-a11y/anchor-is-valid": ["warn", { "aspects": ["invalidHref"] }],
"jsx-a11y/no-noninteractive-element-interactions": "off"
},
"plugins": ["react", "import"],
"settings": {
"import/ignore": ["node_modules", ".(scss|less|css|svg)$"],
"import/parser": "babel-eslint",
"import/resolver": {
"webpack": {
"config": {
"resolve": {
"extensions": ["", ".js", ".jsx", ".json"],
"modulesDirectories": ["node_modules", "src"]
}
}
}
}
}
}