Format TS expressions when any script tag has lang="ts"#14587
Merged
fisker merged 6 commits intoprettier:mainfrom Mar 27, 2023
Merged
Format TS expressions when any script tag has lang="ts"#14587fisker merged 6 commits intoprettier:mainfrom
lang="ts"#14587fisker merged 6 commits intoprettier:mainfrom
Conversation
seiyab
commented
Mar 25, 2023
Comment on lines
+93
to
+95
| 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) " |
Collaborator
Author
There was a problem hiding this comment.
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
Member
|
It's fine to merge into main, #14559 already need update. |
fisker
reviewed
Mar 25, 2023
| if (lang === "ts" || lang === "typescript") { | ||
| const shouldMarkTs = vueScriptTags.some((vueScriptTag) => | ||
| ["ts", "typescript"].includes(vueScriptTag.attrMap.lang) | ||
| ); |
Member
There was a problem hiding this comment.
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"
medikoo
pushed a commit
to medikoo/prettier-elastic
that referenced
this pull request
Feb 13, 2024
…4587) Co-authored-by: fisker <[email protected]>
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.
Description
Fix #14575
Checklist
(If changing the API or CLI) I’ve documented the changes I’ve made (in thedocs/directory).changelog_unreleased/*/XXXX.mdfile followingchangelog_unreleased/TEMPLATE.md.✨Try the playground for this PR✨