-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Closed
Labels
archived due to ageThis issue has been archived; please open a new issue for any further discussionThis issue has been archived; please open a new issue for any further discussionenhancementThis change enhances an existing feature of ESLintThis change enhances an existing feature of ESLintevaluatingThe team will evaluate this issue to decide whether it meets the criteria for inclusionThe team will evaluate this issue to decide whether it meets the criteria for inclusionruleRelates to ESLint's core rulesRelates to ESLint's core rules
Description
What version of ESLint are you using?
3.0.1
What rule do you want to change?
no-fallthrough
What code should be flagged as correct with this change?
/*eslint no-fallback: ["error", { "commentPattern": "[\\w\\s]*fallthrough" }]*/
var foo = ...;
switch(bar) {
case 0: {
if (typeof(foo) == 'string')
return doSomething();
// Otherwise, fallthrough
}
default:
doSomethingElse();
}
What happens when the rule is applied to this code now?
Errors:
Expected a 'break' statement before 'default'.
... Basically I am asking for the rule to support case statements that contain braces.
platinumazure and ManBearTM
Metadata
Metadata
Assignees
Labels
archived due to ageThis issue has been archived; please open a new issue for any further discussionThis issue has been archived; please open a new issue for any further discussionenhancementThis change enhances an existing feature of ESLintThis change enhances an existing feature of ESLintevaluatingThe team will evaluate this issue to decide whether it meets the criteria for inclusionThe team will evaluate this issue to decide whether it meets the criteria for inclusionruleRelates to ESLint's core rulesRelates to ESLint's core rules