3.1.1 β€’ Published 8 months ago

@putout/plugin-merge-if-statements v3.1.1

Weekly downloads
2,949
License
MIT
Repository
github
Last release
8 months ago

@putout/plugin-merge-if-statements NPM version

The if statement executes a statement if a specified condition is truthy.

(c) MDN

🐊Putout plugin adds ability to merge if statements. Merged to @putout/plugin-conditions.

Install

npm i @putout/plugin-merge-if-statements

Rule

{
    "rules": {
        "merge-if-statements": "on"
    }
}

❌ Example of incorrect code

if (a > b) {
    if (b < c) {
        console.log('hello');
    }
}

βœ… Example of correct code

if (a > b && b < c) {
    console.log('hello');
}

License

MIT

3.1.1

8 months ago

3.1.0

3 years ago

3.0.0

4 years ago

2.0.1

4 years ago

2.0.0

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago