fix(lint): decode entity-encoded variable values - #2292
Closed
miguel-heygen wants to merge 1 commit into
Closed
Conversation
Collaborator
Author
|
Closing in the owner-scoped backlog value sweep. This is a narrow lint/audit/docs/example/skills refinement, is currently conflicting, or adds more maintenance surface than its demonstrated user impact justifies. Reopen only if a current reproducible case makes it a priority again. |
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.
What
Decode HTML entities in
data-variable-valuesbefore validating the attribute as JSON.Why
Studio serializes edited JSON attributes with double-quoted HTML attributes and entity-encoded inner quotes. That markup is valid HTML and browsers expose decoded JSON, but StaticGuard lint parsed the raw
"text and reportedinvalid_variable_values_json.How
Test plan
bun run --filter @hyperframes/lint test(363 tests passed)bun run --filter @hyperframes/lint typecheckbunx oxfmt --check packages/lint/src/utils.ts packages/lint/src/rules/composition.test.tsbunx oxlint packages/lint/src/utils.ts packages/lint/src/rules/composition.test.tsgit diff --checkNote: the repository-wide pre-commit typecheck currently cannot resolve the ungenerated Producer
runtime-inlinemodule in a fresh worktree; package-scoped lint typecheck passes.