@putout/plugin-remove-empty
putout plugin adds ability to find and remove empty.log calls
Last updated 7 years ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @putout/plugin-remove-empty 
SYNC missed versions from official npm registry.

@putout/plugin-remove-empty NPM version

????Putout plugin adds ability to find and remove:

  • empty blocks;
  • empty static blocks;
  • empty patterns;
  • empty arguments;

Install

npm i @putout/plugin-remove-empty

Rules

Config

{
    "rules": {
        "remove-empty/block": "on",
        "remove-empty/static-block": "on",
        "remove-empty/pattern": "on",
        "remove-empty/nested-pattern": "on",
        "remove-empty/argument": "on"
    }
}

block

-if (2 > 3) {}

static-block

Check it out in ????Putout Editor.

class Hello {
-    static {
-    }
}

pattern

-const [] = array;
-const {} = object;

nested-pattern

❌ Example of incorrect code

export const func = (param) => {
    const {
        a: {
        },
        c,
    } = param;
    
    return c;
};

✅ Example of correct code

export const func = (param) => {
    const {c} = param;
    return c;
};

arguments

Checkout in ????Putout Editor.

❌ Example of incorrect code

const create = ({} = {}) => 'hello';

module.exports = ({rule, plugin, msg, options}, {}) => {};

const a = {
    EmptyStatement({}) {},
};

✅ Example of correct code

const create = () => 'hello';

module.exports = ({rule, plugin, msg, options}) => {};

const a = {
    EmptyStatement() {},
};

License

MIT

Current Tags

  • 15.0.0                                ...           latest (10 months ago)

52 Versions

  • 15.0.0                                ...           10 months ago
  • 14.0.0                                ...           a year ago
  • 13.0.1                                ...           a year ago
  • 13.0.0                                ...           a year ago
  • 12.1.0                                ...           2 years ago
  • 12.0.0                                ...           2 years ago
  • 11.0.0                                ...           2 years ago
  • 10.4.0                                ...           3 years ago
  • 10.3.0                                ...           3 years ago
  • 10.2.0                                ...           3 years ago
  • 10.1.0                                ...           3 years ago
  • 10.0.0                                ...           3 years ago
  • 9.2.0                                ...           3 years ago
  • 9.1.0                                ...           4 years ago
  • 9.0.0                                ...           4 years ago
  • 8.2.0                                ...           4 years ago
  • 8.1.0                                ...           4 years ago
  • 8.0.0                                ...           4 years ago
  • 7.1.0                                ...           4 years ago
  • 7.0.0                                ...           4 years ago
  • 6.1.0                                ...           4 years ago
  • 6.0.0                                ...           5 years ago
  • 5.5.0                                ...           5 years ago
  • 5.4.1                                ...           5 years ago
  • 5.4.0                                ...           5 years ago
  • 5.3.0                                ...           5 years ago
  • 5.2.0                                ...           6 years ago
  • 5.1.0                                ...           6 years ago
  • 5.0.0                                ...           6 years ago
  • 4.0.1                                ...           6 years ago
  • 4.0.0                                ...           6 years ago
  • 3.1.1                                ...           7 years ago
  • 3.1.0                                ...           7 years ago
  • 3.0.0                                ...           7 years ago
  • 2.9.0                                ...           7 years ago
  • 2.8.0                                ...           7 years ago
  • 2.7.0                                ...           7 years ago
  • 2.6.1                                ...           7 years ago
  • 2.6.0                                ...           7 years ago
  • 2.5.1                                ...           7 years ago
  • 2.5.0                                ...           7 years ago
  • 2.4.0                                ...           7 years ago
  • 2.3.0                                ...           7 years ago
  • 2.2.0                                ...           7 years ago
  • 2.1.2                                ...           7 years ago
  • 2.1.1                                ...           7 years ago
  • 2.1.0                                ...           7 years ago
  • 2.0.0                                ...           7 years ago
  • 1.1.2                                ...           7 years ago
  • 1.1.1                                ...           7 years ago
  • 1.1.0                                ...           7 years ago
  • 1.0.0                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 1
Dependencies (0)
None
Dev Dependencies (9)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |