-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslintrc-example
100 lines (100 loc) · 4.14 KB
/
eslintrc-example
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
{
"parser": "babel-eslint",
"extends": [
"eslint:recommended",
"standard",
"standard-react",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:jsx-a11y/recommended"
],
"plugins": [
"babel",
"react",
"import",
"jsx-a11y"
],
"env": {
"browser": true,
"mocha": true,
"node": true,
"es6": true,
"jest": true //Need to add the env, if not will show expect is undefined.
},
"globals": {
"__DEV__" : false,
"__TEST__" : false,
"__PROD__" : false,
"__COVERAGE__" : false
},
"parserOptions": {
"ecmaVersion": 6,
"ecmaFeatures": {
"jsx": true
}
},
"rules": {
"arrow-parens" : 2,
"comma-dangle" : ["error", "never"],
"dot-notation" : 2,
"id-length" : 1,
"import/extensions" : 1,
"import/first" : 2,
"import/no-mutable-exports" : 2,
"import/no-unresolved" : 0,
"import/order" : 2,
"import/prefer-default-export" : 2,
"indent" : [2, 4, { "SwitchCase": 1 }],
"jsx-quotes" : [2, "prefer-double"],
"key-spacing" : 1,
"keyword-spacing" : 2,
"max-len" : [2, 250, { "ignoreStrings": true }],
"no-case-declarations" : 2,
"no-duplicate-imports" : 2,
"no-iterator" : 2,
"no-multiple-empty-lines" : ["warn", { "max": 1, "maxEOF": 1 }],
"no-nested-ternary" : 2,
"no-param-reassign" : 2,
"no-underscore-dangle" : 2,
"no-unneeded-ternary" : 2,
"no-var" : 2,
"object-curly-spacing" : [2, "always"],
"object-shorthand" : 2,
"prefer-arrow-callback" : 2,
"prefer-const" : 2,
"prefer-rest-params" : 2,
"prefer-spread" : 2,
"prefer-template" : 2,
"quotes" : ["warn", "single"],
"radix" : 2,
"react/display-name" : 0,
"react/forbid-prop-types" : 1,
"react/jsx-closing-bracket-location" : 2,
"react/jsx-curly-spacing" : 1,
"react/jsx-indent" : [2, 4],
"react/jsx-indent-props" : [2, 4],
"react/jsx-key" : 2,
"react/jsx-max-props-per-line" : 0,
"react/jsx-no-bind" : 2,
"react/jsx-no-duplicate-props" : 1,
"react/jsx-no-literals" : 0,
"react/jsx-no-undef" : 1,
"react/jsx-sort-props" : 1,
"react/jsx-uses-react" : 1,
"react/jsx-uses-vars" : 1,
"react/no-did-mount-set-state" : 1,
"react/no-did-update-set-state" : 1,
"react/no-direct-mutation-state" : 1,
"react/no-multi-comp" : [2, { "ignoreStateless": true }],
"react/no-set-state" : 1,
"react/no-unknown-property" : 1,
"react/prefer-es6-class" : 2,
"react/prefer-stateless-function" : 2,
"react/react-in-jsx-scope" : 1,
"react/sort-prop-types" : [2, { "callbacksLast": true, "requiredFirst": true }],
"react/self-closing-comp" : 1,
"react/sort-comp" : 1,
"semi" : [2, "always"],
"space-before-function-paren" : 2
}
}