Skip to content

Enable strictNullChecks for create-class-features-plugin#17824

Merged
liuxingbaoyu merged 3 commits into
babel:mainfrom
liuxingbaoyu:strictNullChecks-class
Feb 24, 2026
Merged

Enable strictNullChecks for create-class-features-plugin#17824
liuxingbaoyu merged 3 commits into
babel:mainfrom
liuxingbaoyu:strictNullChecks-class

Conversation

@liuxingbaoyu

Copy link
Copy Markdown
Member
Q                       A
Fixed Issues? Fixes #1, Fixes #2
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

@babel-bot

babel-bot commented Feb 23, 2026

Copy link
Copy Markdown
Collaborator

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/61005

@pkg-pr-new

pkg-pr-new Bot commented Feb 23, 2026

Copy link
Copy Markdown

Open in StackBlitz

commit: 6106b8a

},

...namedEvaluationVisitor,
...(namedEvaluationVisitor as any),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we avoid the any cast here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making VisitorBase public might be helpful.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried it, and import("../../babel-traverse/src/types.ts").VisitorBase worked.
Do we need to export it? We must also re-export it in @babel/core because we don't have a direct dependency on @babel/traverse.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am good for exporting it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, we've already exported it. We just need to reexport it. :)

this.receiver(member),
]);

return t.callExpression(file.addHelper("classPrivateFieldGet"), [

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we currently have eslint rule to detect unreachable return?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will open a new PR to handle it.

@liuxingbaoyu

Copy link
Copy Markdown
Member Author

The CI failure was unrelated to the PR, the latest version of Node.js broke yargs' compatibility.
Yargs uses a file extension-less entry point in version 17.
I don't know whose fault this is.
image

@liuxingbaoyu
liuxingbaoyu force-pushed the strictNullChecks-class branch from 70fab0f to f827366 Compare February 24, 2026 18:24
@liuxingbaoyu
liuxingbaoyu merged commit 6b9c30c into babel:main Feb 24, 2026
54 checks passed
@github-actions github-actions Bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label May 27, 2026
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators May 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants