-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc.js
42 lines (42 loc) · 1.15 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
module.exports = {
extends: ['eslint:recommended', 'react-app', 'prettier'],
rules: {
'arrow-body-style': ['warn', 'as-needed'],
'consistent-return': 'warn',
'import/newline-after-import': 'error',
'import/order': ['error', { groups: [['builtin', 'external', 'internal']] }],
'import/prefer-default-export': 0,
'no-console': ['warn', { allow: ['warn', 'error'] }],
'no-duplicate-imports': 'warn',
'no-var': 'warn',
'object-shorthand': 'warn',
'prefer-arrow-callback': 'warn',
'prefer-const': 'warn',
'prefer-spread': 'warn',
'react-hooks/rules-of-hooks': 'error',
'react/default-props-match-prop-types': 'warn',
'react/no-unused-prop-types': 'warn',
'react/prefer-stateless-function': 'warn',
'react/prop-types': 0,
'react/require-default-props': 0,
},
plugins: ['prettier', 'react-hooks', '@typescript-eslint'],
env: {
browser: true,
jest: true,
node: true,
},
settings: {
react: {
version: 'detect',
},
},
overrides: [
{
files: ['*.js', '*.jsx'],
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
},
},
],
};