-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
41 lines (39 loc) · 965 Bytes
/
.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
const path = require('path');
const OFF = 0;
const WARNING = 1;
const ERROR = 2;
module.exports = {
extends: ['react-app', 'airbnb', 'prettier'],
plugins: ['import', 'react-hooks'],
rules: {
'react/prefer-stateless-function': OFF,
'react/jsx-filename-extension': OFF,
'react/jsx-one-expression-per-line': OFF,
'import/no-extraneous-dependencies': OFF,
'react-hooks/rules-of-hooks': ERROR, // Checks rules of Hooks
'react-hooks/exhaustive-deps': ERROR, // Checks effect dependencies
'linebreak-style': ERROR,
},
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018,
sourceType: 'module',
},
env: {
browser: true,
jest: true,
},
settings: {
'import/resolver': {
webpack: {
config: 'config-overrides.js',
},
alias: {
map: [['@', path.resolve(__dirname, 'src')]],
extensions: ['.ts', '.js', '.jsx', '.json'],
},
},
},
};