forked from kamiya10/kami-music-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.mjs
80 lines (76 loc) · 2.02 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
import ts from "typescript-eslint";
import stylistic from "@stylistic/eslint-plugin";
import eslintPluginImportX from 'eslint-plugin-import-x'
import js from "@eslint/js";
export default ts.config(
{
ignores: ["**/*.cjs", "types/*", "eslint.config.mjs", "rollup.config.mjs"],
},
js.configs.recommended,
...ts.configs.recommendedTypeChecked,
...ts.configs.stylisticTypeChecked,
stylistic.configs.customize({
arrowParens: true,
indent: 2,
semi: true,
}),
eslintPluginImportX.flatConfigs.recommended,
eslintPluginImportX.flatConfigs.typescript,
{
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
{
rules: {
"@stylistic/arrow-spacing": ["warn"],
"@stylistic/comma-dangle": ["warn"],
"@stylistic/comma-spacing": ["warn"],
"@stylistic/indent": [
"warn",
2,
{
SwitchCase: 1,
},
],
"@stylistic/key-spacing": ["warn"],
"@stylistic/object-curly-newline": ["warn"],
"@stylistic/space-infix-ops": ["warn"],
"@stylistic/semi": ["warn"],
"sort-imports": [
'warn',
{
memberSyntaxSortOrder: ['multiple', 'single', 'all', 'none'],
allowSeparatedGroups: true
}
],
"@typescript-eslint/restrict-template-expressions": ["off"],
"no-unused-vars": ["off"],
"@typescript-eslint/no-unused-vars": [
"warn",
{
"args": "all",
"argsIgnorePattern": "^_",
"caughtErrors": "all",
"caughtErrorsIgnorePattern": "^_",
"destructuredArrayIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"ignoreRestSiblings": true
}
],
'import-x/order': ['warn', {
'groups': [
'builtin',
'external',
'internal',
['parent', 'sibling', 'index'],
'unknown',
'type',
],
'newlines-between': 'always',
}],
},
});