tools: use 'readonly' for EventSource global - #64787
Conversation
|
Deprecation reference in https://eslint.org/docs/latest/use/configure/language-options#use-configuration-files
|
This comment was marked as resolved.
This comment was marked as resolved.
|
Thanks for the review @MikeMcC399, and for the deprecation link, that's a better reference than the ESLint PR I cited in the issue. |
This comment was marked as resolved.
This comment was marked as resolved.
|
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. |
|
Please change to 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 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>
7e505b4 to
e3b900d
Compare
|
Pushed as e3b900d. Switched |



The
EventSourceentry ineslint.config.mjswas the only global still using the deprecatedreadablevalue, while the other 40+ entries in the same block usereadonly.ESLint keeps
readableandwriteableworking only for historical reasons and documents them as deprecated in favour ofreadonlyandwritable, 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.jsspelling 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.jsandtest-eventsource-disabled.js) all lint clean, sono-undefstill resolvesEventSourceas expected.Fixes: #64757