-
-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy patheslint.config.mjs
More file actions
44 lines (43 loc) · 1.36 KB
/
Copy patheslint.config.mjs
File metadata and controls
44 lines (43 loc) · 1.36 KB
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
import eslintConfigLove from "eslint-config-love";
import eslintPluginRegexp from "eslint-plugin-regexp";
import eslintPluginVitest from "@vitest/eslint-plugin";
/**
* @type {import("eslint").Linter.Config[]}
*/
export default [
{
...eslintConfigLove,
files: ["src/**/*.ts"],
rules: {
...eslintConfigLove.rules,
// Tentatively changed from error to warn due to migration
"@typescript-eslint/consistent-type-assertions": "warn",
"@typescript-eslint/no-magic-numbers": "off",
"@typescript-eslint/no-unnecessary-condition": "warn",
"@typescript-eslint/strict-boolean-expressions": "warn",
"@typescript-eslint/prefer-nullish-coalescing": "warn",
"@typescript-eslint/prefer-destructuring": "warn",
"@typescript-eslint/no-base-to-string": "warn",
"@typescript-eslint/no-unsafe-type-assertion": "warn",
"max-nested-callbacks": "warn",
complexity: "warn",
},
},
{
...eslintPluginRegexp.configs["flat/recommended"],
files: ["src/**/*.ts"],
rules: {
...eslintPluginRegexp.configs["flat/recommended"].rules,
"require-unicode-regexp": "off",
},
},
{
files: ["**/*.spec.ts"],
plugins: { vitest: eslintPluginVitest },
rules: {
...eslintPluginVitest.configs.recommended.rules,
"vitest/no-conditional-expect": "warn",
"max-lines": "off",
},
},
];