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:
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
- Update: merge warnings of consecutive unreachable nodes (fixes #6583) — committed to eslint/eslint by mysticatea 8 years ago
- Update: merge warnings of consecutive unreachable nodes (fixes #6583) (#6729) — committed to eslint/eslint by mysticatea 8 years ago
Assuming that @markelog’s “SGTM” is the same as 👍, marking as accepted.