forked from Zondax/ledger-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
38 lines (38 loc) · 1.01 KB
/
eslint.config.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
module.exports = {
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
window: 'readonly',
document: 'readonly',
process: 'readonly',
require: 'readonly',
},
parserOptions: {
project: 'tsconfig.json',
},
},
ignores: ['dist/*', 'node_modules/*'],
plugins: {
'unused-imports': require('eslint-plugin-unused-imports'),
'@typescript-eslint': require('@typescript-eslint/eslint-plugin'),
'eslint-plugin-tsdoc': require('eslint-plugin-tsdoc'),
promise: require('eslint-plugin-promise'),
},
rules: {
curly: 'warn',
'prefer-const': 'warn',
'no-else-return': 'warn',
complexity: ['warn', 1000],
'no-unneeded-ternary': 'warn',
'no-alert': 'warn',
'no-empty': 'warn',
'no-useless-catch': 'error',
'require-await': 'warn',
'no-continue': 'warn',
'promise/prefer-await-to-then': 'warn',
'no-console': 'warn',
'unused-imports/no-unused-imports': 'warn',
'no-magic-numbers': 'off',
},
}