forked from Uniswap/info
-
Notifications
You must be signed in to change notification settings - Fork 79
/
.eslintrc.js
72 lines (69 loc) · 1.6 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
68
69
70
71
72
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
ecmaFeatures: {
// Allows for the parsing of JSX
jsx: true,
},
},
env: {
browser: true,
},
extends: ['eslint:recommended', 'plugin:react/recommended', 'plugin:prettier/recommended', 'plugin:react-hooks/recommended'],
ignorePatterns: ['node_modules/**/*'],
rules: {
'react/prop-types': 0,
'no-empty': ['error', { allowEmptyCatch: true }],
'no-case-declarations': 0,
'no-unused-vars': 0,
'no-extra-boolean-cast': 0,
'no-inner-declarations': 0,
'no-constant-condition': 0,
},
overrides: [
// typescript
{
files: ['*.ts', '*.tsx'],
excludedFiles: ['*.js'],
plugins: ['@typescript-eslint'],
extends: [
'prettier/@typescript-eslint',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
],
rules: {
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/member-delimiter-style': 0,
'@typescript-eslint/interface-name-prefix': 0,
'@typescript-eslint/no-use-before-define': 0,
'react/prop-types': 0,
},
},
{
files: ['.eslintrc.js'],
env: {
node: true,
},
},
{
files: ['*.js'],
env: {
es6: true,
node: true,
},
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
},
rules: {},
},
],
settings: {
react: {
version: 'detect',
},
},
}