💡 RFC: Improved contextual information for script tags #692
delucis
started this conversation in
Feature requests
Replies: 1 comment
-
Additional idea following up on withastro/docs#1407: maybe we can type the script tag so that the I guess we can also go further like: if there are any attributes on a script tag, show an error if there's an |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Background & Motivation
There is sometimes confusion around when Astro will hoist a
<script>
tag. We discussed on Discord if some extra styling and in-editor documentation could help.Proposed Solution
Possible solutions
Different colours for hoisted and non-hoisted
<script>
tags (a.k.a. tags with/without attributes)Extending the standard VS Code tooltip for
<script>
tags with Astro-specific information, e.g.:Alternatives considered
Just an idea so far :-)
Risks, downsides, and/or tradeoffs
We’ll need to keep this documentation updated if the behaviour ever changes.
Open Questions
Detailed Design
No response
Help make it happen!
Beta Was this translation helpful? Give feedback.
All reactions