-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
66 lines (66 loc) · 1.72 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
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'plugin:import/typescript',
],
plugins: ['@typescript-eslint', 'react', 'prettier', 'react-hooks', 'import'],
env: {
browser: true,
node: true,
es6: true,
},
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
rules: {
'import/order': ['warn', { 'newlines-between': 'always' }],
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/triple-slash-reference': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-empty-interface': 'warn',
'react/no-direct-mutation-state': 'off',
'react/no-deprecated': 'off',
'react/no-string-refs': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'react/require-render-return': 'off',
'react/jsx-filename-extension': [
'warn',
{
extensions: ['.jsx', '.tsx'],
},
],
'react/prop-types': 'off',
'react/display-name': 'off',
'react/react-in-jsx-scope': 0,
'@typescript-eslint/no-unused-vars': [
'error',
{ ignoreRestSiblings: true },
],
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'newline-before-return': 'warn',
'prefer-const': 'warn',
'no-console': ['warn', { allow: ['warn', 'error'] }],
'prettier/prettier': 'warn',
'react/no-unknown-property': [
2,
{
ignore: ['jsx'],
},
],
},
settings: {
react: {
version: 'detect',
},
},
};