Does anyone have JSHint working correctly for const?

JSHint keeps giving me these warnings about redeclaring const variables, in cases like this:

if( outOfChocolat ) {
    const cake = "Carrot Cake";
} else {
    const cake = "Chocolat Cake";
}

Which shouldn’t be the case, because const is block-scoped.

I’ve tried multiple settings, and this issue has me convinced it should work correctly.
Anyone got this working?

I never bothered, I do find replace on my const and other things that screw with it. If this works thats pretty cool and I might stop find replace.

I dont get a error on shint.com
’const’ is available in ES6

But … to make it easier and clearer …

const cake = outOfChocolat ? "Carrot Cake" : "Chocolat Cake";

Thanks, that narrowed it down. I ran the JSHint CLI and got no warning there either.
So apparently there is something wrong with the sublime plugin I’m using.

Hahaha, not a real life example man. I’m not actually building a cake baking addon :stuck_out_tongue:

Edit: I think the developer of the plugin has abandoned the project and has the plugin running on an older version of JSHint. Shame. I’m talking about the “JSHint Gutter” plugin btw.

Edit 2: SublimeLinter-jshint seems to be a great alternative.