forked from oriontech-me/langflow-e2e
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
39 lines (35 loc) · 1.26 KB
/
Copy patheslint.config.js
File metadata and controls
39 lines (35 loc) · 1.26 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
// @ts-check
const tseslint = require("typescript-eslint");
const playwright = require("eslint-plugin-playwright");
module.exports = tseslint.config(
{
ignores: ["dist/", "playwright-report/", "test-results/"],
},
...tseslint.configs.recommended,
{
...playwright.configs["flat/recommended"],
files: ["tests/**/*.ts"],
},
{
// Overrides pragmáticos: regras de estilo/padrão ficam como warning
// e serão apertadas progressivamente nas fases 1.1 a 1.5.
// Apenas regras que afetam CORREÇÃO dos testes ficam como error.
files: ["tests/**/*.ts"],
rules: {
// Fase 1.1 — assertions modernas
"playwright/prefer-web-first-assertions": "warn",
"playwright/no-useless-not": "warn",
"playwright/prefer-to-have-count": "warn",
"playwright/prefer-to-have-length": "warn",
// Fase 1.2 — higiene TypeScript
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"playwright/no-unused-locators": "warn",
// Fase 1.3 — migração para API de locators
"playwright/no-networkidle": "warn",
// Fase 1.5 — estrutura de testes
"playwright/no-conditional-in-test": "warn",
"playwright/no-conditional-expect": "warn",
},
}
);