1.1.0 β’ Published 2 years ago
@putout/plugin-remove-useless-assign v1.1.0
@putout/plugin-remove-useless-assign
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