forked from Synthetixio/synthetix-v3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
76 lines (75 loc) · 1.84 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,
extends: ['eslint:recommended'],
env: {
es2020: true,
node: true,
es6: true,
},
globals: {
hre: 'writable',
Proxy: 'readonly',
Promise: 'readonly',
},
plugins: ['progress', 'no-only-tests'],
parserOptions: {
ecmaVersion: 12,
},
ignorePatterns: ['/*.js'],
rules: {
'progress/enable': process.env.ESLINT_PROGRESS === 'true' ? 1 : 0,
indent: 'off', // prettier
'no-only-tests/no-only-tests': 'error',
'linebreak-style': 'off', // prettier
quotes: 'off', // prettier
semi: 'off', // prettier
'no-inner-declarations': 'off',
'max-len': 'off', // prettier
},
overrides: [
{
files: ['**/*.ts'],
extends: ['plugin:@typescript-eslint/recommended'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: ['./tsconfig.eslint.json'],
},
rules: {
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/no-empty-function': 0,
},
},
{
files: [
'./utils/*/test/**/*.{j,t}s',
'./markets/*/test/**/*.{j,t}s',
'./protocol/*/test/**/*.{j,t}s',
],
env: {
mocha: true,
},
},
{
files: [
'protocol/synthetix/subgraph/**/*',
'markets/spot-market/subgraph/**/*',
'markets/perps-market/subgraph/**/*',
],
env: {},
globals: {
i32: true,
i64: true,
assert: true,
},
rules: {
'prefer-const': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/no-array-constructor': 'off',
},
},
],
};