Skip to content

Disable javascript validation #209

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

Open
amiralies opened this issue May 1, 2021 · 9 comments
Open

Disable javascript validation #209

amiralies opened this issue May 1, 2021 · 9 comments

Comments

@amiralies
Copy link

I use this server alongside flow lsp. in vscode it's possible to set javascript.validate.enable to false so tsserver doesn't report that type annoations are not allowed in js files.
is there anyway to achieve this?
in general can we have tsserver options supported in this server?

@ybbond
Copy link

ybbond commented May 26, 2021

👍 I am looking for this feature too

@rchl
Copy link
Member

rchl commented Jun 20, 2021

Just to understand your use case better... You want to run the Flow server on JS files and simultaneously this server on the TS files?

@ybbond
Copy link

ybbond commented Jun 21, 2021

Just to understand your use case better... You want to run the Flow server on JS files and simultaneously this server on the TS files?

No, I'd like to run both the flow server and ts server on the JS files. Flow will handle general linting, and ts will handle the 'rest'. For example, a package has no flow-typed definition, but it has *.d.ts definition. So TS will be handy for that particular package.

I am using this server in Sublime's LSP-typescript. In VSCode, setting javascript.validate.enable to false prevent TS validation error such as 'types' can only be used in a .ts file. (ref: VSCode Flow extension page on Ms Store)

I don't know amiralies's use case, but I assume same as mine.

@amiralies
Copy link
Author

Yeah same.

@lvmtam
Copy link

lvmtam commented Jul 31, 2021

i am looking for this option. hope it will be available soon

@predragnikolic
Copy link
Contributor

Do you really need to disable all diagnostics in js files?

There is a option to disable specific diagnostics with the following workspace setting diagnostics.ignoredCodes. See #272 (comment)

@YangShaoyue
Copy link

Same, I use eslint instead, tsserver is installed in Neovim Mason, javascript validation is enabled default, the hint message showing like this:
图片

It's a little annoying and I don't know how to disable it.

@polsust
Copy link

polsust commented Aug 22, 2024

Hey! Did someone find a solution to this ?

I don't understand how to implement @predragnikolic solution

@kocv59
Copy link

kocv59 commented May 14, 2025

While it's possible to disable this in VSCode, it's not an option in Neovim. It would be helpful to allow the setting of diagnostics.ignoredCodes: true to ignore all diagnostic codes in Neovim.

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

No branches or pull requests

9 participants