Replies: 1 comment 1 reply
-
Thanks for the suggestions! We do usually use #3 for rule suggestions. Could you create a comment there and link to this discussion? I do like the rule suggestions themselves, but please keep in mind these would rely on the presence of type information. As such, I'm afraid it would be too soon to start implementing them right now, because #3187 would need to be done first. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would like to propose two new, related rules for Biome in the "correctness" category. These would both have very simple safe fixes that simply removes the errant operator. Curious to see what others think about these.
If this is something that is desirable in the nursery, I would be interested in implementing myself as I've been long awaiting a chance to contribute to Biome.
noUselessOptionalChaining
Disallow the use of the optional chaining operator (
?.
) on types that are not unions includingundefined
ornull
.noUselessNonNullAssertion
This one is related to
noExtraNonNullAssertion
.Disallow the use of the non-null assertion operator (
!
) on types that may returnundefined
ornull
.Beta Was this translation helpful? Give feedback.
All reactions