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: improve on enforce-ref-last-prop ESLint rule docs #8129

Merged

Conversation

Elijbet
Copy link
Contributor

@Elijbet Elijbet commented Nov 5, 2023

Related Issue: #7669, #7659

Summary

Refactor to improve on enforce-ref-last-prop ESLint rule docs.

@github-actions github-actions bot added the refactor Issues tied to code that needs to be significantly reworked. label Nov 5, 2023
@Elijbet Elijbet added the skip visual snapshots Pull requests that do not need visual regression testing. label Nov 5, 2023
@Elijbet Elijbet marked this pull request as ready for review November 5, 2023 06:57
@@ -1,6 +1,6 @@
# enforce-ref-last-prop

This updates `ref` usage to work around a Stencil bug where ref is called in the specified order and not after initializing element with all its attributes/properties. This can cause attributes/properties to be outdated by the time the callback is invoked.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple nitpicks (applies to the other file as well):

This rule ensures this is a workaround for ...

... where [the] ref is called ...

... after initializing [the] element ...

... make sure [the] ref attribute ...

@jcfranco jcfranco self-assigned this Nov 8, 2023
@jcfranco
Copy link
Member

jcfranco commented Nov 8, 2023

Revisited messaging: added background info to the rule's doc and went a little shorter for related messaging.

@jcfranco jcfranco merged commit 142dc20 into main Nov 8, 2023
12 checks passed
@jcfranco jcfranco deleted the elijbet/7659-refactor-eslint-rule-enforce-ref-last-prop-docs branch November 8, 2023 01:57
@github-actions github-actions bot added this to the 2023 November Priorities milestone Nov 8, 2023
jcfranco added a commit that referenced this pull request Nov 9, 2023
**Related Issue:** #7669, #7659

## Summary

Refactor to improve on `enforce-ref-last-prop` ESLint rule docs.

---------

Co-authored-by: JC Franco <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Issues tied to code that needs to be significantly reworked. skip visual snapshots Pull requests that do not need visual regression testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants