Skip to content

Commit e01e720

Browse files
feat(e2e): enable strict oxlint plugins and burn down violations
Add import, node, and promise plugins with suspicious-as-error categories, promote Playwright and type-aware unsafe-* rules to error, and fix the resulting violations across helpers, specs, and support code. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent f480ebf commit e01e720

49 files changed

Lines changed: 1745 additions & 1034 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

e2e-tests/oxlint.config.ts

Lines changed: 60 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
import { defineConfig } from "oxlint";
22

33
export default defineConfig({
4+
plugins: [
5+
"eslint",
6+
"typescript",
7+
"unicorn",
8+
"oxc",
9+
"import",
10+
"node",
11+
"promise",
12+
],
13+
categories: {
14+
correctness: "error",
15+
suspicious: "error",
16+
},
417
options: {
518
typeAware: true,
619
typeCheck: true,
@@ -16,6 +29,11 @@ export default defineConfig({
1629
rules: {
1730
"typescript/no-floating-promises": "error",
1831
"typescript/await-thenable": "error",
32+
"typescript/no-unsafe-assignment": "error",
33+
"typescript/no-unsafe-member-access": "error",
34+
"typescript/no-unsafe-call": "error",
35+
"typescript/no-unsafe-return": "error",
36+
"typescript/strict-void-return": "error",
1937
"check-file/filename-naming-convention": [
2038
"error",
2139
{
@@ -33,29 +51,67 @@ export default defineConfig({
3351
],
3452
"playwright/no-wait-for-timeout": "error",
3553
"playwright/no-force-option": "error",
36-
"playwright/expect-expect": "warn",
54+
"playwright/expect-expect": "error",
3755
"playwright/valid-expect": "error",
38-
"playwright/prefer-native-locators": "warn",
56+
"playwright/prefer-native-locators": "error",
3957
"playwright/no-raw-locators": [
40-
"warn",
58+
"error",
4159
{
4260
allowed: [],
4361
},
4462
],
4563
"playwright/no-skipped-test": [
46-
"warn",
64+
"error",
4765
{
4866
allowConditional: true,
4967
},
5068
],
5169
},
5270
overrides: [
71+
{
72+
files: ["playwright/e2e/auth-providers/**/*.spec.ts"],
73+
rules: {
74+
"typescript/strict-void-return": "off",
75+
},
76+
},
5377
{
5478
files: ["**/*.spec.ts", "**/*.test.ts", "playwright/**/*.ts"],
5579
rules: {
5680
"playwright/valid-title": "off",
5781
"playwright/valid-describe-callback": "off",
5882
"playwright/no-wait-for-selector": "off",
83+
"playwright/expect-expect": [
84+
"error",
85+
{
86+
assertFunctionNames: [
87+
"expect",
88+
"toPass",
89+
"verifyHeading",
90+
"verifyQuickAccess",
91+
"verifyLink",
92+
"verifyRowsInTable",
93+
"verifyDivHasText",
94+
"verifyComponentInCatalog",
95+
"verifyParagraph",
96+
"verifyText",
97+
"verifyTextinCard",
98+
"verifyVisitedCardContent",
99+
"verifyAboutCardIsDisplayed",
100+
"verifyPRStatisticsRendered",
101+
"verifyPRRows",
102+
"verifyPRRowsPerPage",
103+
"registerExistingComponent",
104+
"validateLog",
105+
"validateLogEvent",
106+
"validateRbacLogEvent",
107+
"checkRbacResponse",
108+
"verifyTextInSelector",
109+
"verifyPartialTextInSelector",
110+
"loginAsGuest",
111+
"waitForTitle",
112+
],
113+
},
114+
],
59115
},
60116
},
61117
],

0 commit comments

Comments
 (0)