-
-
Notifications
You must be signed in to change notification settings - Fork 99
/
eslint.config.mjs
90 lines (82 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
import { sxzz } from '@sxzz/eslint-config'
export default sxzz(
[
{
ignores: [
'assets/types/type.declare.ts',
'node_modules',
'dist',
'out',
'packages/*/node_modules',
'packages/*/dist',
'packages/*/out',
'packages/*/lib',
'packages/*/build',
'packages/*/coverage',
'packages/*/test',
'packages/*/tests',
'packages/*/esm',
'packages/*/types',
'test/**/*.db.ts',
],
languageOptions: {
parserOptions: {
emitDecoratorMetadata: true,
experimentalDecorators: true,
},
},
rules: {
eqeqeq: 'off',
'no-void': 0,
'@typescript-eslint/consistent-type-assertions': 0,
'no-restricted-syntax': 0,
'unicorn/filename-case': 0,
'unicorn/prefer-math-trunc': 0,
'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars': [
'error',
{
vars: 'all',
varsIgnorePattern: '^_',
args: 'after-used',
argsIgnorePattern: '^_',
ignoreRestSiblings: true,
},
],
// for node server runtime
'require-await': 0,
'@typescript-eslint/no-unsafe-function-type': 0,
'unicorn/no-array-callback-reference': 0,
'node/prefer-global/process': 0,
'node/prefer-global/buffer': 'off',
'no-duplicate-imports': 'off',
'unicorn/explicit-length-check': 0,
'unicorn/prefer-top-level-await': 0,
// readable push syntax
'unicorn/no-array-push-push': 0,
'@typescript-eslint/no-require-imports': 0,
'perfectionist/sort-imports': 0,
},
},
{
files: ['packages/api-client/**/*.ts'],
rules: { 'unused-imports/no-unused-vars': 0 },
},
{
files: [
'apps/core/src/migration/**/*.ts',
'apps/core/src/modules/serverless/pack/**/*.ts',
'apps/core/test/**/*.ts',
],
rules: {
'import/no-default-export': 'off',
},
},
],
{
prettier: true,
markdown: true,
vue: false, // auto detection
unocss: false, // auto detection
},
)