Skip to content

Commit

Permalink
deprecate: deprecate enforce-ref-last-prop rule
Browse files Browse the repository at this point in the history
  • Loading branch information
jcfranco committed Sep 27, 2024
1 parent 737085a commit 60041bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# enforce-ref-last-prop

**Deprecated** This rule is deprecated and will be removed in a future release. It is no longer needed if you are using Stencil 4.14.1 or greater.

This ensures the node passed into the `ref` callback is in sync with its JSX attributes/properties when invoked.

Placing `ref` last helps work around a [Stencil bug](https://github.com/ionic-team/stencil/issues/4074) where the `ref` callback is invoked in the specified order and not after initializing the element with all its attributes/properties. This can cause attributes/properties to be outdated by the time the callback is invoked.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type { JSXAttribute, JSXOpeningElement, JSXSpreadAttribute } from "@babel

const rule: Rule.RuleModule = {
meta: {
deprecated: true,
docs: {
description: `This ensures the node passed into the ref callback is in sync with its JSX attributes/properties when invoked.`,
recommended: true,
Expand Down

0 comments on commit 60041bc

Please sign in to comment.