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

docs: eslint-parser requireConfigFile behaviour #14332

Merged
merged 2 commits into from Jun 5, 2022

Conversation

JLHwung
Copy link
Contributor

@JLHwung JLHwung commented Mar 4, 2022

Q                       A
Fixed Issues? Fixes #14321
Patch: Bug Fix? Y
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

@JLHwung JLHwung added PR: Bug Fix 🐛 A type of pull request used for our changelog categories area: eslint labels Mar 4, 2022
@babel-bot
Copy link
Collaborator

babel-bot commented Mar 4, 2022

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/51658/

@nicolo-ribaudo
Copy link
Member

nicolo-ribaudo commented Mar 4, 2022

The current behavior is not a bug, but it is purposefully as an option whose only behavior is to suppress an error. Normally a babel.config.json is required when using @babel/eslint-parser (otherwise it throws), and setting requireConfigFile: false makes it optional (that's also why the option is named requireConfigFile: false and not configFile: false). If we want to make this change, it should go in a major because it changes an explicitly designed behavior.

However, what we could do is to make babelOptions.configFile: false imply requireConfigFile: false, so that users don't have to specify both (since they are already explicitly excluding babel.config.json).

@JLHwung JLHwung added PR: Docs 📝 A type of pull request used for our changelog categories and removed PR: Bug Fix 🐛 A type of pull request used for our changelog categories labels Mar 10, 2022
@JLHwung JLHwung changed the title fix: imply babelrc and configFile from requireConfigFile docs: eslint-parser requireConfigFile behaviour Mar 10, 2022
@nicolo-ribaudo nicolo-ribaudo requested a review from hzoo Apr 6, 2022
hzoo
hzoo approved these changes Apr 10, 2022
Copy link
Member

@hzoo hzoo left a comment

maybe add at the end that you need to additional babelOptions (I suppose this is confusing because there's a config boolean option for eslint and another for babel).

maybe add Note:

@nicolo-ribaudo nicolo-ribaudo merged commit ad19401 into babel:main Jun 5, 2022
35 checks passed
@nicolo-ribaudo nicolo-ribaudo deleted the fix-14321 branch Jun 5, 2022
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Sep 5, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: eslint outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Docs 📝 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants