-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
69 lines (67 loc) · 2.2 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
59
60
61
62
63
64
65
66
67
68
69
// @ts-check
import eslint from '@eslint/js';
import stylisticTs from '@stylistic/eslint-plugin-ts';
import tseslint from 'typescript-eslint';
export default tseslint.config(
eslint.configs.all,
...tseslint.configs.strictTypeChecked,
stylisticTs.configs['all-flat'],
{
plugins: {
'@stylistic/ts': stylisticTs,
},
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
'rules': {
'@stylistic/ts/comma-dangle': ['error', 'always-multiline'],
'@stylistic/ts/indent': ['error', 2],
'@stylistic/ts/lines-between-class-members': 'off',
'@stylistic/ts/no-extra-parens': 'off',
'@stylistic/ts/object-property-newline': 'off',
'@stylistic/ts/quote-props': 'off',
'@stylistic/ts/quotes': ['error', 'single'],
'@stylistic/ts/space-before-function-paren': 'off',
'@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/explicit-member-accessibility': 'error',
'@typescript-eslint/no-extraneous-class': 'off',
'@typescript-eslint/no-unnecessary-condition': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
'args': 'all',
'argsIgnorePattern': '^_',
},
],
'@typescript-eslint/restrict-template-expressions': ['error', {allowNumber: true}],
'capitalized-comments': 'off',
'class-methods-use-this': 'off',
'dot-notation': 'off',
'func-style': 'off',
'id-length': 'off',
'init-declarations': 'off',
'max-classes-per-file': 'off',
'max-lines': 'off',
'max-lines-per-function': 'off',
'max-params': 'off',
'max-statements': 'off',
'no-bitwise': 'off',
'no-continue': 'off',
'no-empty-function': ['error', {'allow': ['constructors']}],
'no-inline-comments': 'off',
'no-magic-numbers': 'off',
'no-plusplus': 'off',
'no-ternary': 'off',
'no-undefined': 'off',
'no-use-before-define': 'off',
'no-useless-constructor': 'off',
'no-warning-comments': 'off',
'one-var': ['error', 'never'],
'prefer-destructuring': 'off',
'sort-keys': 'off',
},
},
);