-
Notifications
You must be signed in to change notification settings - Fork 87
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
feat: add dot option to treat dots as normal characters #167
feat: add dot option to treat dots as normal characters #167
Conversation
This change makes sense, but I would like to hear from others before making it. The conventional behavior of dot files/directories is to be hidden by default and that's how the tool currently behaves. As you show above, it is already possible to override this behavior if that's what you want. If we agree to change this behavior, one approach is what you've shown here and another would be to add a new option for this. The advantage of a new option would be that the default behavior does not change and remains consistent with dot file convention - rather than forcing everyone into this new behavior. |
I agree, we should avoid breaking changes! 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to the minor comments above, there should be two new test cases to verify this behavior. One should verify a dot file and dot directory is ignored without the option and the other should verify the file and directory are included with the option. Thanks!
Sure, it's always better to add automated tests! 😄
The options weren't sorted alphabetically, I sorted all the options correctly, feel free to tell me if it's wrong or you thought of something else. |
This looks good, thank you! As I mentioned above, I'd like to give other people a couple of days to have a look and see if they agree. In the meantime, it might be nice to add something like |
Right, I added
Now it's only a new option, and it doesn't affect the old behavior so we could merge this faster, but it's up to you of course! @DavidAnson |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Yes, I feel better as an option, and will include this with the upcoming release.
Hey! 👋
Thanks for this CLI tool to use
markdownlint
. 👍I'm using the CLI tool like this :
markdownlint '**/*.md' --ignore node_modules
but currently folders like.github
are ignored, so myCONTRIBUTING.md
,PULL_REQUEST_TEMPLATE.md
etc files are ignored.The current workaround is to use the CLI like this :
markdownlint '**/*.md' '.*/**/*.md' --ignore node_modules
.I don't think it is wanted, in my opinion, when we're setting this globbing
'**/*.md'
, it means we want to lint EVERY markdown files in the project, regardless of their location in the folder structure, including folders with a dot.The fix seems simple, we need to set
dot: true
in theglob
options.See: https://www.npmjs.com/package/glob#dots
Just to test I edited myself the source files in the
node_modules
with the fix of this PR, and it is indeed fixing the issue.