New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecate --type-check #3322

Merged
merged 2 commits into from Oct 17, 2017

Conversation

Projects
None yet
4 participants
@ajafff
Copy link
Collaborator

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

ajafff added some commits Oct 15, 2017

@adidahiya adidahiya merged commit 349d1b8 into palantir:master Oct 17, 2017

2 checks passed

ci/circleci Your tests passed on CircleCI!
Details
cla/palantir CLA signed on 2016-11-19 12:05 UTC+00:00
Details
@chrismbarr

This comment has been minimized.

Copy link
Contributor

chrismbarr commented Oct 23, 2017

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

@ajafff ajafff deleted the ajafff:deprecate-type-check branch Oct 23, 2017

@ajafff

This comment has been minimized.

Copy link
Collaborator 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

This comment has been minimized.

Copy link
Contributor

chrismbarr commented Oct 23, 2017

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

This comment has been minimized.

Copy link

mcalthrop commented Nov 1, 2017

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

This comment has been minimized.

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

@tplk tplk referenced this pull request Nov 22, 2017

Open

typeCheck is too slow #76

HyphnKnight added a commit to HyphnKnight/tslint that referenced this pull request Apr 9, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment