forked from consensys-vertical-apps/mmi-defi-adapters
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
53 lines (50 loc) · 1.31 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
/** @type {import('eslint').Linter.Config} */
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'import', 'prettier','unused-imports'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:import/recommended',
'prettier',
],
env: {
node: true,
jest: true,
},
rules: {
'prettier/prettier': 'error',
'arrow-body-style': 'off', // Disabled as per eslint-plugin-prettier recommendation
'prefer-arrow-callback': 'off', // Disabled as per eslint-plugin-prettier recommendation
// Disable the original rule
'@typescript-eslint/no-unused-vars': 'off',
// Add the auto-fixable rules from 'eslint-plugin-unused-imports'
'unused-imports/no-unused-imports-ts': 'error',
'unused-imports/no-unused-vars-ts': [
'error',
{
vars: 'all',
varsIgnorePattern: '^_',
args: 'after-used',
argsIgnorePattern: '^_'
}
],
'import/order': [
'error',
{
alphabetize: { order: 'asc', caseInsensitive: true },
'newlines-between': 'never',
},
],
},
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts'],
},
'import/resolver': {
typescript: true,
node: true,
},
},
}