mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 17:26:22 +03:00
[GH-ISSUE #466] Support for global config in home directory? #2231
Labels
No labels
bug
enhancement
enhancement
enhancement
fixed in next
fixed in next
fixed in next
new rule
new rule
new rule
pull-request
question
refactoring
refactoring
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/markdownlint#2231
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @LandonSchropp on GitHub (Dec 16, 2021).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/466
Many linters have adopted the pattern of first checking the working directory for a config file, and then moving up through the parent directories, checking for the presence of config files. As an example, here's how ESLint handles this.
It'd be awesome if markdownlint could support this pattern. This would allow me to pop a general
.markdownlint.jsonfile in my home directory, as well as specify other.markdownlint.jsonfiles in specific repos.I realize I could manually specify the path to a shared config file, but this is a bit of a pain, especially with markdownlint tightly integrated into Neovim.
Thanks!
@DavidAnson commented on GitHub (Dec 16, 2021):
This sounds like a request for one of the CLI's or maybe the VS Code extension? (This library does no traversal itself.)
https://github.com/DavidAnson/markdownlint#related
None of these go up the parent tree indefinitely, but all support hierarchy - with CLI2 more flexible in this regard. ESLint itself warns about the risks of its indefinite parent design here.
I'm not familiar with the behavior of the Neovim plugin, perhaps your feedback is for it?
@DavidAnson commented on GitHub (Dec 16, 2021):
To be clear, the VS Code extension supports both, but will not mix home directory configuration with project directory configuration. That seems like an unpredictable behavior that sets other contributors (with different home directories) up for surprises and frustration.
@LandonSchropp commented on GitHub (Dec 16, 2021):
Ah, I didn't realize markdownlint-cli was a separate project. I'll ask over there. Thanks!
@LandonSchropp commented on GitHub (Dec 16, 2021):
Sorry, I missed your other comments. I appreciate the quick and thorough replies! 🙂
The Neovim plugin I'm using is null-ls, which wraps several tools and provides LSP interfaces for them. Since LSP support is baked into Neovim by default, this allows a solid integration. I believe markdownlint-cli is the tool that's being used internally by the plugin.
@LandonSchropp commented on GitHub (Dec 16, 2021):
Ah, I just found this in the markdownlint-cli documentation:
So it looks like it already supports what I'm looking for. Thanks again for the help!