Version
main @ 4a5eb1c
Platform
N/A, this is lint tooling configuration only.
Subsystem
tools / lint (eslint.config.mjs)
What steps will reproduce the bug?
Not a runtime bug, a leftover deprecated value in the lint config.
In eslint.config.mjs, inside the general globals block, EventSource is declared with the legacy value 'readable' while every other global in the same object uses 'readonly':
// eslint.config.mjs:131
EventSource: 'readable',
It is the only remaining occurrence in the repository:
$ git grep -nE "'(readable|writeable)'" -- '*eslint*.mjs' '*eslint*.js'
eslint.config.mjs:131: EventSource: 'readable',
How often does it reproduce? Does it reproduce on all platforms?
Always, the value is static config.
What is the expected behavior? Why is that the expected behavior?
EventSource: 'readonly', matching the other 40+ entries in the same block.
ESLint keeps 'readable' and 'writeable' working only for historical reasons and documents them as deprecated in favour of 'readonly' and 'writable' (see eslint/eslint#11359, which introduced the current spellings).
What do you see instead?
The deprecated spelling is still used. Behavior is unchanged today, since 'readable' is treated as equivalent to 'readonly', so this is a consistency and future-proofing fix rather than a functional one.
Additional information
Origin of the inconsistency: the old .eslintrc.js used 'readable' for all of these globals. The flat config migration in 7e6d92c ("tools: update ESLint to v9 and use flat config") converted them to 'readonly' but missed this single entry:
$ git show 7e6d92c485c:eslint.config.mjs | grep -E "CustomEvent|EventSource|WebSocket"
CustomEvent: 'readonly',
EventSource: 'readable',
WebSocket: 'readonly',
Fix is a one line change. Looks suitable for a first time contributor.
I searched open and closed issues and PRs for this and found nothing existing.
Suggested labels: tools, good first issue. I do not have triage permission on the repo, so I could not apply them myself.
Version
main@ 4a5eb1cPlatform
N/A, this is lint tooling configuration only.
Subsystem
tools / lint (
eslint.config.mjs)What steps will reproduce the bug?
Not a runtime bug, a leftover deprecated value in the lint config.
In
eslint.config.mjs, inside the general globals block,EventSourceis declared with the legacy value'readable'while every other global in the same object uses'readonly':It is the only remaining occurrence in the repository:
How often does it reproduce? Does it reproduce on all platforms?
Always, the value is static config.
What is the expected behavior? Why is that the expected behavior?
EventSource: 'readonly', matching the other 40+ entries in the same block.ESLint keeps
'readable'and'writeable'working only for historical reasons and documents them as deprecated in favour of'readonly'and'writable'(see eslint/eslint#11359, which introduced the current spellings).What do you see instead?
The deprecated spelling is still used. Behavior is unchanged today, since
'readable'is treated as equivalent to'readonly', so this is a consistency and future-proofing fix rather than a functional one.Additional information
Origin of the inconsistency: the old
.eslintrc.jsused'readable'for all of these globals. The flat config migration in 7e6d92c ("tools: update ESLint to v9 and use flat config") converted them to'readonly'but missed this single entry:Fix is a one line change. Looks suitable for a first time contributor.
I searched open and closed issues and PRs for this and found nothing existing.
Suggested labels:
tools,good first issue. I do not have triage permission on the repo, so I could not apply them myself.