question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Suggestion to add switch

See original GitHub issue

Does it make sense to add switch Because it’s not clear add spaces before case or not

switch (expression) {
  case expression:
    statements
    break;
  default:
    statements
}

Or

switch (expression) {
case expression:
  statements
  break;
default:
  statements
}

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:5

github_iconTop GitHub Comments

4reactions
kevinrenskerscommented, Jul 31, 2015

You might want to change your eslint config now that 1.0.0 has been released:

"indent": [2, 2, {"SwitchCase": 1}],

0reactions
ljharbcommented, Oct 9, 2015

fwiw I agree that if it’s here, the first example (https://github.com/airbnb/javascript/issues/296#issuecomment-91070293) should be the one enforced by the config - however, I’d prefer to ban switch altogether 😃 although that should be a different discussion.

Read more comments on GitHub >

github_iconTop Results From Across the Web

18 Hidden Nintendo Switch Tips and Tricks for Gaming Fans
Give your Nintendo Switch, OLED Switch, or Switch Lite gaming session a boost with our top tips and tricks.
Read more >
How to Add Friends - Nintendo Support
In this article, you'll learn how to add friends on Nintendo Switch. ... Friend Suggestions: Select this option to send friend requests to...
Read more >
Nintendo Switch | How to Add and Send Friend Requests
Here's how to add and send friend requests on Nintendo Switch.Don't forget to ▻ Like ▻ Comment ▻ Subscribe for daily gaming videos!...
Read more >
Nintendo Switch's 5.0.0 Update Adds Friend Suggestions
Nintendo has rolled out an update for the Switch that adds new ways to add friends. Now instead of plugging in a lengthy...
Read more >
Suggestion - Switch case - Alice Community
Suggestion - Switch case Suggestion Box. ... and down of the last case, a button to add a new case. Its a good...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found