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

deprecate --type-check #3322

Merged
merged 2 commits into from Oct 17, 2017
Merged

deprecate --type-check #3322

merged 2 commits into from Oct 17, 2017

Conversation

ajafff
Copy link
Contributor

@ajafff ajafff commented Oct 15, 2017

PR checklist

  • Addresses an existing issue: #0000
  • New feature, bugfix, or enhancement
    • Includes tests
  • Documentation update

Overview of change:

Deprecated --type-check. It's no longer necessary. Most users don't read the changelog and may not have noticed it.
It breaks consumers that expect a certain output format. And it confuses users, because --exclude does not work as expected.

We should remove it in v6.0

Is there anything you'd like reviewers to focus on?

CHANGELOG.md entry:

[deprecation] CLI argument --type-check is no longer necessary and will be removed in the next major version

@adidahiya adidahiya merged commit 349d1b8 into palantir:master Oct 17, 2017
@ChrisMBarr
Copy link
Contributor

Does this now mean that type checking is always enabled when running tslint? If so, I like it!

@ajafff ajafff deleted the deprecate-type-check branch October 23, 2017 12:17
@ajafff
Copy link
Contributor Author

ajafff commented Oct 23, 2017

@ChrisMBarr type checking and enabling typed rules is not the same thing:

Type checking does a full check of your entire project to find compile errors before the actual linting is done. It does not affect the lint result. This is deprecated now and will be removed in a future release. Type checking should be done by the compiler, not TSLint.

Typed rules are not enabled by default. Technically that's not possible. But you only need --project now to enable typed rules. Before v5.4.0 you needed --project --type-check. The latter is no longer necessary and therefore deprecated.

@ChrisMBarr
Copy link
Contributor

Yes, that's what I meant - thanks! To be fair though a "typed rule" was enabled with a CLI flag named --type-check - so you can see why the terminology is a bit confusing.

But this is a good change, I like it. 1 flag to enable this feature instead of 2 is much better.

@mcalthrop
Copy link

Just following up on this... I am running tslint version 5.7.0, and using VS Code v1.17.2 (currently the latest release).

Per advice in this PR, I have removed the --type-check parameter, and now have this in my "scripts" section of my package.json:

"tslint": "tslint --project ./tsconfig.json",

The issue I now have is that in VS Code no longer highlights type errors.

I realise that tslint is no longer providing this functionality, and any typing error will be flagged at compilation time – but of course I still want to see these errors when developing.

I have done some searching, but not yet found a solution... any ideas?

Thanks in advance.

Matt

@mcalthrop
Copy link

mcalthrop commented Nov 1, 2017

Oops... looks like it was just some kind of refresh issue. I restarted VS Code a couple of times, and now it all works as expected.

As you were! :-D

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

Successfully merging this pull request may close these issues.

None yet

4 participants