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

Apply lint rules via shortcut #13

Closed
Kyslik opened this issue Aug 2, 2017 · 9 comments
Closed

Apply lint rules via shortcut #13

Kyslik opened this issue Aug 2, 2017 · 9 comments

Comments

@Kyslik
Copy link

Kyslik commented Aug 2, 2017

Is there a way how to apply lint rules via shortcut?

@DavidAnson
Copy link
Owner

When installed, vscode-markdownlint runs its rules after every change to the document. What would the shortcut do differently? Can you give more detail, please?

@Kyslik
Copy link
Author

Kyslik commented Aug 2, 2017

What I mean is actually auto-format it.

So lets say I have a document readme.md like

## About
Some information about...

So linter yells at me with rule 2, 22 and 41 I want to hit a shortcut to automatically apply suggestions, without manually amending the file (adding white-space, removing one #...), let the editor do that for me.

Is that possible?


In intelliJ IDEs its alt+cmd+L

@DavidAnson
Copy link
Owner

Got it! In some cases, I think it should be possible to safely modify the file to fix issues. I'll think more about this. Thanks!

@Kyslik
Copy link
Author

Kyslik commented Aug 2, 2017

I think it should be separate package since this is "linter" and should only lint. TSlint does auto-formatting as well (see this).

I have some free time, maybe I will check options out. do you have any source (tutorials, guides) on how to create ext for VSCode? https://code.visualstudio.com/docs/extensions/example-hello-world

@Danilux
Copy link

Danilux commented Aug 19, 2017

I was looking for the same feature, eslint has "eslint.autoFixOnSave": true, and it's so sweet, please consider this.

@Kyslik
Copy link
Author

Kyslik commented Aug 19, 2017 via email

@ChrisChinchilla
Copy link

@DavidAnson Following up here, from my experiences with Atom, tidy markdown seems to format code based on the same rules that mdlint follows, so in theory, this extension should work

https://github.com/Tehnix/vscode-tidymarkdown

@irvnriir
Copy link

irvnriir commented May 2, 2019

@Kyslik , For you to note, "Auto" mean doesn't require a trigger(which is the "shortcut" in your case).

@Kyslik Kyslik changed the title Auto-formatting Apply lint rules via shortcut May 3, 2019
@Kyslik
Copy link
Author

Kyslik commented May 3, 2019

@Ilias48rus renamed

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

5 participants