denoland / deno_lint

Blazing fast linter for JavaScript and TypeScript written in Rust
https://lint.deno.land/
MIT License
1.51k stars 163 forks source link

fix: allow blank lines and comments in cases that do not stop execution #1275

Closed koh28 closed 3 weeks ago

koh28 commented 1 month ago

Fixes #1196

This PR allows:

switch (number) {
  case 1:
    // comment
  case 2:
    doSomething();
}
switch (number) {
  case 1:

  case 2:
    doSomething();
}

but does not allow:

switch (number) {
  case 1:
    // comment
    doSomething();
  case 2:
    doSomething();
}
CLAassistant commented 1 month ago

CLA assistant check
All committers have signed the CLA.

bartlomieju commented 1 month ago

Hey @koh28, thanks for the PR. Can you please sign the CLA so we can land this PR?

koh28 commented 1 month ago

I signed it