@putout/plugin-convert-equal-to-strict-equal
The strict equality operator (
===
) checks whether its two operands are equal, returning aBoolean
result. Unlike the equality operator (==
), the strict equality operator always considers operands of different types to be different.(c) MDN
@putout/plugin-conditions
.
Install
npm i @putout/plugin-convert-equal-to-strict-equal -D
Rule
{
"rules": {
"convert-equal-to-strict-equal": "off"
}
}
❌ Example of incorrect code
if (a == b) {
}
✅ Example of correct code
if (a === b) {
}
License
MIT