Skip to content

Chore/upgrade prettier v3 #365

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

Merged
merged 31 commits into from
Jul 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
5c088d8
docs: clarify CLI run
dummdidumm Mar 14, 2023
830f5a8
Bump ansi-regex from 4.1.0 to 4.1.1 (#286)
dependabot[bot] Mar 15, 2023
caa47ca
Bump trim-off-newlines from 1.0.1 to 1.0.3 (#287)
dependabot[bot] Mar 15, 2023
34999ca
Bump minimatch from 3.0.4 to 3.1.2 (#327)
dependabot[bot] Mar 15, 2023
c4490bd
Bump http-cache-semantics from 4.1.0 to 4.1.1 (#342)
dependabot[bot] Mar 15, 2023
2e9599b
Bump minimist from 1.2.5 to 1.2.8 (#351)
dependabot[bot] Mar 15, 2023
2fbd812
feat: support insert/require pragma options (#354)
dummdidumm Mar 21, 2023
7abac5f
feat: support `svelte:document` (#355)
dummdidumm Mar 21, 2023
a94563c
(feat) trim whitespace in `class` attributes (#356)
dummdidumm Mar 22, 2023
4ce3dd3
fix: refine attributeRegex (#345)
Rolaka Mar 22, 2023
b7d0562
feat: allow multiple comments atop of script/style tags (#357)
dummdidumm Mar 22, 2023
bd91bbf
chore: release 2.10.0 (#358)
dummdidumm Mar 22, 2023
fdb31a7
Update Prettier to v3.0.0-alpha.11
carmanchris31 Apr 30, 2023
43d1e06
Remove incompatible @prettier/plugin-pug
carmanchris31 Apr 30, 2023
afc48fc
Remove unsupported since property
carmanchris31 Apr 30, 2023
51a7030
Update splitTextToDocs
carmanchris31 Apr 30, 2023
1ab5ec5
Remove unused concat import
carmanchris31 Apr 30, 2023
c361d6a
Bypass call type issue
carmanchris31 Apr 30, 2023
b4a707a
Fix ParserOptions
carmanchris31 Apr 30, 2023
c3af343
Await async APIs
carmanchris31 Apr 30, 2023
0f278aa
Remove unnecessary any
carmanchris31 Apr 30, 2023
169e0b4
Fix importing Svelte plugin
carmanchris31 Apr 30, 2023
a6f32ad
Enable better errors when tests fail
carmanchris31 Apr 30, 2023
ddf961b
Fix TypeError
carmanchris31 Apr 30, 2023
8530863
Use newer actions
carmanchris31 May 1, 2023
97f1d17
chore: mark as compatible with Svelte 4 (#367)
dummdidumm May 27, 2023
9dcc594
docs: update README.md with information for using prettier-plugin-tai…
opensas Jul 5, 2023
bad0d7f
Merge branch 'master' into chore/upgrade-prettier-v3
dummdidumm Jul 14, 2023
7b7a668
get tests passing
dummdidumm Jul 14, 2023
4975e49
cleanup
dummdidumm Jul 14, 2023
fc26baf
package bumps
dummdidumm Jul 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: npm

Expand Down
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
# prettier-plugin-svelte changelog

## 3.0.0 (Unreleased
## 3.0.0 (Unreleased)

- (breaking) requires `prettier` version 3
- (breaking) requires node version 14 or higher

## 2.10.1

- (chore) mark as compatible with Svelte 4

## 2.10.0

- (feat) support `requirePragma` and `insertPragma` options ([#350](https://github.com/sveltejs/prettier-plugin-svelte/issues/350))
- (feat) support `<svelte:document>`
- (feat) trim whitespace in `class` attributes ([#339](https://github.com/sveltejs/prettier-plugin-svelte/issues/339))
- (feat) allow multiple comments atop of script/style tags ([#291](https://github.com/sveltejs/prettier-plugin-svelte/issues/291))
- (fix) handle script/style attributes without quotes ([#344](https://github.com/sveltejs/prettier-plugin-svelte/issues/344))

## 2.9.0

- (feat) support style modifiers ([#330](https://github.com/sveltejs/prettier-plugin-svelte/issues/330))
Expand Down
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,14 @@ Install `prettier` and `prettier-plugin-svelte` as dev dependencies in your proj

Then format your code using Prettier CLI. You may need to add `--plugin-search-dir=.`

As a one-time run:
```
prettier --write --plugin-search-dir=. ./**/*.html
npx prettier --write --plugin-search-dir=. ./**/*.html
```

As part of your scripts in `package.json`:
```
"format": "prettier --write --plugin-search-dir=. ./**/*.html"
```

If you want to customize some formatting behavior, see section "Options" below.
Expand Down Expand Up @@ -167,6 +173,16 @@ There is a [Tailwind Prettier Plugin](https://github.com/tailwindlabs/prettier-p

More info: https://github.com/tailwindlabs/prettier-plugin-tailwindcss#compatibility-with-other-prettier-plugins

Since we are using configuration overrides to handle svelte files, you might also have to configure the [prettier.documentselectors](https://github.com/prettier/prettier-vscode#prettierdocumentselectors) in your VS Code `settings.json`, to tell Prettier extension to handle svelte files, file like this:

```json5
// settings.json
{
// ..
"prettier.documentSelectors": ["**/*.svelte"],
}
```

## FAQ

### Why is the closing or opening tag (`>` or `<`) hugging the inner tag or text?
Expand Down
Loading