forked from faceyspacey/babel-plugin-dual-import
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
140 lines (140 loc) · 3.15 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
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
131
132
133
134
135
136
137
138
139
140
module.exports = {
parser: 'babel-eslint',
parserOptions: {
ecmaFeatures: {
generators: true,
experimentalObjectRestSpread: true
},
sourceType: 'module',
allowImportExportEverywhere: false
},
plugins: ['flowtype'],
extends: ['airbnb', 'plugin:flowtype/recommended'],
settings: {
flowtype: {
onlyFilesWithFlowAnnotation: true
},
'import/resolver': {
node: {
extensions: ['.js', '.json', '.css', '.styl']
}
}
},
globals: {
window: true,
document: true,
__dirname: true,
__DEV__: true,
CONFIG: true,
process: true,
jest: true,
describe: true,
test: true,
it: true,
expect: true,
beforeEach: true,
fetch: true,
alert: true
},
rules: {
'import/extensions': [
'error',
'always',
{
js: 'never',
jsx: 'never',
styl: 'never',
css: 'never'
}
],
'no-shadow': 0,
'no-use-before-define': 0,
'no-param-reassign': 0,
'react/prop-types': 0,
'react/no-render-return-value': 0,
'no-confusing-arrow': 0,
'no-underscore-dangle': 0,
'no-plusplus': 0,
camelcase: 1,
'prefer-template': 1,
'react/no-array-index-key': 1,
'global-require': 1,
'react/jsx-indent': 1,
'dot-notation': 1,
'import/no-named-default': 1,
'no-unused-vars': 1,
'flowtype/no-weak-types': 1,
'consistent-return': 1,
'import/prefer-default-export': 1,
'no-console': 1,
'jsx-a11y/no-static-element-interactions': 1,
'no-case-declarations': 1,
'no-template-curly-in-string': 1,
'no-return-assign': 1,
'no-multi-assign': 1,
semi: [2, 'never'],
'flowtype/semi': [2, 'never'],
'jsx-quotes': [2, 'prefer-single'],
'react/jsx-filename-extension': [2, { extensions: ['.jsx', '.js'] }],
'spaced-comment': [2, 'always', { markers: ['?'] }],
'arrow-parens': [2, 'as-needed', { requireForBlockBody: false }],
'brace-style': [2, 'stroustrup'],
'import/no-unresolved': [2, { commonjs: true, caseSensitive: true }],
'no-unused-expressions': [
1,
{
allowShortCircuit: true,
allowTernary: true,
allowTaggedTemplates: true
}
],
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: true,
optionalDependencies: true,
peerDependencies: true
}
],
'comma-dangle': [
2,
{
arrays: 'never',
objects: 'never',
imports: 'never',
exports: 'never',
functions: 'never'
}
],
'max-len': [
'error',
{
code: 80,
tabWidth: 2,
ignoreUrls: true,
ignoreComments: true,
ignoreRegExpLiterals: true,
ignoreStrings: true,
ignoreTemplateLiterals: true
}
],
'react/sort-comp': [
2,
{
order: [
'propTypes',
'props',
'state',
'defaultProps',
'contextTypes',
'childContextTypes',
'getChildContext',
'static-methods',
'lifecycle',
'everything-else',
'render'
]
}
]
}
}