-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
eslint.config.js
47 lines (46 loc) · 1.5 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
import eslintPluginJs from '@eslint/js';
import eslintConfigPrettier from 'eslint-config-prettier';
import eslintPluginImport from 'eslint-plugin-import';
import eslintPluginSimpleImportSort from 'eslint-plugin-simple-import-sort';
import eslintPluginUnicorn from 'eslint-plugin-unicorn';
import globals from 'globals';
import tseslint from 'typescript-eslint';
export default tseslint.config(
{ ignores: ['coverage/', 'lib/', '**/.yarn/**', '**/.pnp.*'] },
eslintPluginJs.configs.recommended,
...tseslint.configs.recommended,
eslintConfigPrettier,
{
languageOptions: {
globals: { ...globals.builtin, ...globals.node },
},
plugins: {
'simple-import-sort': eslintPluginSimpleImportSort,
import: eslintPluginImport,
unicorn: eslintPluginUnicorn,
},
rules: {
'no-constant-condition': ['error', { checkLoops: false }],
'import/extensions': ['error', 'always'],
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'unicorn/prefer-at': 'error',
},
},
{
files: ['**/*.ts'],
languageOptions: {
parserOptions: { project: ['tsconfig.json'] },
},
rules: {
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/consistent-type-imports': [
'error',
{ fixStyle: 'inline-type-imports' },
],
'@typescript-eslint/no-deprecated': 'error',
},
},
);