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/code-frame v7.12.13 breaks codeframe formatter #14087

Closed
mdjermanovic opened this issue Feb 10, 2021 · 2 comments
Closed

@babel/code-frame v7.12.13 breaks codeframe formatter #14087

mdjermanovic opened this issue Feb 10, 2021 · 2 comments
Assignees
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion breaking This change is backwards-incompatible formatter Relates to the formatters bundled with ESLint
Projects

Comments

@mdjermanovic
Copy link
Member

The version of ESLint you are using.

ESLint v7.19.0

The problem you want to solve.

codeframe formatter uses @babel/code-frame.

The latest @babel/code-frame v7.12.13 made an intentional change babel/babel#12567 to trim trailing space after | if the source code line is empty.

Before:

  1 | <LF>
> 2 | foo;<LF>
    | ^<LF>
  3 | <LF>

After:

  1 |<LF>
> 2 | foo;<LF>
    | ^<LF>
  3 |<LF>

We agreed that this would be a breaking change in the codeframe formatter, and merged #14067 for ESLint v7.20.0 release to pin "@babel/code-frame": "7.12.11" in order to prevent the change.

However, we probably don't want to stay on "@babel/code-frame": "7.12.11" forever.

Your take on the correct solution to problem.

Upgrade @babel/code-frame dependency in ESLint v8.0.0 as a breaking change in the codeframe formatter.

Are you willing to submit a pull request to implement this change?

Yes.

@mdjermanovic mdjermanovic added breaking This change is backwards-incompatible formatter Relates to the formatters bundled with ESLint labels Feb 10, 2021
@mdjermanovic mdjermanovic self-assigned this Feb 10, 2021
@mdjermanovic mdjermanovic added this to Evaluating in Triage Feb 10, 2021
@mdjermanovic
Copy link
Member Author

This will become obsolete if we remove the codeframe formatter per #14277.

@mdjermanovic mdjermanovic added this to Need Discussion in v8.0.0 Apr 7, 2021
@nzakas nzakas removed this from Need Discussion in v8.0.0 Apr 8, 2021
@btmills
Copy link
Member

btmills commented Apr 12, 2021

Since we decided to remove some formatters, including codeframe, in ESLint v8.0.0, we can close this.

@btmills btmills closed this as completed Apr 12, 2021
Triage automation moved this from Evaluating to Complete Apr 12, 2021
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Oct 10, 2021
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Oct 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion breaking This change is backwards-incompatible formatter Relates to the formatters bundled with ESLint
Projects
Archived in project
Triage
Complete
Development

No branches or pull requests

2 participants