-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy patheslint.config.mjs
57 lines (55 loc) · 1.66 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
// @ts-check
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
{
files: ['src/**/*.ts', 'test/**/*.ts', 'mock/**/*.ts'],
languageOptions: {
'parser': tseslint.parser
},
linterOptions: {
'reportUnusedDisableDirectives': 'error'
},
extends: [
...tseslint.configs.recommended
],
rules: {
'default-param-last': 'off',
'dot-notation': 'error',
'indent': ['error', 2, {
'ignoredNodes': ['TemplateLiteral'],
'SwitchCase': 1
}],
'key-spacing': 'off',
'no-case-declarations': 'error',
'no-console': 'warn',
'no-constant-condition': 'off',
'no-else-return': 'error',
'no-multi-spaces': 'off',
'no-unneeded-ternary': 'off',
'no-unused-vars': ['off', { 'vars': 'all', 'args': 'after-used' }],
'no-use-before-define': 'error',
'no-useless-constructor': 'error',
'no-var': 'warn',
'prefer-promise-reject-errors': 'off',
'quote-props': 'off',
'quotes': ['error', 'single'],
'radix': 'warn',
'semi': ['error', 'always'],
'space-before-function-paren': 'off',
'template-curly-spacing': 'off',
'@typescript-eslint/ban-ts-comment': 'warn',
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-unused-vars': ['error', { 'argsIgnorePattern': '^_' }],
'@typescript-eslint/no-use-before-define': 'error'
},
settings: {
'import/resolver': {
'typescript': {}
}
}
}
);