Skip to content
This repository was archived by the owner on Jan 27, 2026. It is now read-only.

chore: remove eslint-env configuration comments#175

Merged
AtofStryker merged 1 commit intocypress-io:masterfrom
MikeMcC399:remove/eslint-env-comments
Dec 15, 2025
Merged

chore: remove eslint-env configuration comments#175
AtofStryker merged 1 commit intocypress-io:masterfrom
MikeMcC399:remove/eslint-env-comments

Conversation

@MikeMcC399
Copy link
Contributor

@MikeMcC399 MikeMcC399 commented Nov 19, 2025

Situation

Several JavaScript source files in the src directory include the ESLint configuration comment:

/* eslint-env mocha */

This is no longer used in ESLint flat configurations, and will cause an error in ESLint 10.x and a warning in ESLint >=9.39.2.

See Configuration Migration Guide eslint-env Configuration Comments which says:

... when migrating from eslintrc to flat config, eslint-env configuration comments should be removed from all files.

This repo is already using an ESLint 9.x flat configuration and the mocha globals are provided by using mochaPlugin.configs.recommended.

Change

Remove the unused eslint-env configuration comment from source files in the src directory.

Verification

npm ci
npx eslint

Confirm no errors reported.

@MikeMcC399 MikeMcC399 marked this pull request as ready for review November 19, 2025 11:05
@MikeMcC399
Copy link
Contributor Author

@AtofStryker

This is a non-urgent PR from last month, if you could take a look when convenient.

The latest version of ESLint 9.x (9.39.2) will flag this misconfiguration as a warning.

@AtofStryker AtofStryker self-requested a review December 15, 2025 20:28
@AtofStryker AtofStryker merged commit 807559b into cypress-io:master Dec 15, 2025
1 check passed
@MikeMcC399 MikeMcC399 deleted the remove/eslint-env-comments branch December 16, 2025 05:13
@github-actions
Copy link

🎉 This PR is included in version 2.2.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants