feat(lint): prefer spread over Object.assign call

This commit is contained in:
Berkeley Martinez
2016-12-29 16:51:51 -08:00
parent 31960fee90
commit 44a0aeceb7
5 changed files with 34 additions and 34 deletions

View File

@@ -41,7 +41,10 @@ export default function promo(Promo) {
.then(function({ count = 0 } = {}) {
log('job', count);
if (count) {
return Object.assign({}, promo, { name: `${code} Discount` });
return {
...promo,
name: `${code} Discount`
};
}
return Promise.reject(new Error(
`Job ${id} not found`