Skip to content

Fix no-new-null for native private members - #5947

Open
Bharat Middha (bmiddha) wants to merge 1 commit into
mainfrom
bmiddha/fix-no-new-null-native-private
Open

Fix no-new-null for native private members#5947
Bharat Middha (bmiddha) wants to merge 1 commit into
mainfrom
bmiddha/fix-no-new-null-native-private

Conversation

@bmiddha

@bmiddha Bharat Middha (bmiddha) commented Aug 20, 2026

Copy link
Copy Markdown
Member

Summary

  • treat class members keyed by an ECMAScript PrivateIdentifier as private
  • stop @rushstack/no-new-null from reporting null types that cannot escape through native private fields, methods, getters, or setters
  • add regression coverage for each native private member form

Validation

  • reproduced six false positives with the regression test before the fix
  • rush build --to @rushstack/eslint-plugin --verbose
  • rush test --only @rushstack/eslint-plugin --verbose (197 tests)

Dependents

#5939, #5941, #5942, and #5943 are stacked on this fix because their native-private migrations expose the false positive.

Treat PrivateIdentifier class keys like TypeScript private members so no-new-null does not report private API types.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 8ebd5bf2-c44b-42d5-be25-e7936d4b0a14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs triage

Development

Successfully merging this pull request may close these issues.

1 participant