-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy patheslint.config.mjs
30 lines (29 loc) · 988 Bytes
/
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
import eslintConfigLove from "eslint-config-love";
import eslintPluginRegexp from "eslint-plugin-regexp";
/**
* @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"],
},
];