DavidAnson / markdownlint

A Node.js style checker and lint tool for Markdown/CommonMark files.
MIT License
4.71k stars 715 forks source link

[Feature request] Disable auto correct on save for a specific rule? #1288

Closed o-l-a-v closed 1 week ago

o-l-a-v commented 1 month ago

[!NOTE] This is about using the extension in VSCode with "default": true in settings.json.

Example rule MD044 "Proper names should have the correct capitalization".

Is it possible to tell Markdownlint to not perform any auto correct on save for one specific rule? Rather than "MD044": false?

DavidAnson commented 1 month ago

If you have enabled formatOnSave for this extension in VS Code, it will apply fixes for all fixable rules with violations. If you disable a rule via configuration, the extension will not report or fix violations of that rule.

Can you please explain why you want to apply fixes but not for just this one rule?

https://github.com/DavidAnson/vscode-markdownlint?tab=readme-ov-file#fix

o-l-a-v commented 1 month ago

I'd like this rule to only highlight things. Example, ".NET" is usually capitalized, but not always: https://www.nuget.org/packages/JsonSchema.Net.

Instead of disabling checking for ".NET" it'd be useful with the ability to only highlight/warn.

DavidAnson commented 1 month ago

Your scenario is supported today by providing the alternate capitalization for the longer form as shown at the bottom of this sample: https://github.com/DavidAnson/markdownlint/blob/main/test/proper-names-projects.md?plain=1

o-l-a-v commented 1 month ago

Ah, ok. That's even better! Will try it out.