-
Notifications
You must be signed in to change notification settings - Fork 889
deprecate no-unreachable once implemented in TS compiler #661
Comments
Looks like it'll be released in TS 1.8: https://github.com/Microsoft/TypeScript/wiki/Roadmap |
1.8 is released now. =) |
@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. |
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. |
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. |
@dbandstra for development workflows: the compiler will produce errors but still transpile your code to JS. Is that not sufficient for debugging? |
Yeah, I'll live hehe. I was a bit late to chime in on this issue. |
Tests: - Remove two deprecated rules in tslint.json (palantir/tslint#1599 and palantir/tslint#661)
compiler is adding reachability checks soon: microsoft/TypeScript#4788
The text was updated successfully, but these errors were encountered: