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

How to lint cosmiconfig files? #667

Closed
titanism opened this issue Jun 7, 2022 · 1 comment
Closed

How to lint cosmiconfig files? #667

titanism opened this issue Jun 7, 2022 · 1 comment

Comments

@titanism
Copy link

titanism commented Jun 7, 2022

It still seems like there's no workaround for cosmiconfig file linting, or perhaps our usage is wrong.

For example, .xo-config.js is not linted, nor is .remarkrc.js and .pug-lintrc.js.

We've tried adding extensions: [''] and extensions: ['.xo-config.js'] even as a test to the XO config, but it still isn't linting those files. Not all config files support non-dotfile naming conventions, which makes this impossible to lint. We've also tried checking --print-config output too, and nothing seems to fix it.

Curious if you have a workaround @sindresorhus? And if so, what is it so we can document it?

@titanism
Copy link
Author

titanism commented Jun 7, 2022

This seems to fix the issue:

echo '!.*.js' >> .eslintignore

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

No branches or pull requests

1 participant