-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
52 lines (52 loc) · 1.41 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
module.exports = {
root: true,
env: {
browser: true,
node: true,
jest: true,
},
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module',
ecmaVersion: 9,
ecmaFeatures: {
impliedStrict: true,
jsx: true,
},
},
settings: {
'import/resolver': {
node: {
extensions: ['.ts', '.tsx', '.js', '.mjs'],
},
},
},
plugins: ['react'],
extends: ['airbnb', 'prettier'],
rules: {
'no-console': 0,
'global-require': 0,
'no-param-reassign': [2, { props: false }],
'no-underscore-dangle': [2, { allowAfterThis: true }],
'no-nested-ternary': 0,
'import/no-extraneous-dependencies': 0, // allow import devDependencies
'import/prefer-default-export': 0,
'jsx-a11y/label-has-for': [2, { required: { every: ['name'] } }],
'react/sort-comp': 0,
'react/jsx-filename-extension': 0, // enforce all .js extension
'react/prefer-stateless-function': 0,
'react/require-default-props': 0, // allow undefined as prop value
'react/jsx-one-expression-per-line': 0, // prettier takes care of it
'react/jsx-wrap-multilines': 0, // prettier takes care of it
'react/destructuring-assignment': 0, // cannot init state with props
'react/forbid-prop-types': 0, // allow object, array PropTypes
'react/button-has-type': [
2,
{
button: true,
submit: true,
reset: true,
},
],
},
};