forked from graphprotocol/graph-tooling
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.cjs
52 lines (52 loc) · 1.8 KB
/
.eslintrc.cjs
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
module.exports = {
extends: ['@theguild'],
rules: {
// not necessary here, we dont build with bob
'import/extensions': 'off',
// pushing to array multiple times is not a big deal
'unicorn/no-array-push-push': 'off',
// TODO: warning for now, clean up
'@typescript-eslint/no-this-alias': 'warn',
// TODO: remove default exports, breaking change?
'import/no-default-export': 'off',
// TODO: remove once we get rid of all anys
'@typescript-eslint/no-explicit-any': 'off',
// TODO: not ready yet
'unicorn/prefer-node-protocol': 'off',
'@typescript-eslint/ban-types': 'off',
// AssemblyScript `===` is a reference equality check, not a value equality check. We are trying to do a value check. Learn more: https://github.com/AssemblyScript/assemblyscript/issues/621#issuecomment-497973428
eqeqeq: 'off',
},
overrides: [
{
files: ['packages/ts/**'],
rules: {
// TODO: want to avoid any structural change so fix it later
'@typescript-eslint/no-namespace': 'off',
// TODO: warning for now, clean up
'unicorn/filename-case': 'warn',
// TODO: warning for now, clean up
'sonarjs/no-inverted-boolean-check': 'warn',
// TODO: warning for now, clean up
'@typescript-eslint/no-loss-of-precision': 'warn',
// AssemblyScript types are different from TS and in cases we want to use what TS may think we should not,
},
},
{
files: ['packages/cli/**'],
rules: {
'no-restricted-imports': [
'error',
{
patterns: [
{
group: ['@whatwg-node/fetch'],
message: 'Please use `fetch` from `./packages/cli/src/fetch.ts`.',
},
],
},
],
},
},
],
};