Skip to content
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

issue-468 #469

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
3 changes: 3 additions & 0 deletions tests/issues/issue-468/formatted.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template lang="pug">
p digest
</template>
15 changes: 15 additions & 0 deletions tests/issues/issue-468/issue-468.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { compareFiles } from 'tests/common';
import { describe, expect, it } from 'vitest';

describe('Issues', () => {
it('should end with newline in svelte', async () => {
const { actual, expected } = await compareFiles(import.meta.url, {
source: 'unformatted.svelte',
target: 'formatted.svelte',
formatOptions: {
pugFramework: 'svelte',
Copy link
Member Author

@Shinigami92 Shinigami92 Sep 20, 2023

Choose a reason for hiding this comment

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

When I add parser: 'svelte' here I get an error 🤔
If I leave it, it seems to work

Maybe even it's a compatibility issue with prettier-plugin-svelte

Copy link
Member Author

Choose a reason for hiding this comment

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

ping @rodshtein

Copy link

@rodshtein rodshtein Sep 21, 2023

Choose a reason for hiding this comment

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

Yeah, everything worked fine with the previous version of the Svelte plugin prettier-plugin-svelte3.
I need a little time to dig deeper, I'll text you later.

},
});
expect(actual).toBe(expected);
});
});
3 changes: 3 additions & 0 deletions tests/issues/issue-468/unformatted.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template lang="pug">
p digest
</template>