-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
AMP Runtime: allow usage of iterator/destructure/spread/rest #35694
Comments
After local testing I believe:
|
This won't catch uses like |
Sure. That sounds like a new eslint rule. Also I've never seen anyone use destructure to assign to a property before...its terrifying |
On closer inspection, doesn't it still work? The case you just highlighted is about using an ArrayPattern to assign to a property. I think we'd want to throw when only seeing a private only used as an lvalue |
It doesn't detect that it's being written, it thinks it's being read. Which will incorrectly flag the field as being used. |
I'm going to descope |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
Description
Awhile back we decided to start allowing for iterator to be used (#34249). The logic was that it only adds 0.12kb to any bundle which uses it, and only
.js
builds as opposed to.mjs
builds. We started implementation of this change, but ran into roadblocks (#34282 (review))To do:
Update these plugins/rules to handle
ArrayExpression
:build-system/eslint-rules/prefer-destructuring.jsCan be removed:
cc @ampproject/wg-performance
The text was updated successfully, but these errors were encountered: