You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.
// `sonarjs/no-inverted-boolean-check` will report it!!(a<b)
after apply autofix of this rule, it will become:
!a>=b
When a = 0 and b = 2 for example, the original expression !!(0 < 2) will be true, but after autofix, the expression !0 <= 2 will be false, which will be an error.
I cloned this repo locally and add the case, and here is the result:
Expected behavior
eslint-plugin-sonarjs version:
current repo version
eslint version:
current repo version
Node.js version:
v12.13.0
Rule key:
sonarjs/no-inverted-boolean-check
The text was updated successfully, but these errors were encountered:
I want to report a bug.
Reproducer
after apply autofix of this rule, it will become:
When
a = 0
andb = 2
for example, the original expression!!(0 < 2)
will betrue
, but after autofix, the expression!0 <= 2
will befalse
, which will be an error.I cloned this repo locally and add the case, and here is the result:
Expected behavior
eslint-plugin-sonarjs version:
current repo version
eslint version:
current repo version
Node.js version:
v12.13.0
Rule key:
sonarjs/no-inverted-boolean-check
The text was updated successfully, but these errors were encountered: