@putout/plugin-remove-constant-conditions

putout plugin adds ability to find and remove test.constant-conditions calls

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@putout/plugin-remove-constant-conditions
36404.0.06 months ago4 years agoMinified + gzip package size for @putout/plugin-remove-constant-conditions in KB

Readme

@putout/plugin-remove-constant-conditions !NPM versionNPMIMGURLNPMURL
šŸŠPutout plugin adds ability to find and remove constant conditions.

Install

npm i @putout/plugin-remove-constant-conditions -D

Rule

{
    "rules": {
        "remove-constant-conditions": "on"
    }
}

āŒ Example of incorrect code

function hi(a) {
    if (2 < 3) {
        console.log('hello');
        console.log('world');
    }
}

āœ… Example of correct code

function hi(b) {
    console.log('hello');
    console.log('world');
}

License

MIT