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

Overrides field #53

Open
cdfa opened this issue Mar 2, 2019 · 8 comments
Open

Overrides field #53

cdfa opened this issue Mar 2, 2019 · 8 comments

Comments

@cdfa
Copy link

cdfa commented Mar 2, 2019

I think it would be great to specify config overrides for certain files (like overrides in eslint and prettier). I don't think this should be implement in the markdownlint library, because it's easier to do this overriding manually when using the API, but it would be nice if the CLI would support it in some way.

@DavidAnson
Copy link
Collaborator

@DavidAnson
Copy link
Collaborator

@cdfa, in case you are not aware, when using the VS Code extension, it will allow a config file in subdirectories as well as the root of the project. That can be used to customize settings for an entire subdirectory of files. Would that work for your purposes?

@cdfa
Copy link
Author

cdfa commented Mar 2, 2019

Sadly not, I need a different configuration for .mdx files (specifically: disabling the forbidden html tag rule)

@DavidAnson
Copy link
Collaborator

Would it work to run the CLI in two separate passes? The first for *.md and the second for *.mdx (with slightly different settings)?

@cdfa
Copy link
Author

cdfa commented Mar 2, 2019

Yes, I have a mdx only config and passing that using the --config option, but I can't make it "inherit" the default .md config.

@DavidAnson
Copy link
Collaborator

To inherit rules, have you looked at extends? https://github.com/DavidAnson/markdownlint/blob/master/README.md#optionsconfig

@cdfa
Copy link
Author

cdfa commented Mar 2, 2019

Ah, that makes my case possible. I still think it would be convenient to not have to pass the specific config for every extension, but this works. Thank you!

@DavidAnson
Copy link
Collaborator

Cool. I’ll leave this open here for the future, but glad you’re unblocked now!

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