question-mark
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.

Support auto-fix on save and/or quick fix for problems that can be --fix ed

See original GitHub issue

This is a feature of the old tslint vscode plugin but not of the service-based one. Previously autofixable rules have to either be autofixed externally or completely manually.

The “Quick fix” menu also shows “no code action available” even on lint warnings that there are autofixers; for example, the ordered-imports rule or the semi rule.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:18
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
vincasltcommented, Nov 18, 2018

You can find the ‘auto-fix’ by: a) clicking on some underlined code, and clicking on the light bulb icon that appears nearby. b) opening “Problems” view in vscode (ctrl+p -> View: Focus Problems) and right clicking.

You will not be able to bind this to a keyboard shortcut at the moment. To enable quickfix command from vscode is the responsibility of vscode-typescript-tslint-plugin. It’s currently in the works, so it doesn’t have that functionality yet as well. You can see the progress in the roadmap.

0reactions
mjbvzcommented, Jan 21, 2019

TS plugins cannot reasonable implement auto fix on save today as plugins have no concept of “save”. See my proposal against TS to support this: https://github.com/Microsoft/TypeScript/issues/29452

For the VS Code extension that ships this plugin, we are tracking support with https://github.com/Microsoft/vscode-typescript-tslint-plugin/issues/2 and should be able to offer a preview of this functional shortly

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Fix Erectile Dysfunction In 5 Steps | Superdrug™
To deal with your erection problems you can choose from: Medication or devices. Exercise and lifestyle changes. Therapy or counselling. Surgery.
Read more >
Simple Trick to Cure ED: Is There One? - Hims
Unfortunately, ED is a more complicated sexual health problem than one “life hack” will ever solve. The good news is there are plenty...
Read more >
9 Best Natural Treatments for Erectile Dysfunction for 2022
The best treatments for erectile dysfunction can include natural remedies, like changes to diet and alcohol consumption, and doctor-prescribed medication.
Read more >
11 natural remedies for erectile dysfunction (ED)
Erectile dysfunction (ED) is common and treatable. Many treatments exist, including prescription drugs, natural remedies, and ED devices. Learn more here.
Read more >
Auto Fix on Save : r/vscode - Reddit
I recently saw a video where after saving a file in vscode all the eslint and prettier issues were auto fixed on the...
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found