-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Don’t ignore dotfiles by default #55
Comments
I’d rather add support for negated patterns rather than change the default? |
Personally I have yet to find a situation where I want to skip checking for a dotfile. All of my projects explicitly unignore them for ESLint. Also Prettier for example doesn’t ignore dotfiles by default. |
prettier takes |
Personally not a fan 😅 Anyway, this doesn’t ignore dotfiles either. |
ah it’s xo, which I was thinking of.
Same.
It ignores many dotfiles. Which is what I’m trying to point out (earlier point):
There are some cases where dotfiles should be checked. There are many cases where dotfiles shouldn’t be checked. Are there common cases, other than |
How acceptable do you see the alternative? |
I can think of many more cases of dotfiles that I would like to be checked if a linter is available, namely every dotfile I’ve ever checked into source control and has a linter available. I can’t think of any markdown file other than those inside Since this isn’t related specifically to markdown, I can think of a practical list of files that should be linted IMO:
My point is the dot prefix doesn’t make them special. It just means they don’t show up in typical file explorers and There are some special cases of files which I think should be ignored by default, but this determined by their purpose, not their filename:
Typically my
I wouldn’t like it, because IMO this means every repository that has issue templates needs an ignore file to unignore dotfiles. However, changing default behaviour would be a breaking change (semver major), whereas adding the ability to unignore files is a feature (semver minor). |
Copy/pasting and manually syncing your
I think it was a mistake to prefix configuration files with a dot and thus “hide” them. It’s something we’re stuck with though. Agreed they’re not special but I see correlation. And precedence, with ESLint.
Indeed. I’m not 100% that I’m quite happy that |
I don’t see a good enough reason to change the default. It seems to be something where some people prefer one or the other. |
We've found this to be a good solution, since most of our issues were from cosmiconfig's not being linted by XO or eslint: echo '!.*.js' >> .eslintignore |
Can we unignore files starting with a |
Yeah, pass them (or node_modules) as files or globs explicitly. P.s. With time I'm leaning a little more towards favouring this. What's everybody else thinking? |
I’m still in favour of not ignoring dotfiles by default. Recently I’ve been using Changesets in some projects, which uses markdown files in a |
Thanks |
Initial checklist
Problem
IMO it’s a bad practice to exclude dotfiles from a project’s code quality standards such as
remark-lint
. I.e. I don’t understand why one wouldn’t want to check the various markdown files in the.github
or.gitlab
directory.Currently there appears to be no way to include dotfiles, except by explicitly passing the dotfile to the CLI.
I think this idea originates from ESLint (where I also think it’s a bad idea), but at least ESLint allows to unignore dotfiles by adding the following
.eslintignore
file:This doesn’t work for
.remarkignore
.Solution
Don’t ignore dotfiles by default.
Alternatives
Allow to unignore dotfiles.
The text was updated successfully, but these errors were encountered: