Skip to content

Commit 5a38cc9

Browse files
refactor(e2e): replace oxlint file exceptions with path patterns
Use directory globs instead of named files and document the rationale for each override block. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 23c594b commit 5a38cc9

1 file changed

Lines changed: 26 additions & 30 deletions

File tree

e2e-tests/oxlint.config.ts

Lines changed: 26 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -72,38 +72,33 @@ export default defineConfig({
7272
},
7373
overrides: [
7474
{
75+
// Auth-provider specs deploy RHDH in beforeAll and use async Playwright hooks.
76+
// strict-void-return and no-misused-promises produce false positives on those
77+
// describe/beforeAll callbacks without improving test safety.
7578
files: ["playwright/e2e/auth-providers/**/*.spec.ts"],
7679
rules: {
7780
"typescript/strict-void-return": "off",
7881
"typescript/no-misused-promises": "off",
7982
},
8083
},
8184
{
85+
// Spec files orchestrate multi-step E2E flows; length limits target production
86+
// code readability, not test scenarios that must stay in one file for clarity.
8287
files: ["**/*.spec.ts", "**/*.test.ts"],
8388
rules: {
8489
"eslint/max-lines": "off",
8590
"eslint/max-lines-per-function": "off",
8691
},
8792
},
8893
{
94+
// Shared infrastructure (utils, support, data, e2e helpers) is split into
95+
// modules but still contains cohesive orchestration (kube waits, deployment
96+
// setup, log parsing). Complexity limits would force artificial fragmentation.
8997
files: [
90-
"playwright/utils/kube-client.ts",
91-
"playwright/utils/kube-client-*.ts",
92-
"playwright/utils/common.ts",
93-
"playwright/utils/common-auth-popup.ts",
94-
"playwright/utils/ui-helper.ts",
95-
"playwright/utils/ui-helper/**/*.ts",
96-
"playwright/utils/api-helper.ts",
97-
"playwright/utils/postgres-config.ts",
98-
"playwright/utils/authentication-providers/rhdh-deployment.ts",
99-
"playwright/utils/authentication-providers/rhdh-deployment-*.ts",
100-
"playwright/utils/authentication-providers/msgraph-helper.ts",
101-
"playwright/utils/authentication-providers/msgraph-helper-nsg.ts",
102-
"playwright/e2e/audit-log/log-utils.ts",
103-
"playwright/e2e/plugin-division-mode-schema/schema-mode-setup.ts",
104-
"playwright/e2e/plugin-division-mode-schema/schema-mode-db.ts",
105-
"playwright/support/selectors/semantic-selectors*.ts",
106-
"playwright/data/rbac-constants.ts",
98+
"playwright/utils/**/*.ts",
99+
"playwright/support/**/*.ts",
100+
"playwright/data/**/*.ts",
101+
"playwright/e2e/**/*.ts",
107102
],
108103
rules: {
109104
"eslint/max-lines": "off",
@@ -112,24 +107,25 @@ export default defineConfig({
112107
},
113108
},
114109
{
115-
files: ["playwright/e2e/localization/locale.ts"],
116-
rules: {
117-
"import/max-dependencies": "off",
118-
},
119-
},
120-
{
121-
files: ["playwright/utils/kube-client.ts"],
122-
rules: {
123-
"import/max-dependencies": "off",
124-
},
125-
},
126-
{
127-
files: ["playwright/utils/authentication-providers/rhdh-deployment.ts"],
110+
// Facade modules aggregate many submodules by design (e.g. KubeClient re-exports,
111+
// rhdh-deployment orchestration, locale translation maps). A flat import count
112+
// does not reflect coupling when each import is a focused submodule.
113+
files: [
114+
"playwright/utils/**/*.ts",
115+
"playwright/e2e/localization/**/*.ts",
116+
],
128117
rules: {
129118
"import/max-dependencies": "off",
130119
},
131120
},
132121
{
122+
// valid-title / valid-describe-callback: existing suite uses legacy naming
123+
// patterns that do not match the plugin's strict conventions.
124+
// no-wait-for-selector: replaced with expect() and locator.waitFor() per
125+
// hardening guidelines; rule would flag intentional migration patterns.
126+
// expect-expect + assertFunctionNames: POM verify* helpers and loginAsGuest
127+
// perform assertions on behalf of the spec; register them so specs are not
128+
// forced to duplicate expect() calls after every helper invocation.
133129
files: ["**/*.spec.ts", "**/*.test.ts", "playwright/**/*.ts"],
134130
rules: {
135131
// Playwright requires object destructuring for hook/test callbacks that take

0 commit comments

Comments
 (0)