-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
48 lines (46 loc) · 1.1 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
const fs = require('fs');
const path = require('path');
const prettierOptions = JSON.parse(
fs.readFileSync(path.resolve(__dirname, '.prettierrc'), 'utf8'),
);
module.exports = {
parser: 'babel-eslint',
extends: [
'airbnb',
'prettier',
'prettier/react',
'plugin:flowtype/recommended',
],
plugins: ['prettier', 'react', 'react-hooks', 'jsx-a11y', 'flowtype'],
env: {
browser: true,
es6: true,
jest: true,
node: true,
},
parserOptions: {
ecmaVersion: 6,
ecmaFeatures: {
jsx: true,
experimentalObjectRestSpread: true,
},
sourceType: 'module',
},
rules: {
'flowtype/generic-spacing': 0,
'import/extensions': ['error', 'always', { ignorePackages: true }],
'import/no-extraneous-dependencies': 0,
'import/prefer-default-export': 0,
'prettier/prettier': ['error', prettierOptions],
'react/jsx-filename-extension': 0,
'react/require-default-props': 0,
'jsx-a11y/click-events-have-key-events': 0,
},
settings: {
'import/resolver': {
webpack: {
config: './webpack/config.prod.js',
},
},
},
};