forked from ChainSafe/js-libp2p-gossipsub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
60 lines (60 loc) · 1.73 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
53
54
55
56
57
58
59
60
// from https://dev.to/itmayziii/typescript-eslint-and-standardjs-5hmd
module.exports = {
env: {
browser: true,
es6: true,
node: true,
mocha: true
},
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json' // Required to have rules that rely on Types.
},
extends: [
'plugin:@typescript-eslint/recommended', // Out of the box Typescript rules
'standard' // Out of the box StandardJS rules
],
plugins: [
'@typescript-eslint', // Let's us override rules below.
'prettier'
],
rules: {
'prettier/prettier': 'error',
'@typescript-eslint/member-delimiter-style': [
'error',
{
// Prevents us from using any delimiter for interface properties.
multiline: {
delimiter: 'none',
requireLast: false
},
singleline: {
delimiter: 'comma',
requireLast: false
}
}
],
'@typescript-eslint/indent': 'off', // This is the job of StandardJS, they are competing rules so we turn off the Typescript one.
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-extra-semi': 'off',
'@typescript-eslint/member-delimiter-style': 'off',
'node/no-unsupported-features/es-syntax': 'off', // Allows us to use Import and Export keywords.
"@typescript-eslint/strict-boolean-expressions": [
"error",
{
allowNullableBoolean: true,
allowNullableString: true,
allowAny: true,
},
],
'no-mixed-operators': 'off',
'space-before-function-paren': 'off',
'comma-dangle': 'off',
// Allow to place comments before the else {} block
'brace-style': 'off',
indent: 'off'
},
globals: {
'BigInt':true
}
}