Skip to content

MD053 shouldn't get auto-fixed on save by default (loosing useful content) #306

@fedy-cz

Description

@fedy-cz

TLDR: Lint MD053 Link and image reference definitions should be needed should not be automatic.

Explanation:

While most of the linting rules are probably safe to do automatically "on save", MD053 probably isn't one of them. It breaks (I think a pretty common) workflow:

  1. Build up a list of useful ref-links that I will use later in the document
  2. Write the document itself using the links prepared before

The gotcha:
If I save at any point between 1. and 2. I loose all my ref-links that I didn't use yet.

I can disable the lint completely in the config, but:

  • It's not the default so by the time I realize it's happening I might have lost quite a lot of work
  • I like to have the lint active in the editor (as a reminder). Just don't fix it automatically like the other ones.

As a general rule:

Any lint that could potentially remove useful content should not be applied automatically (at least not by default).

It could be nice to be able to configure each lint at 3 possible levels:

  • ignore
  • hint
  • auto-fix

But the important think is to have reasonable defaults that don't delete potentially useful content automatically.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions