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

[vscode] unexpected to be run on .js files #81

Closed
JounQin opened this issue Feb 22, 2021 · 5 comments
Closed

[vscode] unexpected to be run on .js files #81

JounQin opened this issue Feb 22, 2021 · 5 comments
Labels
enhancement New feature or request fixed and released

Comments

@JounQin
Copy link
Contributor

JounQin commented Feb 22, 2021

image

@plantain-00
Copy link
Owner

plantain-00 commented Feb 22, 2021

What's your tsconfig.json?
js file can be run because typescript supports it withallowJs in tsconfig.json.
If they are in your tsconfig.json files or include but you want to ignore them, use --ignore-files.

@plantain-00 plantain-00 added the question Further information is requested label Feb 22, 2021
@JounQin
Copy link
Contributor Author

JounQin commented Feb 22, 2021

plain js project, and in a ts project without allowJs it still warn on some js config files.

@plantain-00
Copy link
Owner

The vscode plugin can be activated by js file and jsx file because of typescript supports allowJs: https://github.com/plantain-00/type-coverage/blob/master/packages/vscode/package.json#L37-L38
Actually, the vscode typescript and typescript eslint plugin are also checking pure js project, so I think it's OK that this plugin is checking pure js project too.
屏幕快照 2021-02-23 07 45 40

@plantain-00 plantain-00 added the wontfix This will not be worked on label Feb 22, 2021
@JounQin
Copy link
Contributor Author

JounQin commented Feb 23, 2021

This is very unexpected. It should read allowJs of tsconfig.json, if there's no tsconfig.json, it should just ignore .js files IMO.

I have to uninstall it because it's very noise for .js files now.

typescript eslint plugin are also checking pure js project

That's because you enabled it for .js explicitly in eslint config.

VSCode type check for js is controlled by a flag named javascript.validate.enable which is true by default.

@plantain-00 plantain-00 added Investigating and removed wontfix This will not be worked on labels Feb 23, 2021
@plantain-00
Copy link
Owner

js file validation now is in configuration and disabled by default.
屏幕快照 2021-02-28 12 31 17

@plantain-00 plantain-00 added enhancement New feature or request fixed and released and removed Investigating question Further information is requested labels Feb 28, 2021
@JounQin JounQin closed this as completed Feb 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fixed and released
Projects
None yet
Development

No branches or pull requests

2 participants