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

Filter gitignore'd files #46

Closed
borekb opened this issue Aug 13, 2018 · 3 comments
Closed

Filter gitignore'd files #46

borekb opened this issue Aug 13, 2018 · 3 comments

Comments

@borekb
Copy link

borekb commented Aug 13, 2018

As initially discussed in #44, it would be great if markdownlint could pic up ignore rules from .gitignore files. With a flag suggested by @DavidAnson, it could look like this:

markdownlint --gitignore

(I'd prefer to put it in a config file but that is a generic request, see #45.)

@maxmilton
Copy link

I quite like ESLint's --ignore-path flag, e,g,:

eslint --ignore-path .gitignore .

It also follows linter conventions of supporting a .eslintignore file. Would be cool to support a .markdownlintignore file too since it would likely use the same logic as parsing and loading from .gitignore.

@borekb
Copy link
Author

borekb commented Mar 1, 2019

I now also prefer what @maxmilton said, for example, for ESLint, I can do:

eslint --ignore-path .gitignore --ignore-path .prettierignore ...

which is actually what I'd use for markdownlint as well.

@DavidAnson
Copy link
Collaborator

With the commit for #61, .markdownlintignore is now supported as with .eslintignore. Support for --ignore-path could use this to allow people to point at different files, but I'm hopeful that .markdownlintignore is the right choice most of the time.

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

3 participants