-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
47 lines (47 loc) · 1.52 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
module.exports = {
root: true,
env: {
browser: true,
commonjs: true,
es6: true,
node: true
},
settings: {
'import/ignore': [
'node_modules',
'\\.(json|css|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$',
],
'import/extensions': ['.js'],
'import/resolver': {
webpack: {
config: './config/webpack.dev.js'
}
}
},
parser: "babel-eslint",
parserOptions: {
sourceType: 'module',
ecmaVersion: 6,
ecmaFeatures: {
jsx: true,
generators: true,
experimentalObjectRestSpread: true
}
},
plugins: ["react"],
extends: ["airbnb"],
rules: { // additional rules to work with eslint-config-airbnb
"comma-dangle": [2, "never"], // yuk, disallow comma after the last propery of an object
"new-cap": 0, // disable for HigherOrderComponent wrapping
"no-console": 0, // still good for debuging
"no-underscore-dangle": 0,
"no-param-reassign": 0, // e.target.value = ''; happens all the time
"no-plusplus": 0, // i++ is allowed
"arrow-parens": [2, "as-needed", { "requireForBlockBody": true }], // better looking arrow-funcs
"jsx-a11y/no-static-element-interactions": 0, // div onClick should be allowed
"import/no-extraneous-dependencies": 0, // not necessary at all
"react/jsx-filename-extension": 0, // enfore all .js extension
"react/no-unused-prop-types": [2, { skipShapeProps: true }], // skip shape
"react/forbid-prop-types": 0 // PropTypes.object is allowed
}
};