Skip to content

HTML: Fix format on style[lang="sass"]#9051

Merged
fisker merged 12 commits intoprettier:masterfrom
fisker:html-infer-parser
Aug 25, 2020
Merged

HTML: Fix format on style[lang="sass"]#9051
fisker merged 12 commits intoprettier:masterfrom
fisker:html-infer-parser

Conversation

@fisker
Copy link
Member

@fisker fisker commented Aug 25, 2020

Fixes #9050

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory)
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/pr-XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Try the playground for this PR

@fisker fisker force-pushed the html-infer-parser branch from 05d0d72 to b4c262f Compare August 25, 2020 10:46
<template lang="unknown">
foo
bar
</template>
Copy link
Member

@thorn0 thorn0 Aug 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename:
unknow.vue → unknown.vue
unknow-lang.html → unknown-lang.html

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo

@fisker
Copy link
Member Author

fisker commented Aug 25, 2020

Hey, guys.

I installed a new bot called prettifier on my fork today, it run Prettier on commit, feels good.

58539a0

@fisker fisker marked this pull request as ready for review August 25, 2020 14:15
@thorn0
Copy link
Member

thorn0 commented Aug 25, 2020

@fisker Looks good. The right URL is https://github.com/kevgo/prettifier What version of Prettier does it use? The one installed in the repo?

@fisker
Copy link
Member Author

fisker commented Aug 25, 2020

I don't know yet... Just installed about 5 hours.

Comment on lines +18 to +19
foo
bar
Copy link
Member Author

@fisker fisker Aug 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One second, I need change this to valid css, because the parser might still be css and it throws.

@fisker
Copy link
Member Author

fisker commented Aug 25, 2020

@thorn0 It seems it's not running the one installed in the repo

fisker@3ed67b3

@fisker
Copy link
Member Author

fisker commented Aug 25, 2020

I'll uninstall it.

But, I found it because I was looking for similar bot, maybe we can build one?

@fisker fisker mentioned this pull request Aug 25, 2020
6 tasks
# Conflicts:
#	src/language-html/utils.js
exports[`unknown.vue format 1`] = `
====================================options=====================================
parsers: ["vue"]
printWidth: 80
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add tests for the case --vue-indent-script-and-style is true?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

embeddedLanguageFormatting: "off" vueIndentScriptAndStyle: true tested

Copy link
Contributor

@sosukesuzuki sosukesuzuki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@thorn0
Copy link
Member

thorn0 commented Aug 25, 2020

@fisker As for the bot, a GitHub Action is a much more straightforward option for this. E.g. see https://driesvints.com/blog/code-style-formatting-with-github-actions

@fisker fisker mentioned this pull request Aug 25, 2020
4 tasks
@fisker fisker merged commit ee57066 into prettier:master Aug 25, 2020
@fisker fisker deleted the html-infer-parser branch August 25, 2020 16:26
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prettier 2.1.0 and Sass rules with single mixin inclusion

4 participants