Skip to content

Commit

Permalink
fix: prettier svelte plugin import
Browse files Browse the repository at this point in the history
  • Loading branch information
sahinvardar committed Dec 14, 2024
1 parent 8d307b1 commit e30d1dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import fs from 'node:fs/promises';
import path from 'node:path';
import url from 'node:url';
import prettier from 'prettier';
import prettierPluginSvelte from 'prettier-plugin-svelte';

export async function scanDir(dir: string, filter?: (file: string) => boolean) {
const result: string[] = [];
Expand Down Expand Up @@ -34,6 +35,6 @@ export function __dirname(meta: ImportMeta) {
export async function formatSvelte(code: string) {
return prettier.format(code, {
parser: 'svelte',
plugins: [require('prettier-plugin-svelte')]
plugins: [prettierPluginSvelte]
});
}

0 comments on commit e30d1dd

Please sign in to comment.