Repository navigation
Linter: Don't flag server reads in <Fragment> or a render's state: - #2698
Merged
Merged
Conversation
@herb-tools/analysis
@herb-tools/browser
@herb-tools/client
@herb-tools/config
@herb-tools/core
@herb-tools/dev-tools
@herb-tools/formatter
herb-language-server
@herb-tools/highlighter
@herb-tools/language-server
@herb-tools/language-service
@herb-tools/linter
@herb-tools/minifier
@herb-tools/node
@herb-tools/node-wasm
@herb-tools/printer
@herb-tools/rewriter
stimulus-lint
@herb-tools/tailwind-class-sorter
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates
herb-state-valid-readsto stop reporting two patterns the engine compiles today.The first is a server-derived read inside a
<Fragment>. The component exists for exactly this shape, and its<Fallback>is the markup the client shows the instant a state write invalidates a read inside it.The second is a
state:entry on a render call, shipped in #2649 through #2652.A bare name there binds one of the partial's states to a state of the calling template, and anything else seeds the partial's state with a value the server computes once. Neither is a read the client resolves, so neither belongs to this rule. The call's ordinary locals are still checked, so
tries: attempts + 1draws the offense as before.