Skip to content

[Babel 8] Ignore config files by default for eslint-parser#16871

Closed
liuxingbaoyu wants to merge 2 commits intobabel:mainfrom
liuxingbaoyu:eslint-parser-config
Closed

[Babel 8] Ignore config files by default for eslint-parser#16871
liuxingbaoyu wants to merge 2 commits intobabel:mainfrom
liuxingbaoyu:eslint-parser-config

Conversation

@liuxingbaoyu
Copy link
Member

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

I changed the order and added browserslistConfigFile: false.

@liuxingbaoyu liuxingbaoyu added PR: Polish (next major) 💅 A type of pull request used for our changelog categories for next major release area: eslint labels Sep 27, 2024
@babel-bot
Copy link
Collaborator

babel-bot commented Sep 27, 2024

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

@liuxingbaoyu liuxingbaoyu marked this pull request as draft September 27, 2024 19:07

return getDefaultParserOptions(parseOptions);
}
if (process.env.BABEL_8_BREAKING) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't @babel/eslint-parser release a major without bumping other packages?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's just for simplicity. :)
But it may change in the future.

@liuxingbaoyu liuxingbaoyu marked this pull request as ready for review January 19, 2025 17:23
@nicolo-ribaudo
Copy link
Member

What was the motivation for this?

@liuxingbaoyu
Copy link
Member Author

Loading configuration files can be slow, so this improves performance over the default.

@nicolo-ribaudo
Copy link
Member

Mh, in which case would somebody want to use @babel/eslint-parser but without checking which syntax plugins to enable? 🤔 If they are using it with no syntax plugins, they may as well just use the default ESLint parser.

@fisker
Copy link
Contributor

fisker commented Mar 27, 2025

I thought there was an agreement to change it somewhere.

As one uses @babel/eslint-parser, but not using any babel transform, I use it only because espree is slow to add new features (at least it was before).

I just want to say there are too many falses to pass, and I didn't even know there are

      ignore: null,
      only: null,
      browserslistConfigFile: false,

This is what I use usually https://github.com/sindresorhus/eslint-plugin-unicorn/blob/eb08fc523c3229722df167d91095cf4f5f5895be/test/utils/parsers.js#L21

Search for @babel/eslint-parser requireConfigFile: false on github, there seems a lot result

If we don't want change the default behavior, can we make it simpler to config?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: eslint PR: Polish (next major) 💅 A type of pull request used for our changelog categories for next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants