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

Ignored paths are not respected when linting files without extension #156

Closed
jfmengels opened this issue Oct 19, 2016 · 2 comments · Fixed by singapore/gl-got#15 or singapore/lint-condo#258

Comments

@jfmengels
Copy link
Contributor

I am trying to upgrade a project to XO 0.17 (vercel/vercel#79), and in version 0.16, it works fine. When bumping to 0.17, some folders that were previously ignored are now being linted.

I have overridden the extensions option to ["", ".js"] in order to include (bin) files without extensions. At the same test, I have a ignored fixtures folder at test/_fixtures/, while I am linting test/.

What happens is that, at this point, the ignores is properly set and you get all the good files and directories. But, because I have overridden the extensions to allow "", directories are not filtered out. Then when those paths get passed to ESLint, it gets run on the test/ folder, which causes all of its subdirectories, including test/_fixtures to be linted too.

I think that adding the no-dir option to globby would solve the problem, but I am pretty tired so I don't know if that solves it properly without creating new problems 😅

@sindresorhus
Copy link
Member

Yeah, setting nodir might be an ok temp solution, since we don't support $ xo dir currently anyways. The real solution however would be to do sindresorhus/globby#33.

Wanna do a pull request?

@jfmengels
Copy link
Contributor Author

Sounds good, putting it on my todo list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants