README
@putout/plugin-remove-empty
🐊Putout
plugin adds ability to find and remove:
empty block statements
;empty patterns
;empty imports
;empty arguments
;empty exports
;
Install
npm i @putout/plugin-remove-empty
Rules
{
"rules": {
"remove-empty/block": "on",
"remove-empty/pattern": "on",
"remove-empty/argument": "on",
"remove-empty/export": "on",
"remove-empty/import": ["on", {
"ignore": []
}]
}
}
block
-if (2 > 3) {}
pattern
-const [] = array;
-const {} = object;
export
-export {};
import
-import 'abc';
arguments
❌ Incorrect code example
module.exports = ({rule, plugin, msg, options}, {}) => {
};
✅ Correct code Example
module.exports = ({rule, plugin, msg, options}) => {
};
License
MIT