forked from cowprotocol/cow-sdk
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.js
More file actions
62 lines (61 loc) · 1.63 KB
/
eslint.config.js
File metadata and controls
62 lines (61 loc) · 1.63 KB
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
import eslint from '@eslint/js'
import * as tseslint from 'typescript-eslint'
import unusedImports from 'eslint-plugin-unused-imports'
export default [
{
ignores: ['**/generated/*', '**/jest.config.ts', '**/generated/**/*'],
},
eslint.configs.recommended,
...tseslint.configs.recommended,
{
files: ['**/*.ts'],
plugins: {
'unused-imports': unusedImports,
},
languageOptions: {
parser: tseslint.parser,
parserOptions: {
project: ['./packages/*/tsconfig.json', './packages/providers/*/tsconfig.json'],
},
},
rules: {
'@typescript-eslint/no-non-null-assertion': 'error',
'@typescript-eslint/no-explicit-any': 'off',
'no-prototype-builtins': 'off',
'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars': [
'warn',
{
vars: 'all',
varsIgnorePattern: '^_',
args: 'after-used',
argsIgnorePattern: '^_',
},
],
'@typescript-eslint/no-unused-vars': [
'error',
{
args: 'all',
argsIgnorePattern: '^_',
caughtErrors: 'all',
caughtErrorsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
varsIgnorePattern: '^_',
ignoreRestSiblings: true,
},
],
'@typescript-eslint/no-unused-expressions': [
'error',
{
allowShortCircuit: true,
allowTernary: true,
allowTaggedTemplates: true,
},
],
'eol-last': ['error', 'always'],
},
},
{
files: ['**/*.test.ts', '**/*.spec.ts', '**/__mock__/**/*.ts'],
},
]