-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy patheslint.config.mjs
59 lines (58 loc) · 1.74 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
import love from "eslint-config-love";
export default [
love,
{
files: ['**/*.cjs', '**/*.mjs', '**/*.js', '**/*.ts'],
languageOptions: {
parserOptions: {
projectService: {
allowDefaultProject: ['eslint.config.js', 'eslint.config.mjs', '*.js', '*.mjs', '*.ts', '*.mts'],
defaultProject: './tsconfig.json',
},
},
},
rules: {
"no-console": [
"error",
{
allow: ["error", "warn"],
},
],
"max-lines": "off",
"prefer-destructuring": "off",
"no-magic-numbers": "off",
"complexity": "off",
"@typescript-eslint/strict-boolean-expressions": [
"error",
{
allowString: true,
allowNumber: true,
allowNullableObject: true,
},
],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/dot-notation": "off",
"@typescript-eslint/no-dynamic-delete": "off",
"@typescript-eslint/prefer-destructuring": "off",
"@typescript-eslint/no-magic-numbers": "off",
"@typescript-eslint/consistent-type-imports": ["error"],
},
},
{
"files": ["test/**", "**/*.test.ts"],
rules: {
"eslint-comments/require-description": "off",
"complexity": "off",
"max-nested-callbacks": "off",
"@typescript-eslint/no-unsafe-type-assertion": "off",
"@typescript-eslint/non-nullable-type-assertion-style": "off",
"@typescript-eslint/init-declarations": "off",
"@typescript-eslint/no-unnecessary-condition": "off",
"@typescript-eslint/no-confusing-void-expression": "off"
}
},
{
ignores: ["lib/**", "examples/**"],
},
];