Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@putout/plugin-convert-equal-to-strict-equal

coderaiser35.3kMIT1.1.1

🐊Putout plugin adds ability to convert equal to strict equal

putout, putout-plugin, putout-plugin-convert, plugin, convert, equal, strict-equal

readme

@putout/plugin-convert-equal-to-strict-equal NPM version

The strict equality operator (===) checks whether its two operands are equal, returning a Boolean result. Unlike the equality operator (==), the strict equality operator always considers operands of different types to be different.

(c) MDN

🐊Putout plugin adds ability to convert equal to strict equal operator. Merged to @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