forked from solendprotocol/liquidator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
76 lines (76 loc) · 1.95 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
73
74
75
76
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: [
'eslint:recommended',
'airbnb-typescript',
'plugin:@typescript-eslint/eslint-recommended',
],
env: {
node: true,
jest: true,
es6: true,
},
parserOptions: {
project: ['./tsconfig.eslint.json', './tsconfig.json'],
ecmaVersion: 2015,
sourceType: 'module',
tsconfigRootDir: __dirname,
},
rules: {
'no-shadow': 'off',
'jest/no-focused-tests': 0,
'class-methods-use-this': 0,
'no-use-before-define': 0,
'no-await-in-loop': 0,
'no-underscore-dangle': 0,
'no-trailing-spaces': ['error', { ignoreComments: true }],
'import/prefer-default-export': 0,
'global-require': 'warn',
'no-restricted-imports': [
'error',
{
patterns: ['..*'],
},
],
'@typescript-eslint/no-var-requires': 'warn',
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/explicit-module-boundary-types': 0,
'@typescript-eslint/no-use-before-define': 0,
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'variableLike',
custom: {
regex: '^([Aa]ny|[Nn]umber|[Ss]tring|[Bb]oolean|[Uu]ndefined)$',
match: false,
},
format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
leadingUnderscore: 'allow',
trailingUnderscore: 'allow',
},
{
selector: 'typeLike',
custom: {
regex: '^([Aa]ny|[Nn]umber|[Ss]tring|[Bb]oolean|[Uu]ndefined)$',
match: false,
},
format: ['PascalCase'],
},
],
'max-len': 'off',
'no-console': 'off',
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.d.ts', '.ts', '.tsx'],
moduleDirectory: ['node_modules', 'src'],
paths: 'src',
},
},
// silence dumb react warning
react: { version: '999.999.999' },
},
};