Require ECMAScript private class members - #5945
Open
Bharat Middha (bmiddha) wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds and enables an ESLint rule requiring native ECMAScript private class members.
Changes:
- Implements and tests the new rule.
- Enables it in legacy and flat profiles.
- Documents behavior and release changes.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
eslint/eslint-plugin/src/prefer-ecmascript-private-members.ts |
Implements the rule. |
eslint/eslint-plugin/src/test/prefer-ecmascript-private-members.test.ts |
Tests supported member forms and exemptions. |
eslint/eslint-plugin/src/index.ts |
Exports the rule. |
eslint/eslint-plugin/README.md |
Documents rationale and usage. |
eslint/eslint-config/profile/_common.js |
Enables the legacy rule. |
eslint/eslint-config/flat/profile/_common.js |
Enables the flat rule. |
common/changes/@rushstack/eslint-plugin/native-private-fields_2026-08-18-12-00-00.json |
Records the plugin change. |
common/changes/@rushstack/eslint-config/native-private-fields_2026-08-18-12-00-00.json |
Records the config change. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Bharat Middha (bmiddha)
force-pushed
the
bmiddha/enforce-native-private-fields
branch
from
September 6, 2026 22:24
ca38e12 to
f176ba1
Compare
Bharat Middha (bmiddha)
force-pushed
the
bmiddha/enforce-native-private-fields
branch
from
September 7, 2026 01:24
f176ba1 to
d032be5
Compare
Bharat Middha (bmiddha)
force-pushed
the
bmiddha/enforce-native-private-fields
branch
from
September 8, 2026 19:52
d032be5 to
ba5f84b
Compare
Bharat Middha (bmiddha)
force-pushed
the
bmiddha/enforce-native-private-fields
branch
from
September 8, 2026 20:09
ba5f84b to
f2c3ee5
Compare
Bharat Middha (bmiddha)
changed the base branch from
bmiddha/native-private-fields-integration
to
main
September 10, 2026 07:09
Bharat Middha (bmiddha)
force-pushed
the
bmiddha/enforce-native-private-fields
branch
from
September 10, 2026 07:10
d512ec2 to
69b86d4
Compare
Bharat Middha (bmiddha)
marked this pull request as ready for review
September 10, 2026 19:04
Bharat Middha (bmiddha)
force-pushed
the
bmiddha/enforce-native-private-fields
branch
from
September 10, 2026 19:24
468fda0 to
a05f000
Compare
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8ebd5bf2-c44b-42d5-be25-e7936d4b0a14 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8ebd5bf2-c44b-42d5-be25-e7936d4b0a14 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Bharat Middha (bmiddha)
force-pushed
the
bmiddha/enforce-native-private-fields
branch
from
September 10, 2026 21:19
a05f000 to
a3050a6
Compare
Bharat Middha (bmiddha)
changed the base branch from
main
to
bharatmiddha-microsoft-migrate-ecmascript-private-members
September 10, 2026 21:19
Bharat Middha (bmiddha)
added this pull request to stack #6025
September 10, 2026 21:19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@rushstack/prefer-ecmascript-private-members#syntax for private fields, methods, and accessorsDependency
Draft/stacked on the integration branch for #5939, #5940, #5941, #5942, and #5943. Retarget to
mainafter those migrations merge.Validation
rush build --to @rushstack/eslint-config --verboserush test --only @rushstack/eslint-plugin --only @rushstack/eslint-config --verbose