You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import navJson from "../nav.json" with { type: "json" };
4 |
5 | const config = JSON.parse(process.env.MY_ENV_CONFIGS);
SyntaxError: Unexpected token, expected "(" (2:43)
1 | import { defineConfig } from "vitepress";
> 2 | import sidebar from "./sidebar.json" with { type: "json" };
| ^
3 | import navJson from "../nav.json" with { type: "json" };
4 |
5 | const config = JSON.parse(process.env.MY_ENV_CONFIGS);
at p (c:\Users\Administrator\.vscode\extensions\esbenp.prettier-vscode-11.0.0\node_modules\prettier\parser-babel.js:22:1054)
at d (c:\Users\Administrator\.vscode\extensions\esbenp.prettier-vscode-11.0.0\node_modules\prettier\parser-babel.js:22:1287)
at Object.parse (c:\Users\Administrator\.vscode\extensions\esbenp.prettier-vscode-11.0.0\node_modules\prettier\parser-babel.js:29:54501)
at Object.parse (c:\Users\Administrator\.vscode\extensions\esbenp.prettier-vscode-11.0.0\node_modules\prettier\index.js:7515:23)
at coreFormat (c:\Users\Administrator\.vscode\extensions\esbenp.prettier-vscode-11.0.0\node_modules\prettier\index.js:8829:18)
at formatWithCursor2 (c:\Users\Administrator\.vscode\extensions\esbenp.prettier-vscode-11.0.0\node_modules\prettier\index.js:9021:18)
at c:\Users\Administrator\.vscode\extensions\esbenp.prettier-vscode-11.0.0\node_modules\prettier\index.js:38183:12
at Object.format (c:\Users\Administrator\.vscode\extensions\esbenp.prettier-vscode-11.0.0\node_modules\prettier\index.js:38197:12)
at t.default.format (c:\Users\Administrator\.vscode\extensions\esbenp.prettier-vscode-11.0.0\dist\extension.js:1:16369)
at t.PrettierEditProvider.provideEdits (c:\Users\Administrator\.vscode\extensions\esbenp.prettier-vscode-11.0.0\dist\extension.js:1:12927)
at g$.provideDocumentFormattingEdits (file:///c:/Users/Administrator/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:137:134090)
["INFO" - 13:33:04] Formatting completed in 11ms.
The text was updated successfully, but these errors were encountered:
Summary
When the following code appears in the JS file, it cannot work
Github Repository to Reproduce Issue
NOT REQUIRED
Steps To Reproduce:
NOT REQUIRED
Expected result
Can format normally
Actual result
Additional information
VS Code Version:
Prettier Extension Version:v11.0.0
OS and version:win10
Prettier Log Output
The text was updated successfully, but these errors were encountered: