no-fallthrough

This commit is contained in:
Alexander T
2019-06-21 18:32:22 +03:00
parent 9fcaa19ab0
commit 7d449ac13f
21 changed files with 82 additions and 37 deletions

View File

@@ -230,6 +230,7 @@ namespace ts.codefix {
case SyntaxKind.GetAccessor:
case SyntaxKind.SetAccessor:
// TODO: Maybe we should handle this? See fourslash test `refactorConvertToEs6Module_export_object_shorthand.ts`.
// falls through
case SyntaxKind.ShorthandPropertyAssignment:
case SyntaxKind.SpreadAssignment:
return undefined;

View File

@@ -569,21 +569,25 @@ namespace ts.codefix {
case SyntaxKind.AsteriskAsteriskToken:
// MultiplicativeOperator
// falls through
case SyntaxKind.AsteriskToken:
case SyntaxKind.SlashToken:
case SyntaxKind.PercentToken:
// ShiftOperator
// falls through
case SyntaxKind.LessThanLessThanToken:
case SyntaxKind.GreaterThanGreaterThanToken:
case SyntaxKind.GreaterThanGreaterThanGreaterThanToken:
// BitwiseOperator
// falls through
case SyntaxKind.AmpersandToken:
case SyntaxKind.BarToken:
case SyntaxKind.CaretToken:
// CompoundAssignmentOperator
// falls through
case SyntaxKind.MinusEqualsToken:
case SyntaxKind.AsteriskAsteriskEqualsToken:
case SyntaxKind.AsteriskEqualsToken:
@@ -597,9 +601,11 @@ namespace ts.codefix {
case SyntaxKind.GreaterThanGreaterThanEqualsToken:
// AdditiveOperator
// falls through
case SyntaxKind.MinusToken:
// RelationalOperator
// falls through
case SyntaxKind.LessThanToken:
case SyntaxKind.LessThanEqualsToken:
case SyntaxKind.GreaterThanToken: