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

Clarify doc regarding extension option #433

Closed
wants to merge 1 commit into from
Closed

Conversation

pvdlg
Copy link
Contributor

@pvdlg pvdlg commented Feb 25, 2020

@pvdlg
Copy link
Contributor Author

pvdlg commented Feb 25, 2020

So that's a consequence of #425 that I didn't really forsee.
If this limitation is an issue I can change the code to:

  • First glob for XO config files
  • For each config file get the extension option
  • Glob the files to lint, taking in account the extension config
  • Then call mergeWithFileConfigs

That would allow us to retain the ability to use extensions inside a config file rather than limiting that to CLI arg only. The trade-off is that we would glob 1 + n times (where n is the number of XO config found) instead off once. In the most common case (1 XO config) we would glob 2 times instead of once.

@sindresorhus
Copy link
Member

sindresorhus commented Feb 26, 2020

That would allow us to retain the ability to use extensions inside a config file rather than limiting that to CLI arg only.

Yeah, I think this would be the better and expected behavior. ESLint 7 will also allow specifying extensions in config files: https://eslint.org/blog/2020/02/whats-coming-in-eslint-7.0.0#file-extensions-in-config-files (Maybe look at how they do it?)

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

Successfully merging this pull request may close these issues.

None yet

2 participants