-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
67 lines (62 loc) · 1.7 KB
/
.eslintrc.cjs
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
module.exports = {
plugins: ["simple-import-sort", "check-file"],
extends: ["prettier", "plugin:anti-trojan-source/recommended"],
ignorePatterns: ["dist"],
rules: {
// ### Import
"no-restricted-imports": [
"error",
{
patterns: [
{
group: ["*/src"],
message: "Do not directly import packages from the src/ directory."
}
]
}
],
// ### Simple Import Sort
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
// ### Check File
"check-file/filename-naming-convention": [
"error",
{
"src/**/*.{tsx,ts}": "PASCAL_CASE"
},
{
ignoreMiddleExtensions: true
}
]
},
overrides: [
{
files: ["tests/**/*.ts"],
rules: {
"no-restricted-imports": "off"
}
},
{
files: ["*.ts", "*.tsx"],
parser: "@typescript-eslint/parser",
extends: ["plugin:@typescript-eslint/recommended"],
rules: {
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/prefer-arrow-callback": "off",
"@typescript-eslint/ban-types": "off"
}
},
{
files: ["types.d.ts", "main.ts", "mod.ts", "index.ts"],
rules: {
"check-file/filename-naming-convention": ["off"]
}
}
]
};