-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.mjs
48 lines (47 loc) · 1.36 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
//import noRelativeImportPaths from "eslint-plugin-no-relative-import-paths";
import eslintPluginSimpleImportSort from 'eslint-plugin-simple-import-sort';
import tseslint from 'typescript-eslint';
export default tseslint.config(
...tseslint.configs.strict,
...tseslint.configs.stylistic,
...tseslint.configs.recommendedTypeChecked,
{
languageOptions: {
parserOptions: {
projectService: true,
projectService: {
allowDefaultProject: ['*.js', '*.mjs'],
},
tsconfigRootDir: import.meta.dirname,
},
},
plugins: {
'simple-import-sort': eslintPluginSimpleImportSort,
//"no-relative-import-paths": noRelativeImportPaths,
},
rules: {
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-unused-vars': [
'warn', // or "error"
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'@typescript-eslint/no-floating-promises': 'error',
// "no-relative-import-paths/no-relative-import-paths": [
// "warn",
// {
// allowSameFolder: false,
// prefix: "@",
// },
// ],
},
},
{
ignores: ['node_modules/**', 'dist/**'],
},
);