-
Notifications
You must be signed in to change notification settings - Fork 177
/
eslint.config.mjs
69 lines (68 loc) · 2.33 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
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import importPlugin from "eslint-plugin-import";
import jestPlugin from "eslint-plugin-jest";
import jestDomPlugin from "eslint-plugin-jest-dom";
import perfectionistPlugin from "eslint-plugin-perfectionist";
import playwrightPlugin from "eslint-plugin-playwright";
export default [
eslint.configs.recommended,
...tseslint.configs.strictTypeChecked,
...tseslint.configs.stylisticTypeChecked,
importPlugin.flatConfigs.recommended,
importPlugin.flatConfigs.typescript,
perfectionistPlugin.configs["recommended-natural"],
{
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
rules: {
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
},
],
"@typescript-eslint/non-nullable-type-assertion-style": "off",
"@typescript-eslint/prefer-includes": "off",
"@typescript-eslint/triple-slash-reference": "off",
"@typescript-eslint/prefer-string-starts-ends-with": "off",
"@typescript-eslint/restrict-template-expressions": [
"error",
{
allowNumber: true,
allowBoolean: true,
allowAny: false,
allowNullish: false,
},
],
"@typescript-eslint/unified-signatures": "off",
},
},
{
files: ["src/test/**/*.ts"],
...jestPlugin.configs["flat/recommended"],
},
{
files: ["src/test/**/*.ts"],
rules: {
"jest/no-identical-title": "off",
},
},
{
files: ["src/test/jqTree/**/*.ts"],
...jestDomPlugin.configs["flat/recommended"],
},
{
files: ["src/playwright/**/*.ts"],
...playwrightPlugin.configs["flat/recommended"],
},
];