-
Notifications
You must be signed in to change notification settings - Fork 1
/
eslint.config.ts
42 lines (41 loc) · 1.35 KB
/
eslint.config.ts
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
import eslintJs from '@eslint/js';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
import eslintSimpleImportSort from 'eslint-plugin-simple-import-sort';
import eslintPluginUnusedImports from 'eslint-plugin-unused-imports';
import eslintTs from 'typescript-eslint';
export default eslintTs.config(
eslintJs.configs.recommended,
...eslintTs.configs.recommended,
eslintPluginPrettierRecommended,
{
ignores: ['node_modules/', 'dist/', 'lib/'],
},
{
plugins: {
'simple-import-sort': eslintSimpleImportSort,
'unused-imports': eslintPluginUnusedImports,
},
rules: {
'linebreak-style': ['error', 'unix'],
quotes: ['error', 'single', { avoidEscape: true }],
semi: ['error', 'always'],
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'prettier/prettier': ['error', { singleQuote: true }],
'unused-imports/no-unused-imports': 'error',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
args: 'all',
argsIgnorePattern: '^_',
caughtErrors: 'all',
caughtErrorsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
varsIgnorePattern: '^_',
ignoreRestSiblings: true,
},
],
},
},
);