iflix / standard

:star2: JavaScript Standard Style Guide
http://standardjs.com
MIT License
0 stars 0 forks source link

no-new-* #3

Open obrin opened 7 years ago

obrin commented 7 years ago
SomeoneWeird commented 7 years ago

defs - there's no reason you should be doing new primitive() at all, usually it's much slower than just doing [] or {} etc

joshgillies commented 7 years ago

Would no-new rule error on: new Promise()?

obrin commented 7 years ago

Good question, I'm not sure. But we should either be assigning a new Promise to a variable or returning it within a function either ways. Not sure if the later works.