eslint: [change] Only report first instance of unreachable code

In ESLint 2.11.1 (bundled with Atom linter-eslint), the error for no-unreachable marks every single line of code after the return statement. Maybe this is redundant and it should only mark the first instance of unreachable code? It’s pretty obvious that everything after that line will also be unreachable.

Illustration:

image

Perhaps we could control this via a flag/setting, in case some people do prefer to have every line marked.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 15 (11 by maintainers)

Commits related to this issue

Most upvoted comments

Assuming that @markelog’s “SGTM” is the same as 👍, marking as accepted.