markdownlint icon indicating copy to clipboard operation
markdownlint copied to clipboard

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

Open o-l-a-v opened this issue 1 year ago • 4 comments

[!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?

  • If yes: Sorry for creating this issue, I could not find out how from a brief search.
  • If no: I request this feature.

o-l-a-v avatar Jul 09 '24 18:07 o-l-a-v

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

DavidAnson avatar Jul 10 '24 00:07 DavidAnson

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.

o-l-a-v avatar Jul 10 '24 17:07 o-l-a-v

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

DavidAnson avatar Jul 10 '24 23:07 DavidAnson

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

o-l-a-v avatar Jul 11 '24 07:07 o-l-a-v