prettier-vscode
prettier-vscode copied to clipboard
Extension completely stopped working in VS
Summary
Recently extension stopped working completely, running it doesn't produce any result.
Github Repository to Reproduce Issue
Steps To Reproduce:
Use "Format Document" in Visual Studio.
Expected result
Code is formated
Actual result
Nothing
Additional information
I tried to set Prettier as default formatter in VS, it didn't help. Same issue happens if I try to use Prettier online: https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAjCATAngAmAHShx0gBsIAnJHVUgVzgG5CBfEAGhAgAcYBLaAGdkoAIYUKEAO4AFcQmEpRpKaKzDOqCqLABrODADKogLZwAMnyhxkAM2WC4m7XoOHuOqwHNkMCg044E1Q4DAxQ81EoLzpRLzgAMUoTURh+aOQQUToYCA4QAAsYE1IAdQK+eEEPMDhDBUq+ADdKrEywQQ0QK0cKGBltLxS7BycQACtBAA9Db1I4AEU6CHgR0kdODwpezNRRENJ87gorGFK+DBgC5AAOAAZNyUdS7W5M47hepptOAEdl+ADHiKLKCAC01lCoXyFDg-z4sIGcWGSHs6zGjhMfF8-gxc0WAJsqNGnBg+3Ol2uSAATKTtHxSN4AMIQEwokCfACs+TojgAKvtFGiNiAmgwAJJQcKwQxgE68ACCUsMMCw8zWjhYLCAA
Error: SyntaxError: Missing semicolon. (1:5)
1 | body { | ^ 2 | color: blue; 3 | }
VS Code Version:
1.69
Prettier Extension Version:
v9.5.0
OS and version:
Windows 11 21H2
Prettier Log Output
["INFO" - 16:59:42] Extension Name: esbenp.prettier-vscode. ["INFO" - 16:59:42] Extension Version: 9.5.0. ["INFO" - 16:59:49] Formatting file:///d%3A/Git/politiikasta/astra-child/customizer.css ["INFO" - 16:59:49] Using ignore file (if present) at d:\Git\politiikasta.prettierignore ["INFO" - 16:59:49] File Info: { "ignored": false, "inferredParser": "css" } ["INFO" - 16:59:49] No local configuration (i.e. .prettierrc or .editorconfig) detected, falling back to VS Code configuration ["INFO" - 16:59:49] Prettier Options: { "arrowParens": "always", "bracketSpacing": true, "endOfLine": "lf", "htmlWhitespaceSensitivity": "css", "insertPragma": false, "jsxBracketSameLine": false, "jsxSingleQuote": false, "printWidth": 80, "proseWrap": "preserve", "quoteProps": "as-needed", "requirePragma": false, "semi": true, "singleQuote": false, "tabWidth": 2, "trailingComma": "es5", "useTabs": false, "vueIndentScriptAndStyle": false, "filepath": "d:\Git\politiikasta\astra-child\customizer.css", "parser": "css" } ["ERROR" - 16:59:50] Error formatting document. ["ERROR" - 16:59:50] CssSyntaxError: Missed semicolon (325:39) 323 | --tec-color-button-primary-active: var(--ast-global-color-1); 324 | --tec-color-text-primary: var(--ast-global-color-2);
325 | --tec-font-family-sans-serif: font-family: 'Quicksand',sans-serif; | ^ 326 | } 327 |
328 | /* Archive layout / SyntaxError: CssSyntaxError: Missed semicolon (325:39) 323 | --tec-color-button-primary-active: var(--ast-global-color-1); 324 | --tec-color-text-primary: var(--ast-global-color-2); 325 | --tec-font-family-sans-serif: font-family: 'Quicksand',sans-serif; | ^ 326 | } 327 |
328 | / Archive layout */ at i (c:\Users\Gennady.vscode\extensions\esbenp.prettier-vscode-9.5.0\node_modules\prettier\parser-postcss.js:1:12833) at la (c:\Users\Gennady.vscode\extensions\esbenp.prettier-vscode-9.5.0\node_modules\prettier\parser-postcss.js:76:8032) at xt (c:\Users\Gennady.vscode\extensions\esbenp.prettier-vscode-9.5.0\node_modules\prettier\parser-postcss.js:76:8604) at Object.cp [as parse] (c:\Users\Gennady.vscode\extensions\esbenp.prettier-vscode-9.5.0\node_modules\prettier\parser-postcss.js:76:8342) at Object.parse (c:\Users\Gennady.vscode\extensions\esbenp.prettier-vscode-9.5.0\node_modules\prettier\index.js:7330:23) at coreFormat (c:\Users\Gennady.vscode\extensions\esbenp.prettier-vscode-9.5.0\node_modules\prettier\index.js:8641:18) at formatWithCursor2 (c:\Users\Gennady.vscode\extensions\esbenp.prettier-vscode-9.5.0\node_modules\prettier\index.js:8833:18) at c:\Users\Gennady.vscode\extensions\esbenp.prettier-vscode-9.5.0\node_modules\prettier\index.js:39137:12 at Object.format (c:\Users\Gennady.vscode\extensions\esbenp.prettier-vscode-9.5.0\node_modules\prettier\index.js:39151:12) at t.default.format (c:\Users\Gennady.vscode\extensions\esbenp.prettier-vscode-9.5.0\dist\extension.js:1:13489) at async t.PrettierEditProvider.provideEdits (c:\Users\Gennady.vscode\extensions\esbenp.prettier-vscode-9.5.0\dist\extension.js:1:10196) at async F.provideDocumentFormattingEdits (c:\Users\Gennady\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:87:45332) ["INFO" - 16:59:50] Formatting completed in 0.036ms.
Tried reinstalling extension. Same issue as gkurushin. I then turned on prettier logs. Now it works?
I've noticed that online Prettier work if you add semicolon after selector, so there is clearly some issue at the moment.
https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAjCATAnkgBMAHSl10gBsIAnPVMgVzgG4iBfEAGhAgAcYBLaAGdkoAIaVKEAO4AFcQmEpRZKaKzDOqSqLABrODADKogLZwAMnyhxkAM2WC4m7XoOHuOqwHNkMSg044E1Q4DAxQ81EoLzpRLzgAMSoTURh+aOQQUToYCA4QAAsYEzIAdQK+eEEPMDhDBUq+ADdKrEywQQ0QK0dKGBltLxS7BycQACtBAA9DbzI4AEU6CHgRskdOD0pezNRRELJ87korGFK+DBgC5AAOAAZNyUdS7W5M47hepptOAEdl+ADHiKLKCAC01lCoXylDg-z4sIGcWGSHs6zGjhMfF8-gxc0WAJsqNGnBg+3Ol2uSAATKTtHwyN4AMIQEwokCfACs+TojgAKvtFGiNiAmgwAJJQcKwQxgE68ACCUsMMCw8zWjhYLCAA
This is an issue or feature request for the Prettier library itself rather than the VS Code extension for prettier. Please open an issue at https://github.com/prettier/prettier.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.