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

babel-parser: Add new internal ESLint rule to consistent error messages #13130

Conversation

sosukesuzuki
Copy link
Member

Q                       A
Fixed Issues? N/A
Minor: New Feature? Y
Tests Added + Pass? Yes
License MIT

I have been concerned about the inconsistent in the format of error messages. However, tools such as Prettier use error messages as their interface, and It wasn't able to fixed.
With the introduction of error codes in 7.14, it is now easier to fix error messages.
So I created an Internal ESLint rule to enforce the format of error messages.
What do you think about this?

@sosukesuzuki
Copy link
Member Author

Oh, this PR includes huge diffs.. But almost diff are updating snapshots.

@babel-bot
Copy link
Collaborator

babel-bot commented Apr 9, 2021

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

@codesandbox-ci
Copy link

codesandbox-ci bot commented Apr 9, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 207f2fb:

Sandbox Source
babel-repl-custom-plugin Configuration
babel-plugin-multi-config Configuration

Copy link
Contributor

@JLHwung JLHwung left a comment

Choose a reason for hiding this comment

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

LGTM.

Note for reviewers: I suggest reviewing the first 3 commits, the others are snapshot changes.

@JLHwung JLHwung added the PR: Polish 💅 A type of pull request used for our changelog categories label Apr 9, 2021
Copy link
Member

@existentialism existentialism left a comment

Choose a reason for hiding this comment

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

💯

js-choi added a commit to js-choi/babel that referenced this pull request Apr 9, 2021
Copy link
Member

@kaicataldo kaicataldo left a comment

Choose a reason for hiding this comment

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

🎉

js-choi added a commit to js-choi/babel that referenced this pull request Apr 9, 2021
js-choi added a commit to js-choi/babel that referenced this pull request Apr 9, 2021
js-choi added a commit to js-choi/babel that referenced this pull request Apr 9, 2021
@nicolo-ribaudo
Copy link
Member

nicolo-ribaudo commented Apr 9, 2021

I rebased feat-7.14.0/parser-updates: after rebasing this PR, the tests pass will pass I think..

@nicolo-ribaudo nicolo-ribaudo merged commit c0f4009 into babel:feat-7.14.0/parser-updates Apr 11, 2021
@nicolo-ribaudo
Copy link
Member

Thanks! I had to reword the commit message a bit so that it doesn't get cropped by GH's ui.

@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 Jul 12, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 12, 2021
@sosukesuzuki sosukesuzuki deleted the report-error-message-format branch November 30, 2021 20:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: errors area: eslint outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: parser PR: Polish 💅 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants