-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
67 lines (67 loc) · 1.52 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
64
65
66
67
module.exports = {
extends: [
'eslint:recommended',
'plugin:prettier/recommended',
'plugin:react/recommended',
],
parser: 'babel-eslint',
plugins: ['react-hooks', 'typescript', 'prettier', 'import'],
parserOptions: {
ecmaVersion: 8,
sourceType: 'module',
ecmaFeatures: {
impliedStrict: true,
jsx: true,
},
},
settings: {
'extensions': ['.js', '.jsx', '.ts', '.tsx'],
'import/resolver': {
'babel-module': {},
'node': {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
env: {
browser: true,
node: true,
es6: true,
},
globals: {
ISPRODUCTION: false,
},
rules: {
'import/order': [
'error',
{
'groups': [
'builtin',
'external',
'internal',
'parent',
'sibling',
'index',
],
'newlines-between': 'always',
},
],
'import/no-useless-path-segments': ['off', { noUselessIndex: false }],
'import/no-extraneous-dependencies': ['error', { peerDependencies: true }],
'prettier/prettier': 'error',
'no-confusing-arrow': 'off',
'react/jsx-filename-extension': [1, { extensions: ['.jsx', '.tsx'] }],
'react/require-default-props': 'warn',
'react/jsx-one-expression-per-line': 'off',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
},
overrides: [
{
files: ['./babel.config.js', './webpack.config.js'],
env: {
node: true,
},
},
],
};