Skip to content
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

How to disable type cheking for not ts files #744

Open
max-mykhailenko opened this issue May 1, 2020 · 4 comments
Open

How to disable type cheking for not ts files #744

max-mykhailenko opened this issue May 1, 2020 · 4 comments

Comments

@max-mykhailenko
Copy link

Some of my projects use typescript, some not. But error messages I see across all project.

Type annotations can only be used in TypeScript files.

any

Will be better to check tsconfig file and only if it available — turn on plugin.
What do you think?

@orta
Copy link
Contributor

orta commented May 1, 2020

Is this in a flow file? It might be a good idea to check for a .flowconfig and disable the plugin

@max-mykhailenko
Copy link
Author

Yes, it's flow file with flow pragma on top

@orta
Copy link
Contributor

orta commented May 2, 2020

Yep, then I think I'd take a PR which has a lookup to see if the JS file lives inside a folder with a .flowconfig and disables the type checking.

@DanielRosenwasser
Copy link
Member

DanielRosenwasser commented May 12, 2020

You can also set "enable_language_service_for_javascript": false in your Preferences.sublime-settings instead. I think that's probably more ideal.

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

No branches or pull requests

3 participants