This repository has been archived by the owner on Oct 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
130 lines (130 loc) · 3.55 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
{
"parser" : "babel-eslint",
"plugins": [
"flowtype",
"fp",
"react-native"
],
"extends" : [
"airbnb",
"plugin:flowtype/recommended"
],
"env": {
"jest": true
},
"rules": {
"arrow-body-style": 0,
"arrow-parens": ["error", "always"],
"camelcase": 0,
"class-methods-use-this": 0,
"comma-spacing": 0,
"comma-dangle": [2, "always-multiline"],
"complexity": [
2,
12
],
"eol-last": 2,
"func-names": 0,
"guard-for-in": 2,
"id-length": 0,
"import/no-extraneous-dependencies": ["error", {"devDependencies": ["**/*.spec.js"]}],
"indent": [
2,
2,
{
"SwitchCase": 1
}
],
"jsx-a11y/label-has-for": 1,
"jsx-a11y/no-static-element-interactions": 0,
"react/jsx-boolean-value": 0,
"key-spacing": 0,
"max-depth": [
2,
3
],
"max-len": [
2,
100,
2,
{
"ignoreComments": true,
"ignorePattern": ^(.*sinon.stub\(.*)|(.*expect\(.*)|(.*spyOn.*)$,
}
],
"max-nested-callbacks": [
2,
3
],
"max-statements": [
2,
20,
],
"max-params": [
2,
5
],
"new-cap": 0,
"newline-per-chained-call": 0,
"no-bitwise": 0,
"no-confusing-arrow": 0,
"no-console": 1,
"no-else-return": 0,
"no-loop-func": 1,
"no-mixed-operators": 0,
"no-multi-spaces": 2,
"no-param-reassign": 0,
"no-sequences": 0,
"no-undef": 0,
"no-undefined": 2,
"no-underscore-dangle": 0,
"no-unused-expressions": 0,
"no-unused-vars": 2,
"no-use-before-define": 0,
"no-useless-escape": 0,
"no-var": 2,
"no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 1} ],
"padded-blocks": 0,
"prefer-const": 2,
"radix": 0,
"react/jsx-closing-bracket-location": 0,
"react/jsx-filename-extension": [1, { "extensions": [".js"] }],
"react/jsx-first-prop-new-line": 0,
"react/react-in-jsx-scope": 0,
"react/require-render-return": 0,
"react/prefer-stateless-function": 0,
"react/sort-comp": 0,
"spaced-comment": 0,
"space-before-function-paren": 0,
"strict": 2,
"vars-on-top": 0,
// Soft some rules.
"global-require": 0, // Used by webpack-isomorphic-tools and React Native.
"import/first": 0, // Este sorts by atom/sort-lines natural order.
"import/no-duplicates": 2,
"import/prefer-default-export": 0, // No. Actions can have just one action.
"jsx-a11y/anchor-has-content": 0, // Doesn't work with new components.
"jsx-a11y/html-has-lang": 0, // Can't recognize the Helmet.
"no-duplicate-imports": 0, // github.com/babel/eslint-plugin-babel/issues/59#issuecomment-230118848
"no-nested-ternary": 0, // It's nice for JSX.
"no-shadow": 0, // Shadowing is a nice language feature. Naming is hard.
"react/forbid-prop-types": 0, // Este is going to use Flow types.
"react/jsx-indent": 0, // Damn. We need Yarn asap.
"react/no-unused-prop-types": 0, // Este is going to use Flow types.
"react/prop-types": 0, // Can't detect flowtype correctly.
// React Native.
"react-native/no-unused-styles": 2,
"react-native/split-platform-components": 2,
// Rules for functional programming. We do not need Object.freeze.
"fp/no-mutating-assign": 2
// TODO: Can't be enabled now, it requires a lot of refactoring.
// "fp/no-mutating-methods": 2,
// "fp/no-mutation": ["error", {
// "commonjs": true,
// "allowThis": true,
// "exceptions": [
// {"property": "propTypes"}
// ]
// }]
}
}