Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
requireVarDeclFirst vs const/let #1783
@markelog when requireVarDeclFirst was implemented I did not consider ES6 at that time. I think I could look into allowing let to have block scope. This might take sometime though, is it a time critical requirement or can we let #1069 get released without the requireVarDeclFirst rule and add that to the preset once I can swing around to fix it. I am looking into a 3-4 weeks time frame as the past 2 weeks will be tight for me to look into this. :)
Actually, now that I've thought about it, I'm surprised this rule gets triggered at all. Seems it would specifically be looking for var. Just a suggestion, it's your product and it's a good one but I'd split the rule.
requireVarDeclFirst - only look at var