Skip to content

tools: use 'readonly' for EventSource global - #64787

Open
HoneyTyagii wants to merge 1 commit into
nodejs:mainfrom
HoneyTyagii:tools-eslint-eventsource-readonly
Open

tools: use 'readonly' for EventSource global#64787
HoneyTyagii wants to merge 1 commit into
nodejs:mainfrom
HoneyTyagii:tools-eslint-eventsource-readonly

Conversation

@HoneyTyagii

@HoneyTyagii HoneyTyagii commented Jul 27, 2026

Copy link
Copy Markdown

The EventSource entry in eslint.config.mjs was the only global still using the deprecated readable value, while the other 40+ entries in the same block use readonly.

ESLint keeps readable and writeable working only for historical reasons and documents them as deprecated in favour of readonly and writable, so behavior is unchanged. This is a consistency and future-proofing fix.

The inconsistency dates back to the flat config migration in 7e6d92c ("tools: update ESLint to v9 and use flat config"), which converted the other globals from the old .eslintrc.js spelling but missed this single entry.

Verified locally: eslint.config.mjs, lib, benchmark, tools, and the two tests that reference the global (test/parallel/test-eventsource.js and test-eventsource-disabled.js) all lint clean, so no-undef still resolves EventSource as expected.

Fixes: #64757

@nodejs-github-bot nodejs-github-bot added the tools Issues and PRs related to the tools directory. label Jul 27, 2026
@MikeMcC399

Copy link
Copy Markdown
Contributor

@MikeMcC399

This comment was marked as resolved.

@HoneyTyagii

Copy link
Copy Markdown
Author

Thanks for the review @MikeMcC399, and for the deprecation link, that's a better reference than the ESLint PR I cited in the issue.
Good catch on the DCO, I missed it. Amended with git commit -s --amend and force pushed, so the Signed-off-by line is now present, and lint-commit-message should pass on the re-run. The diff itself is unchanged, still the single line in eslint.config.mjs.

@MikeMcC399

This comment was marked as resolved.

@HoneyTyagii

Copy link
Copy Markdown
Author

You're right, @MikeMcC399, sorry for the noise. The amend was local, the push didn't go through on my end, so the branch is still at 7e505b4. Redoing it now, and I'll confirm here once the signed-off commit actually shows up on the PR.

@MikeMcC399

Copy link
Copy Markdown
Contributor

Please change

Refs: #64757

to

Fixes: #64757

because this PR fixes the issue #64757 that you originally opened. When this PR lands, then the issue will be closed automatically. If you only write Refs: the issue will need to be closed manually afterwards.

See also https://github.com/nodejs/node/blob/main/doc/contributing/pull-requests.md#commit-message-guidelines I linked to before.

The EventSource entry was the only global in eslint.config.mjs still
using the deprecated 'readable' value. ESLint keeps 'readable' working
as an alias of 'readonly' for historical reasons, so this is a
consistency fix rather than a functional one.

The flat config migration converted the other globals in this block
but missed this single entry.

Fixes: nodejs#64757
Signed-off-by: Honey Tyagi <honeyt290@gmail.com>
@HoneyTyagii
HoneyTyagii force-pushed the tools-eslint-eventsource-readonly branch from 7e505b4 to e3b900d Compare July 27, 2026 18:22
@HoneyTyagii

Copy link
Copy Markdown
Author

Pushed as e3b900d. Switched Refs: to Fixes: so the issue closes on landing, and the commit now carries the Signed-off-by line. Thanks for walking me through it. The diff is unchanged, still the single line in eslint.config.mjs.

@MikeMcC399

Copy link
Copy Markdown
Contributor

I'm sorry I wasn't very clear. The Fixes: statement usually goes into the PR description and is added automatically into the commit message.

image

I've edited it manually to speed things up.

@MikeMcC399 MikeMcC399 added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jul 27, 2026
@MikeMcC399

Copy link
Copy Markdown
Contributor

GitHub links the PR and the issue automatically now

image

@Renegade334 Renegade334 added the commit-queue Add this label to land a pull request using GitHub Actions. label Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue Add this label to land a pull request using GitHub Actions. tools Issues and PRs related to the tools directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tools: replace deprecated ESLint globals value 'readable' with 'readonly' for EventSource

5 participants