Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is there a way to only lint on save

See original GitHub issue

It seems a lot of VS Code native linters and microsoft-sponsored extensions have this option, the python extension has "python.linting.lintOnSave": true

Would it be possible to add this or is there an option already there that I haven’t noticed?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

robwaltoncommented, Mar 16, 2018

I think that being able to either lint only on save, or enable/disable linting is important while writing (maybe I’ve missed this option). More precisely, it would be nice to have a way of hiding, or pausing linter highlighting in the editor.

Two reasons why:

  1. While writing creatively it is just nice not to be interrupted by the linter. This is why its nice to be able to disable live spell checking for example. (Thanks for providing a way to disable the lightbulb! Thats made it much less distracting.)
  2. With MD009/no-trailing-spaces enabled you get a lint warning every time you press the space bar while writing and pause for ~ 1/3 of a second. I have this off now as its just too distracting, but would like to reanable it.

So although its awesome to have the linter, I find that having it marking up the editor all the time to be distracting. I’m not sure if enable/disable or lint only on save would be a better way of solving this.

robwaltoncommented, Mar 16, 2018

Thats great thanks! Open source is a funny old thing with strangers demanding free improvements eh?!

If it helps, these are the settings for the linters that came built in (I’m pretty sure):

// Whether the linter is run on save or on type.
"": "onSave",

// Run the linter on save (onSave) or on type (onType)
"": "onType"
Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Enable Linting on Save with Visual Studio Code and ...
Learn how to lint your code on every file save using ESLint rules and VS Code settings.
Read more >
Only lint typescript when saving file in VSCode - Stack Overflow
As of VS Code 1.41, there is no VS Code setting for this. Here is a feature request. As a workaround: Disable live...
Read more >
Does Python Linting only run upon Save? : r/vscode - Reddit
There isn't a way to lint as you type and our current recommendation is to turn on limiting when you save and have...
Read more >
How to run ESLINT on save (VS Code) - YouTube
Daily Webdev Newsletter:$100 DigitalOcean hosting coupon: ...
Read more >
How to Format Code on Save in VS Code with ESlint
People typically only do this if some developers on their team are using a different editor that maybe doesn't support formatting code on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found