-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
47 lines (45 loc) · 1.22 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
const path = require('path');
const isDev = process.env.NODE_ENV === 'development';
module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
env: {
es6: true,
commonjs: true,
browser: true,
},
extends: ['airbnb', 'plugin:prettier/recommended', 'prettier/react'],
settings: {
react: {
pragma: 'React',
version: 'detect',
},
'import/resolver': {
webpack: {
config: path.join(__dirname, '/build', 'webpack.base.conf.js'),
},
},
},
plugins: ['react', 'react-hooks', 'babel', 'promise', 'import'],
rules: {
camelcase: [0, { ignoreDestructuring: true }],
'no-debugger': isDev ? 0 : 2,
'no-console': isDev ? [1, { allow: ['warn', 'error'] }] : [2, { allow: ['warn', 'error'] }],
'class-methods-use-this': 0,
'react/forbid-prop-types': 0,
'react/no-multi-comp': 0,
'import/no-extraneous-dependencies': 0,
'jsx-a11y/click-events-have-key-events': 0,
'jsx-a11y/anchor-is-valid': 0,
'jsx-a11y/no-static-element-interactions': 0,
'jsx-a11y/no-noninteractive-element-interactions': 0,
'react/require-default-props': 0,
},
globals: {},
};