UNPKG

@putout/plugin-remove-empty

Version:

🐊Putout plugin adds ability to find and remove blocks with empty body

14 lines (8 loc) 282 B
import {operator} from 'putout'; const {remove} = operator; export const report = () => 'Avoid useless empty static blocks'; export const fix = (path) => remove(path); export const filter = (path) => !path.node.body.length; export const include = () => [ 'StaticBlock', ];