mirror of
https://github.com/pheralb/svgl.git
synced 2025-12-29 08:01:36 +08:00
🔧 Refactor import statement for prettier and update formatting method
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import prettier from "prettier";
|
||||
import { format } from "prettier";
|
||||
|
||||
interface ParseReactSvgOptions {
|
||||
componentName: string;
|
||||
@@ -35,7 +35,7 @@ export const parseReactSvgContent = async ({
|
||||
structuredCode = `const ${componentName} = (props) => (\n ${reactifiedSvg}\n);\n\nexport { ${componentName} };`;
|
||||
}
|
||||
|
||||
const formatted = await prettier.format(structuredCode, {
|
||||
const formatted = await format(structuredCode, {
|
||||
parser: typescript ? "typescript" : "babel",
|
||||
semi: true,
|
||||
singleQuote: false,
|
||||
|
||||
Reference in New Issue
Block a user