Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable linting in Visual Studio Code while typing

Premise: When I use Visual Studio Code I want linting on save and I like intellisense.

Nonetheless, I'm annoyed to no end by linting (aka error and warning messages in the form of "[ts/jshint]: here you're missing a semicolon") while I'm typing. They are absolutely useless (I never watch them), distracting, with all that flashy things appearing and disappearing at the bottom of the screen, and yesterday, when my pc was already slowed down for other reasons, it reduced the typing to a crawl.

Since I couldn't find a way to disable linting on typing, I went in the settings and disabled mostly of the TypeScript controls (since they were the worst offenders, useless to me, because I very rarely use a .ts, and anyway I use Flow + jshint, which are more than enough). And, for some magical reasons, it even seemed to disable the linting while typing, leaving active only the one on save.

But then today, when I opened Visual Studio Code, the linting while typing restarted. The (TypeScript) errors are very few now, but there are a few still produced by jshint. Flow, luckily, works as intended and only on save.

So, is there a way to disable the linting while typing, leaving active both intellisense, code completion suggestion and the linting on save?

I have enabled the following extensions: HTML CSS Support 0.2.0, HTML to JavaScript string 0.0.6, JavaScript Booster 0.10.2, jshint 0.10.20, Sorting HTML and Jade attributes 2.1.0, Todo Tree 0.0.116, and vscode-flow-ide 1.2.0.

(Momentarily, I disabled intellisense, to see if it fixed the problem. It didn't.)

like image 458
DrHell Avatar asked Mar 18 '26 14:03

DrHell


1 Answers

As at Feb 2023, the jshint extension is deprecated:

This extension is deprecated. Use the ESLint extension instead.

ESLint has a setting that should achieve this:

eslint.run - run the linter onSave or onType, default is onType.

like image 97
Zaq Avatar answered Mar 20 '26 18:03

Zaq



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!