Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

deprecate no-unreachable once implemented in TS compiler #661

Closed
adidahiya opened this issue Sep 16, 2015 · 7 comments · Fixed by #1711
Closed

deprecate no-unreachable once implemented in TS compiler #661

adidahiya opened this issue Sep 16, 2015 · 7 comments · Fixed by #1711

Comments

@adidahiya
Copy link
Contributor

compiler is adding reachability checks soon: microsoft/TypeScript#4788

@adidahiya
Copy link
Contributor Author

Looks like it'll be released in TS 1.8: https://github.com/Microsoft/TypeScript/wiki/Roadmap

@glen-84
Copy link
Contributor

glen-84 commented Feb 26, 2016

1.8 is released now. =)

@adidahiya
Copy link
Contributor Author

@jkillian chatted about this and there is some merit to keeping the TSLint rule around in case users don't want to turn on the compiler error (which would fail builds) but leave it as a linter warning (which may not fail builds). Thoughts?

Personally I'm on board with removing the rule in TSLint 4.0 just to avoid duplicating compiler logic. But if there are objections I could be convinced to keep it around.

@adidahiya adidahiya self-assigned this Feb 26, 2016
@adidahiya adidahiya added this to the TSLint 4.x milestone Feb 26, 2016
@glen-84
Copy link
Contributor

glen-84 commented Feb 28, 2016

Hmm. I don't feel strongly either way, but it seems strange that someone would want to disable this in the compiler and then just ignore the linter warning. Unreachable code is surely a bug that must be fixed immediately? I'm probably not seeing all the use cases, so I guess it's better to get more feedback.

@ghost
Copy link

ghost commented Dec 15, 2016

I'm personally a bit disappointed this lint option was removed. I sometimes like to add a return statement in the middle of a function during development, for debugging purposes. That's why I would disable unreachable code errors in the compiler but keep it enabled in the linter.

@adidahiya
Copy link
Contributor Author

@dbandstra for development workflows: the compiler will produce errors but still transpile your code to JS. Is that not sufficient for debugging?

@ghost
Copy link

ghost commented Dec 16, 2016

Yeah, I'll live hehe. I was a bit late to chime in on this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants