Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: config option to disable linting unless a markdownlint file exists #266

Open
jcmrva opened this issue Dec 3, 2022 · 1 comment

Comments

@jcmrva
Copy link

jcmrva commented Dec 3, 2022

After installing the extension, I noticed it lints every markdown file even when there's no .markdownlint present.

In repos I don't maintain, this results in a ton of lint highlights I don't feel like I should fix.

I'd prefer to avoid having to enable/disable the extension per-workspace or toggleLinting every time.

@DavidAnson
Copy link
Owner

As you point out, disabling the extension per workspace is natively supported by VS Code and a reasonable approach: https://code.visualstudio.com/docs/editor/extension-marketplace#_disable-an-extension

My concern with trying to auto-detect repositories is that there are many configuration file names that could be used to configure markdownlint-cli2 and there are no requirements for one of them to exist in the root of a project.

An alternate idea would be to let the user control the default value of toggleLinting. In your case, maybe defaulting it off would be better? Of course, then you're in the opposite situation where you need to remember to enable it for workspaces you care about.

There are other ways a workspace could opt in or out of linting, but you want the default (untouched) behavior for a repository to be off and I don't want everybody to have to opt their repositories in to keep linting working. I could add an option to look for a workspace configuration to specify the default for toggleLinting (i.e., two new settings), but I'm worried that's a lot of complexity for something that's only come up once so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants