chore: address eslint warnings in CLI#33430
chore: address eslint warnings in CLI#33430jennifer-shehane wants to merge 2 commits intodevelopfrom
Conversation
cypress
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Project |
cypress
|
| Branch Review |
chores-cli-eslint-warnings
|
| Run status |
|
| Run duration | 26m 35s |
| Commit |
|
| Committer | Jennifer Shehane |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
1
|
|
|
13
|
|
|
1112
|
|
|
0
|
|
|
27135
|
| View all changes introduced in this branch ↗︎ | |
UI Coverage
61.04%
|
|
|---|---|
|
|
28
|
|
|
47
|
Accessibility
99.02%
|
|
|---|---|
|
|
0 critical
3 serious
1 moderate
0 minor
|
|
|
19
|
Tests for review
cypress/e2e/studio/studio-ui.cy.ts • 1 failed test • app-e2e
| Test | Artifacts | |
|---|---|---|
| Cypress Studio - UI and Panel Management > studio AI is marked as coming soon |
Test Replay
Screenshots
|
|
commands/files.cy.js • 1 flaky test • 5x-driver-electron
| Test | Artifacts | |
|---|---|---|
| ... > throws when there is an error reading the file |
Test Replay
|
|
issues/28527.cy.ts • 1 flaky test • 5x-driver-electron
| Test | Artifacts | |
|---|---|---|
| issue 28527 > fails and then retries and verifies about:blank is not displayed |
Test Replay
Screenshots
|
|
issues/28527.cy.ts • 1 flaky test • 5x-driver-chrome:beta
| Test | Artifacts | |
|---|---|---|
| issue 28527 > fails and then retries and verifies about:blank is not displayed |
Test Replay
Screenshots
|
|
commands/net_stubbing.cy.ts • 1 flaky test • 5x-driver-firefox
| Test | Artifacts | |||||||
|---|---|---|---|---|---|---|---|---|
| ... > stops waiting when an xhr request is canceled |
| |||||||
| Test | Artifacts | |
|---|---|---|
| src/cy/commands/files > #readFile > retries assertions until they pass |
The first 5 flaky specs are shown, see all 11 specs in Cypress Cloud. | |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| ``` | ||
| */ | ||
| declare var Cypress: Cypress.Cypress & CyEventEmitter | ||
| declare let Cypress: Cypress.Cypress & CyEventEmitter |
There was a problem hiding this comment.
declare var to let breaks globalThis type access
High Severity
Changing declare var to declare let for cy, Cypress, expect, and assert in ambient declarations removes these globals from globalThis typing. In TypeScript, only declare var creates properties accessible on globalThis; declare let does not. This breaks code using globalThis.Cypress as a type reference — notably npm/react/src/createMount.ts and npm/react/src/types.ts which use globalThis.Cypress.Chainable<MountReturn> as return types. The test workaround using a type cast in cypress-tests.ts masks this regression rather than preserving the original behavior.
Additional Locations (1)
Triggered by project rule: Overview


Additional details
Addresses warnings in CLI when running
yarn lintNote
Medium Risk
Mostly lint/style churn, but it changes distributed
.d.tsglobal declarations (e.g.declare letandWindowaugmentation), which could surface type conflicts in downstream TypeScript projects.Overview
Resolves CLI
eslintwarnings by removing unusedno-consoledisables, fixing minor style issues, and refactoringscripts/sync-typedefs.tsto use asyncfs-extraAPIs with explicit error handling.Updates Cypress TypeScript declarations by switching ambient globals (
Cypress,cy,expect,assert) fromvartoletand adding a newWindowaugmentation (cypress-global-augmentation.d.ts, referenced fromtypes/index.d.ts) sowindow.Cypress/window.cyare typed; related type tests and a few unit tests were updated to satisfy new lint rules (async file hashing/stat, prefer-spread, formatting).Written by Cursor Bugbot for commit 050ddd5. This will update automatically on new commits. Configure here.
Steps to test
How has the user experience changed?
PR Tasks
cypress-documentation?type definitions?