forked from leather-io/extension
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
56 lines (56 loc) · 1.46 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
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
},
env: {
browser: true,
node: true,
es6: true,
},
globals: {
page: true,
browser: true,
context: true,
},
plugins: ['react-hooks', '@typescript-eslint', 'deprecation'],
rules: {
// This rule helps highlight areas of the code that use deprecated
// methods, such as implicit use of signed transactions
'deprecation/deprecation': 'warn',
'no-console': ['error'],
'prefer-const': [
'error',
{
ignoreReadBeforeAssign: false,
},
],
'@typescript-eslint/no-floating-promises': [1],
'@typescript-eslint/no-unnecessary-type-assertion': [0],
'@typescript-eslint/no-unsafe-assignment': [0],
'@typescript-eslint/no-unsafe-return': [0],
'@typescript-eslint/no-unsafe-call': [0],
'@typescript-eslint/no-unsafe-member-access': [0],
'@typescript-eslint/ban-types': [0],
'@typescript-eslint/restrict-template-expressions': [0],
'@typescript-eslint/explicit-module-boundary-types': [0],
'no-warning-comments': [0],
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': [
'warn',
{
additionalHooks: 'useRecoilCallback',
},
],
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
},
overrides: [
{
files: 'src/**/*.spec.ts',
rules: {
'no-console': [0],
},
},
],
};