-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
37 lines (36 loc) · 1.17 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
import playwright from "eslint-plugin-playwright";
import tseslint from "typescript-eslint";
export default tseslint.config(
tseslint.configs.recommended,
{ ignores: [".yarn/**", "eslint.config.mjs", ".pnp.cjs", ".pnp.loader.mjs"] },
{
files: ["**/*.ts"],
plugins: {
"@typescript-eslint": tseslint.plugin,
},
languageOptions: {
parser: tseslint.parser,
parserOptions: {
project: "./tsconfig.json",
},
},
rules: {
"@typescript-eslint/no-floating-promises": "error",
// This rule should be enabled when enums are converted
"@typescript-eslint/no-duplicate-enum-values": "off",
},
},
{
...playwright.configs["flat/recommended"],
rules: {
...playwright.configs["flat/recommended"].rules,
"playwright/expect-expect": "off",
// This should be enabled when waitForSelector calls are changed to locator.waitFor()
"playwright/no-wait-for-selector": "off",
// This should be enabled when waitForTimeout calls are changed to explicit waits (where possible)
"playwright/no-wait-for-timeout": "off",
},
ignores: ["e2e/common/helpers.ts"],
files: ["e2e/**/*.ts"],
},
);