-
Notifications
You must be signed in to change notification settings - Fork 2
/
eslint.config.mjs
58 lines (57 loc) · 1.48 KB
/
eslint.config.mjs
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
import prettier from 'eslint-config-prettier';
import chaiFriendly from 'eslint-plugin-chai-friendly';
import tseslint from 'typescript-eslint';
export default [
...tseslint.configs.recommended,
prettier,
chaiFriendly.configs.recommendedFlat,
{
files: ['**/*.ts'],
rules: {
'max-len': ['error', 150, 2],
camelcase: [
'error',
{
ignoreImports: true
}
],
indent: [
'error',
2,
{
SwitchCase: 1
}
],
semi: ['error', 'always'],
quotes: ['error', 'single', { avoidEscape: true }],
'no-console': 'error',
'require-await': 'error',
'no-return-await': 'error',
'object-shorthand-properties-first': 'off',
'chai-friendly/no-unused-expressions': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
caughtErrors: 'all',
caughtErrorsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
varsIgnorePattern: '^_',
ignoreRestSiblings: true
}
]
},
languageOptions: {
globals: {
assert: true,
expect: true,
artifacts: true,
contract: true
}
}
}
];