Skip to content

exclude in tsconfig.json doesn't work #593

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

Closed
slikts opened this issue Sep 20, 2015 · 6 comments
Closed

exclude in tsconfig.json doesn't work #593

slikts opened this issue Sep 20, 2015 · 6 comments

Comments

@slikts
Copy link

slikts commented Sep 20, 2015

Adding a directory to the exclude section in tsconfig.json doesn't stop atom-typescript from generating errors about .ts files not being included in the compilation context. The files are supposed to be excluded, so the errors are incorrect.

@basarat
Copy link
Member

basarat commented Sep 21, 2015

IGNORE. I WAS CONFUSED AND THOUGHT IT WAS ABOUT #377

For historical reasons:


Up for grabs

Implementor guidance

Source code needs to go here : tsconfig.ts

For guidance one can use the work done here. Basically add the excludes to the pseudo filesGlob.

@slikts
Copy link
Author

slikts commented Sep 21, 2015

The error isn't affected by excluding the file. errorsForFile() simply checks Project.prototype.includesSourceFile and displays the error if it doesn't. The fix would be to check if the file isn't in an excluded directory before showing the error, but a better fix would be just to remove the error. It's a feature that doesn't play nice with other things, such as using a test runner that compiles TS on its own.

@slikts
Copy link
Author

slikts commented Sep 21, 2015

Also, there could be an option to suppress the error. Currently, there is no way to get rid of it other than adding every .ts file to the project. "Helpful" features like this that are implemented in an unintelligent way are quite annoying.

@basarat
Copy link
Member

basarat commented Sep 22, 2015

Sorry I thought you meant : #377

On second read this is a duplicate of : #558

@slikts the fact is that we don't support lose .ts files, i.e. files that don't have a tsconfig.json associated. So the error could be replaced with another but it would still be an error. Feel free to continue the discussion here : #558 🌹

@basarat basarat closed this as completed Sep 22, 2015
@Zorgatone
Copy link

My files still get compiled even if excluded 😞

@basarat
Copy link
Member

basarat commented Sep 27, 2015

My files still get compiled even if excluded

@Zorgatone if you are using the exclude property, that isn't supported yet : #377

You can use filesGlob in the meantime https://github.com/TypeStrong/atom-typescript/blob/master/docs/tsconfig.md#filesglob

@TypeStrong TypeStrong locked and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants