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

v6.7.0 broke autofixing for eslint-plugin-react #12614

Closed
ljharb opened this issue Nov 28, 2019 · 1 comment · Fixed by #12616, basics/vector#113, basics/vector#127, thinkwee/thinkwee.github.io#39 or alxtford/numconv#46
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly patch candidate This issue may necessitate a patch release in the next few days

Comments

@ljharb
Copy link
Contributor

ljharb commented Nov 28, 2019

Tests pass on master in https://github.com/yannickcr/eslint-plugin-react on v6.6, and fail on v6.7.0 or v6.7.1. https://travis-ci.org/yannickcr/eslint-plugin-react/jobs/616996307 is an example of the failures; they're related to whitespace placement, within jsx.

I'm not sure which item in the changelog might be responsible, but perhaps #12491 (cc @kaicataldo)?

The change doesn't need to be reverted if i have a reliable way in the react plugin to detect the different behavior, but I suspect that's also difficult.

@ljharb ljharb added bug ESLint is working incorrectly triage An ESLint team member will look at this issue soon labels Nov 28, 2019
ljharb added a commit to jsx-eslint/eslint-plugin-react that referenced this issue Nov 28, 2019

Verified

This commit was signed with the committer’s verified signature.
ljharb Jordan Harband
ljharb added a commit to jsx-eslint/eslint-plugin-react that referenced this issue Nov 28, 2019

Verified

This commit was signed with the committer’s verified signature.
ljharb Jordan Harband
@mysticatea mysticatea added patch candidate This issue may necessitate a patch release in the next few days accepted There is consensus among the team that this change meets the criteria for inclusion and removed triage An ESLint team member will look at this issue soon labels Nov 28, 2019
@mysticatea
Copy link
Member

Thank you for your report.

I confirmed it.
As you mentioned, #12491 has changed the behavior of the isSpaceBetweenTokens() method about JSXText tokens that contain only spaces.

mysticatea added a commit that referenced this issue Nov 28, 2019

Verified

This commit was signed with the committer’s verified signature.
mysticatea Toru Nagashima
)
mysticatea added a commit that referenced this issue Nov 28, 2019

Verified

This commit was signed with the committer’s verified signature.
mysticatea Toru Nagashima
kaicataldo pushed a commit that referenced this issue Nov 30, 2019

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
… (#12616)

* Fix: isSpaceBetween() recognizes spaces in JSXText (fixes #12614)

* apply this fix only for isSpaceBetweenTokens()

* move tests to the section for nodes

* add tests for isSpaceBetween()

* add tests for reversed order
ljharb added a commit to ljharb/eslint-plugin-react that referenced this issue Nov 30, 2019

Verified

This commit was signed with the committer’s verified signature.
ljharb Jordan Harband
This reverts commit 71c7d01.

Thanks to v6.7.2 / eslint/eslint#12616 / eslint/eslint#12614
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators May 30, 2020
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label May 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.