-
-
Notifications
You must be signed in to change notification settings - Fork 508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(lint/noEmptyBlockStatements): fix false positive when considering constructors using property parameters #3009
Conversation
CodSpeed Performance ReportMerging #3009 will not alter performanceComparing Summary
|
ef9e59c
to
ccaa249
Compare
crates/biome_js_analyze/src/lint/suspicious/no_empty_block_statements.rs
Outdated
Show resolved
Hide resolved
ccaa249
to
8d2c21d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should also exclude empty constructors with a private
or a protected
accessibility modifier.
crates/biome_js_analyze/src/lint/suspicious/no_empty_block_statements.rs
Outdated
Show resolved
Hide resolved
I'll go ahead and do that in this PR. |
8d2c21d
to
48716db
Compare
crates/biome_js_analyze/src/lint/suspicious/no_empty_block_statements.rs
Outdated
Show resolved
Hide resolved
… constructors using property parameters
48716db
to
23d78d5
Compare
Summary
Typescript has a syntax extension called parameter properties. See: https://www.typescriptlang.org/docs/handbook/2/classes.html#parameter-properties
This PR makes it so that this rule ignores constructors that use this feature.
fixes #3005
Test Plan
Added snapshot test