-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
62 lines (55 loc) · 1.52 KB
/
eslint.config.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
54
55
56
57
58
59
60
61
62
import pluginJs from '@eslint/js';
import importPlugin from 'eslint-plugin-import';
import prettierRecommended from 'eslint-plugin-prettier/recommended';
import tseslint from 'typescript-eslint';
export default [
// global ignores
{ ignores: ['dist/*', 'node_modules/*'] },
// standard js rules
pluginJs.configs.recommended,
// override js rules
{
rules: {
semi: [2, 'always'],
'comma-dangle': ['error', 'always-multiline'],
'object-curly-spacing': ['error', 'always'],
quotes: ['error', 'single'],
'no-multiple-empty-lines': ['error', { max: 1, maxEOF: 1 }],
},
},
// standard typescript rules
...tseslint.configs.recommended,
// override typescript rules
{
rules: {
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-unused-vars': [
'error',
{
varsIgnorePattern: '^_',
argsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
},
},
// prettier rules
prettierRecommended,
// import rules
{
...importPlugin.flatConfigs.recommended,
rules: {
'import/no-extraneous-dependencies': 'error',
'import/order': [
'error',
{
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
'newlines-between': 'always',
alphabetize: { order: 'asc', caseInsensitive: true },
},
],
'import/no-duplicates': 'error',
},
},
];