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
Format TS expressions when any script tag has lang="ts"
#14587
Format TS expressions when any script tag has lang="ts"
#14587
Conversation
v-if=" (x as string).length > 0" | ||
v-for="a in [1,2, 3,4,5].map( (x : number) => x * x)" | ||
:foo=" (x as number).toFixed( 2) " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These aren't formatted in this branch due to #14432 .
Rebasing to next branch, they are formatted.
Feel free to ask me to
- remove these lines
- or, change base branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can ignore it.
It's fine to merge into main, #14559 already need update. |
if (lang === "ts" || lang === "typescript") { | ||
const shouldMarkTs = vueScriptTags.some((vueScriptTag) => | ||
["ts", "typescript"].includes(vueScriptTag.attrMap.lang) | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
filter
+ some
can reduce to one .some
.
script[lang=ts]
is second <script>`<script lang="ts">
is not the first script tag
<script lang="ts">
is not the first script taglang="ts"
…4587) Co-authored-by: fisker <lionkay@gmail.com>
Description
Fix #14575
Checklist
(If changing the API or CLI) I’ve documented the changes I’ve made (in thedocs/
directory).changelog_unreleased/*/XXXX.md
file followingchangelog_unreleased/TEMPLATE.md
.✨Try the playground for this PR✨