Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import path from "path";
import { fileURLToPath } from "url";
import stylistic from "@stylistic/eslint-plugin";
import importRules from "eslint-plugin-import";
import playwrightPlugin from "eslint-plugin-playwright";
import progressPlugin from "./utils/eslint-plugin-progress/index.js";
import { fixupConfigRules } from "@eslint/compat";
import { FlatCompat } from "@eslint/eslintrc";
Expand Down Expand Up @@ -496,6 +497,21 @@ export default [
...noFloatingPromisesRules,
},
},
{
// Playwright-specific guardrails applied only to spec files.
// - no-wait-for-timeout: warn (93 existing hits → keep CI green while flagging tech debt)
// - valid-expect: error (catches missing await on expect() calls)
// - no-focused-test: error (blocks test.only from landing; backs up forbidOnly on CI)
files: ["tests/**/*.spec.ts", "tests/**/*.spec.js"],
plugins: {
playwright: playwrightPlugin,
},
rules: {
"playwright/no-wait-for-timeout": "warn",
"playwright/valid-expect": "error",
"playwright/no-focused-test": "error",
},
},
...reactBaseConfig.map((config) => ({
...config,
files: reactFiles,
Expand Down
170 changes: 96 additions & 74 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"chromium-bidi": "^12.0.0",
"colors": "1.4.0",
"commander": "^13.0.0",
"concurrently": "^6.2.1",
"concurrently": "^9.2.1",
"cross-env": "^7.0.3",
"dotenv": "^16.4.5",
"electron": "^39.8.4",
Expand All @@ -101,6 +101,7 @@
"eslint": "^9.34.0",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-notice": "^1.0.0",
"eslint-plugin-playwright": "^2.10.1",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^5.2.0",
"formidable": "^2.1.1",
Expand Down
2 changes: 1 addition & 1 deletion tests/library/resource-timing.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ it('should work when serving from memory cache', async ({ contextFactory, server
});

function verifyTimingValue(value: number, previous: number) {
expect(value === -1 || value > 0 && value >= previous);
expect(value === -1 || value > 0 && value >= previous).toBeTruthy();
}

function verifyConnectionTimingConsistency(timing) {
Expand Down
Loading