This repository has been archived by the owner on Dec 21, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.eslintrc.js
64 lines (64 loc) · 1.77 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
module.exports = {
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint'
],
extends: [
'streamr-nodejs'
],
parserOptions: {
ecmaVersion: 2020,
ecmaFeatures: {
modules: true
}
},
env: {
browser: true,
es6: true
},
rules: {
'max-len': ['warn', {
code: 150
}],
'no-plusplus': ['error', {
allowForLoopAfterthoughts: true
}],
'no-underscore-dangle': ['error', {
allowAfterThis: true
}],
'padding-line-between-statements': [
'error',
{
blankLine: 'always', prev: 'if', next: 'if'
}
],
'prefer-destructuring': 'warn',
'object-curly-newline': 'off',
'no-continue': 'off',
'max-classes-per-file': 'off', // javascript is not java
// TODO check all errors/warnings and create separate PR
'promise/always-return': 'warn',
'promise/catch-or-return': 'warn',
'require-atomic-updates': 'warn',
'promise/param-names': 'warn',
'no-restricted-syntax': [
'error', 'ForInStatement', 'LabeledStatement', 'WithStatement'
],
'import/extensions': ['error', 'never', { json: 'always' }],
'lines-between-class-members': 'off',
'padded-blocks': 'off',
'no-use-before-define': 'off',
'import/order': 'off',
'no-shadow': 'off',
'@typescript-eslint/no-shadow': 'error',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error'],
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.ts']
}
}
}
}