@putout/plugin-remove-useless-assign
🐊Putout plugin adds ability to remove useless assign
Last updated 3 years ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @putout/plugin-remove-useless-assign 
SYNC missed versions from official npm registry.

@putout/plugin-remove-useless-assign NPM version

The Object.assign() method copies all enumerable own properties from one or more source objects to a target object. It returns the modified target object.

(c) MDN

🐊Putout plugin adds ability to remove useless assign. Check it out in 🐊Putout Editor.

Install

npm i @putout/plugin-remove-useless-assign

Rule

{
    "rules": {
        "remove-useless-assign": "on"
    }
}

❌ Example of incorrect code

const load = stub().rejects(assign(Error('LOAD USED')));

✅ Example of correct code

const load = stub().rejects(Error('LOAD USED'));

License

MIT

Current Tags

  • 1.1.0                                ...           latest (3 years ago)

2 Versions

  • 1.1.0                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (6)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE