This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
🐛 rule style/noNonNullAssertions
emit incorrect code action
#4348
Labels
Environment information
What happened?
The rule
style/noNonNullAssertions
emits an incorrect code action. In particular, its AST is wrong!Given this code:
It seems to return a correct code:
Although, the AST is wrong:
Which is wrong and it results in an endless loop when calling
rome check --apply-unsafe
because there's always aTS_NON_NULL_ASSERTION_EXPRESSION
.The correct way is to return a new code, which is a
JsStaticMemberExpression
. PlaygroundExpected result
The rule to emit a correct AST and not result in an endless loop when calling
rome check --apply-unsafe
Code of Conduct
The text was updated successfully, but these errors were encountered: