@putout/plugin-remove-empty
putout
plugin adds ability to find and remove:
empty block statements
;empty patterns
;empty imports
;empty arguments
;
Install
npm i @putout/plugin-remove-empty
Rules
{
"rules": {
"remove-empty/block": "on",
"remove-empty/pattern": "on",
"remove-empty/argument": "on",
"remove-empty/import": ["on", {
"ignore": []
}]
}
}
❌ Incorrect code example
import 'hello';
import world from 'world';
if (2 > 3) {}
if (a > 3) {
world();
}
✅ Correct code Example
import world from 'world';
if (a > 3) {
world();
}
License
MIT