segmentio / eslint-config

Segment's ESLint configurations.
9 stars 6 forks source link

prefer-const #45

Closed stephenmathieson closed 8 years ago

stephenmathieson commented 8 years ago

we should stop declaring constants with let. there's no reason for it and it causes bugs/headaches

related: https://github.com/segmentio/app/pull/939

ndhoule commented 8 years ago

Big +1 from me, I've been doing this everywhere and it's definitely better than var or even let in most cases.

@dominicbarnes had feelings on const vs let last we chatted, not sure if those have changed

stephenmathieson commented 8 years ago

dominicbarnes had feelings on const vs let last we chatted, not sure if those have changed

i'll happy argue about the ecmascript spec here if you object @dominicbarnes :p

dominicbarnes commented 8 years ago

Haha, I just felt like const looks weird, it's totally a subjective/silly thing. I'm not opposed to using it here as long as ESLint will help me keep them consistent.