-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Clarification on behavior of dot directories #12348
Comments
Thank you for your report. Indeed, documentation is not enough. The logic to ignore files has quirks for historical reason. I don't know the reason, but I found some quirks while I implemented #11546 and #12274. The following list is it.
Anyway, I'd like to recommend to configure to unignore dotfiles you want because ignoring dotfiles is essential behavior.
|
Yes, I can unignore manually, but I would like to echo what this person said: #10341 (comment)
I would personally request the following changes:
Thanks! |
I have the same comment. However, ignoring dotfiles is a common behavior. About 1 and 2, PR is welcome. About 3, you can do it once #12274 merged. |
Hello! I'd like to take a stab at this. I use ESLint a lot for work and would enjoy the opportunity to give back. Any pointers on where to focus my attention are appreciated. |
@snhardin For 2, I would recommend editing this section with more details on the implicit ignore patterns eslint automatically applies (see @mysticatea's first comment). Also, the documentation says
But the message shown is different
See https://github.com/eslint/eslint/blob/master/lib/cli-engine/cli-engine.js#L293 For 1, it seems like the code tries to handle this, but the regex isn't good enough: it only matches I can help with 3 after that PR gets closed, but if you get to it before me, go for it |
Hello everyone. Will be submitting a PR for this soon. Thank you for your patience. 🙂 |
Unfortunately, it looks like there wasn't enough interest from the team Thanks for contributing to ESLint and we appreciate your understanding. |
Reopening this because we have an open PR for it. |
Unfortunately, it looks like there wasn't enough interest from the team Thanks for contributing to ESLint and we appreciate your understanding. |
Explicitly listing the .storybook/stories path in the package.json's `test:lint` invocation works for ensuring that things get linted as part of the CI process, but VSCode (or any other editor, for that matter) isn't aware of that and won't flag issues in these files. This leads to multiple "fix warnings" commits and releases that are not working. Instead this commit changes the .eslintignore file to explicitly un-ignore the .storybook directory as advised by eslint/eslint#12348 (comment). Note that this commit also fixes a bunch of now-reported warnings in other files that previously got excluded.
Tell us about your environment
What parser (default, Babel-ESLint, etc.) are you using?
@typescript-eslint/parser
Please show your full configuration:
Configuration
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
What actually happened? Please include the actual, raw output from ESLint.
What did you expect to happen?
client/.storybook/config.js
should be lintedAre you willing to submit a pull request to fix this bug?
Sure?
More details
I see this comment: #4828 (comment)
But it seems like that's not the case, from this test suite:
eslint/tests/lib/cli-engine.js
Lines 355 to 375 in 2204693
The documentation doesn't seem very helpful. Searching for "dot files" doesn't help me, and the section on
.eslintignore
only mentions:Even though I'm not ignoring anything. It's also weird that the message says
File ignored because of a matching ignore pattern
because I don't have a.eslintignore
file in my project.The weird part is that
yarn eslint client/.storybook/
works. Can we get some clarification on this issue (and the expected behavior) in the docs and/or in the CLI?Issues that I've already looked at:
.
by default #10341The text was updated successfully, but these errors were encountered: