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

Option to ignore .d.ts files #847

Closed
louy opened this issue Dec 2, 2015 · 4 comments
Closed

Option to ignore .d.ts files #847

louy opened this issue Dec 2, 2015 · 4 comments

Comments

@louy
Copy link
Contributor

louy commented Dec 2, 2015

In my projects all .d.ts files are automatically generated and I don't want to lint them. This means that I can't just `tslint **.ts" because that'd include them as well. What I end up doing is

find -name *.ts . -echo0 | grep -i .d.ts | grep -i node_modules | xargs tslint

which is really annoying.

Related: #692 #680

@louy
Copy link
Contributor Author

louy commented Dec 2, 2015

I can submit a PR for this if #827 gets merged.

@louy
Copy link
Contributor Author

louy commented Dec 6, 2015

@adidahiya What do you think?
Anyway it's as simple as pushing "**/*.d.ts" to GLOB_IGNORE in #857.
An --ignore option would do as well.

@giladgray
Copy link

I'd like a way to do this in config. Perhaps an ignore block in tslint.json?

For instance, Atom insists on linting the .d.ts files in my typings directory, which rarely conform to my tslint config because they come from the wider world. Also those files can be enormous (react.d.ts is 2200+ lines) so it'd probably shave off some loading time if they weren't linted.

@ajafff
Copy link
Contributor

ajafff commented Oct 12, 2017

#1006 added the ability to specify exclude patterns via CLI
When linting with --project *.d.ts files are excluded.

@ajafff ajafff closed this as completed Oct 12, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants