@putout/plugin-remove-empty
Version:
🐊Putout plugin adds ability to find and remove blocks with empty body
15 lines (9 loc) • 309 B
JavaScript
;
const {operator} = require('putout');
const {remove} = operator;
module.exports.report = () => 'Avoid useless empty static blocks';
module.exports.fix = (path) => remove(path);
module.exports.filter = (path) => !path.node.body.length;
module.exports.include = () => [
'StaticBlock',
];