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

New Rule Proposal: no-array-prototype-at and no-string-prototype-at #76

Open
ota-meshi opened this issue Sep 2, 2021 · 0 comments · May be fixed by #84
Open

New Rule Proposal: no-array-prototype-at and no-string-prototype-at #76

ota-meshi opened this issue Sep 2, 2021 · 0 comments · May be fixed by #84

Comments

@ota-meshi
Copy link
Contributor

ota-meshi commented Sep 2, 2021

Please describe what the rule should do:

  • no-array-prototype-at ... Disallow Array.prototype.at and TypedArray .prototype.at method.
  • no-string-prototype-at ... Disallow String.prototype.at method.

These methods will be added in ES2022.

https://github.com/tc39/proposal-relative-indexing-method

Provide 2-3 code examples that this rule will warn about:

var e = array.at(-1);
var e = typedArray.at(-1);
var c = string.at(-1);

Do you think we should rename the rule and to check both arrays and strings?

@ota-meshi ota-meshi linked a pull request Sep 17, 2021 that will close this issue
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 a pull request may close this issue.

1 participant