-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
81 lines (81 loc) · 2.37 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
77
78
79
80
81
module.exports = {
env: {
es6: true,
node: true,
mocha: true,
},
extends: [
'airbnb-base',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:import/typescript',
'plugin:prettier/recommended',
'prettier/@typescript-eslint',
],
globals: {
artifacts: 'readonly',
contract: 'readonly',
assert: 'readonly',
web3: 'readonly',
},
parser: '@typescript-eslint/parser',
parserOptions: {
warnOnUnsupportedTypeScriptVersion: false,
project: ['./tsconfig.json', './tsconfig.eslint.json'],
},
plugins: ['@typescript-eslint', 'import', 'prettier'],
rules: {
'@typescript-eslint/no-unsafe-assignment': ['off'],
'@typescript-eslint/no-unsafe-member-access': ['off'],
'@typescript-eslint/no-unsafe-call': ['off'],
'@typescript-eslint/no-unsafe-return': ['off'],
'@typescript-eslint/restrict-template-expressions': ['off'],
'@typescript-eslint/indent': ['error', 2],
indent: 'off', // required as 'off' by @typescript-eslint/indent
'no-console': 'off',
'no-restricted-syntax': 'off',
'max-len': ['error', {code: 150}],
'comma-dangle': ['error', 'always-multiline'],
'no-mixed-operators': 'off',
'object-curly-newline': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/await-thenable': 'off', // not accurate for many web3 types
'no-await-in-loop': 'off',
'implicit-arrow-linebreak': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'no-loop-func': 'off',
'no-underscore-dangle': 'off',
'no-unused-expressions': 'off',
'no-empty-character-class': 'off', // causing linter to crash
'no-regex-spaces': 'off', // causing linter to crash
'prettier/prettier': ['error', {endOfLine: 'auto'}],
'import/extensions': [
'error',
'ignorePackages',
{
js: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
},
],
},
settings: {
'import/resolver': {
typescript: {
directory: './tsconfig.json',
},
},
},
overrides: [
{
files: ['subgraph/**/*.ts'],
rules: {
'prefer-const': 'off',
'@typescript-eslint/no-unnecessary-type-assertion': 'off',
'no-param-reassign': 'off',
},
},
],
};