-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
63 lines (61 loc) · 1.61 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
const path = require('path')
const baseRules = require('eslint-config-airbnb-base/rules/style')
const [_, ...restricted] = baseRules.rules['no-restricted-syntax']
const PATHS = require('./config/paths')
module.exports = {
extends: 'airbnb',
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module',
jsx: true
},
env: {
node: true,
browser: true
},
plugins: ['babel', 'import', 'jsx-a11y', 'compat'],
rules: {
'arrow-parens': ['error', 'as-needed'],
'react/forbid-prop-types': [1, { forbid: ['any'] }],
'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
'react/prefer-stateless-function': [2, { ignorePureComponents: true }],
'react/no-multi-comp': 0,
'react/prop-types': [
1,
{
ignore: [
// `dispatch` is typically used by Redux `@connect`
'dispatch',
// `data` is injected by Apollo
'data'
]
}
],
'linebreak-style': 0,
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],
'no-restricted-syntax': [
2,
...restricted.filter(r => !['ForOfStatement'].includes(r.selector))
],
'global-require': 0,
'import/no-unresolved': [2, { commonjs: true }],
'compat/compat': 2,
semi: [1, 'never'],
'comma-dangle': [2, 'never'],
'jsx-a11y/no-static-element-interactions': 0,
'jsx-a11y/label-has-for': 0,
'jsx-a11y/href-no-hash': 'off',
'no-console': 0
},
settings: {
'import/resolver': {
node: {
paths: [PATHS.root, 'node_modules']
}
}
},
globals: {
SERVER: false
}
}