$ cnpm install @putout/plugin-remove-empty
????Putout plugin adds ability to find and remove:
empty blocks;empty static blocks;empty patterns;empty arguments;npm i @putout/plugin-remove-empty
{
"rules": {
"remove-empty/block": "on",
"remove-empty/static-block": "on",
"remove-empty/pattern": "on",
"remove-empty/nested-pattern": "on",
"remove-empty/argument": "on"
}
}
-if (2 > 3) {}
Check it out in ????Putout Editor.
class Hello {
- static {
- }
}
-const [] = array;
-const {} = object;
export const func = (param) => {
const {
a: {
},
c,
} = param;
return c;
};
export const func = (param) => {
const {c} = param;
return c;
};
Checkout in ????Putout Editor.
const create = ({} = {}) => 'hello';
module.exports = ({rule, plugin, msg, options}, {}) => {};
const a = {
EmptyStatement({}) {},
};
const create = () => 'hello';
module.exports = ({rule, plugin, msg, options}) => {};
const a = {
EmptyStatement() {},
};
MIT
Copyright 2013 - present © cnpmjs.org | Home |