linter keeps indenting list to 4 chars
See original GitHub issueHello.
Despite my config:
"markdownlint.config": {
"list-marker-space": {
"ul_single": 1,
"ol_single": 1,
"ul_multi": 1,
"ol_multi": 1
}
}
saying to indent all lists to 1 characters, the linter automatically reindent all list to 4 chars:
- a
- b
- c
is transformed to:
- a
- b
- c
The linter complains: MD030/list-marker-space: Spaces after list markers [Expected: 1; Actual: 3] markdownlint(MD030)
Cannot find a way to disable this automatic realignment. Disabling the extension do stop the auto reindent.
Thanks
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Eslint expected indentation of 1 tab but found 4 spaces error
It is my first time using a linter. I keep getting this linting error when using a tab as indentation: severity: 'Error' message:...
Read more >Fix Numbered List Line Indentation On Microsoft Word
This tutorial will show you how to quickly fix that pesky indentation problem of too much space once you get to line number...
Read more >The Black code style - Black 22.12.0 documentation
How Black wraps lines#. Black ignores previous formatting and applies uniform horizontal and vertical whitespace to your code. The rules for horizontal ...
Read more >Configuration · Scalafmt - Scalameta
This parameter defines additional indentation used for the post-comma elements of an extends A, B or derives A, B sequences of a template....
Read more >Linters | golangci-lint
Name Description Presets Since
asasalint ⚙️ check for pass any as any in variadic func(...any) bugs 1.47.0
bidichk ⚙️ Checks for dangerous unicode character sequences...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am unable to reproduce this behavior.
VS Code supports “format on save” for language extensions (that’s what
vscode-formatting-toggle
enables), butmarkdownlint
is not a language extension. I’ve verified that “format on save” does not apply to the auto-fix code actions thatmarkdownlint
does offer, so that should not be relevant here.Furthermore,
markdownlint
in the configuration you show above does not report any lint violations for the sample you show above - which means it won’t offer any auto-fix actions anyway. As you note,markdownlint
doesn’t report a violation until after the edit is applied.Furthermore,
MD030
is not even one of the rules thatmarkdownlint
offers auto-fixes for!Could you please try disabling all VS Code extensions, then enabling only
markdownlint
and confirm that it reports no lint issues for your scenario above? Then enable formatting and let me know if you see the problem? If so, please let me know your VS Code version and send a screenshot of the Extensions panel in VS Code.Thanks!
PS - Here’s my test environment:
@andfinally I couldn’t find ‘disable languages’ but adding file .prettierignore in the root with content *.md seems to work fine as well.
Cheers, Ringo.