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

Refactor: replace isSameNode with hasSameRange #1036

Merged
merged 1 commit into from
Jan 19, 2021

Conversation

fisker
Copy link
Collaborator

@fisker fisker commented Jan 19, 2021

Nodes has same range didn't mean they are the same node,

example

a

Both Program, ExpressionStatement, Identifier have same range [0, 1].

Add hasSameRange to use it detect shorthands

@fisker fisker marked this pull request as ready for review January 19, 2021 06:24
@sindresorhus sindresorhus merged commit ca2f54f into sindresorhus:master Jan 19, 2021
@sindresorhus
Copy link
Owner

Can you reopen the issue in the main Babel repo? Per babel/babel-eslint#809 (comment)

@fisker fisker deleted the is-same-node branch January 19, 2021 09:09
@fisker
Copy link
Collaborator Author

fisker commented Jan 19, 2021

I'll confirm this bug still exits first, but it doesn't matter, because babel-eslint will have this bug forever...

@sindresorhus
Copy link
Owner

but it doesn't matter, because babel-eslint will have this bug forever...

Sure, but at some point (sooner than later), we'll remove support for babel-eslint and require users to use @babel/eslint-parser.

@fisker
Copy link
Collaborator Author

fisker commented Jan 19, 2021

I've confirmed, this is fixed in @babel/eslint-parser

@fisker fisker mentioned this pull request Apr 25, 2021
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants