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

not-es6 rule for String#normalize triggers on Node#normalize #120

Open
edg2s opened this issue Nov 20, 2018 · 4 comments
Open

not-es6 rule for String#normalize triggers on Node#normalize #120

edg2s opened this issue Nov 20, 2018 · 4 comments

Comments

@edg2s
Copy link
Member

edg2s commented Nov 20, 2018

Node#normalize is valid ES5, so shouldn't warn.

@MatmaRex
Copy link
Contributor

For other similar conflicts, instead of "no-restricted-properties" we have rules using "no-restricted-syntax" which try to avoid the false positives, but I don't see a way to distinguish these two methods when just looking at the syntax. It might be okay to just document this limitation, and for users to selectively disable the check for each use of Node#normalize? If it's not okay, then I guess we'll have to remove this check.

@jdforrester
Copy link
Member

Given that Node#normalize is so rare I think it's probably fine just to document it.

@jdforrester
Copy link
Member

Ping. Do we want to just document it and leave it at that?

@Krinkle
Copy link
Member

Krinkle commented Jul 19, 2019

Sounds good to me. If it was a common method, perhaps the false negatives would outweigh the benefit of the true positives. But given it's rare, having to disable it in a few places and/or to opt-out the rule in a whole repo, seems worth it for everything else.

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

No branches or pull requests

4 participants