We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I discovered inconsistent formatting between vscode and cli when using long arguments with inline type declarations.
see below
prettier.config.js
export default { semi: false, trailingComma: "none", singleQuote: false, printWidth: 90, endOfLine: "auto", tailwindFunctions: ["cva", "cx"], tabWidth: 2, useTabs: false, plugins: ["prettier-plugin-tailwindcss"], };
Formatted with vscode
export const FooBarComponent = ( props: { structure: string asset: string onClose: () => void } ) => { console.log("f") }
Formatted with pnpm prettier -w .\src\foo.tsx
pnpm prettier -w .\src\foo.tsx
export const FooBarComponent = (props: { structure: string asset: string onClose: () => void }) => { console.log("f") }
Formatting should be identical.
Inconsistent, see above.
VS Code Version: Version: 1.81.1 (user setup) Commit: 6c3e3dba23e8fadc360aed75ce363ba185c49794 Date: 2023-08-09T22:22:42.175Z Electron: 22.3.18 ElectronBuildId: 22689846 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Windows_NT x64 10.0.19044
Prettier Extension Version: v10.1.0
OS and version: Windows 10
pnpm prettier -v 3.0.1
["INFO" - 2:24:14 PM] Using config file at 'c:\project\prettier.config.js' ["INFO" - 2:24:17 PM] Formatting file:///c%3A/project/src/foo.tsx ["DEBUG" - 2:24:17 PM] Local prettier module path: 'c:\Users\User\Documents\node_modules\prettier\index.cjs' ["INFO" - 2:24:17 PM] Using config file at 'c:\project\prettier.config.js' ["DEBUG" - 2:24:17 PM] Local prettier module path: 'c:\Users\User\Documents\node_modules\prettier\index.cjs' ["INFO" - 2:24:17 PM] PrettierInstance: { "modulePath": "c:\\Users\\User\\Documents\\node_modules\\prettier\\index.cjs", "importResolver": {}, "callMethodResolvers": {}, "currentCallMethodId": 80, "version": "3.0.0" } ["INFO" - 2:24:17 PM] Using ignore file (if present) at c:\project\.prettierignore ["INFO" - 2:24:17 PM] File Info: { "ignored": false, "inferredParser": "typescript" } ["INFO" - 2:24:17 PM] Detected local configuration (i.e. .prettierrc or .editorconfig), VS Code configuration will not be used ["INFO" - 2:24:17 PM] Prettier Options: { "filepath": "c:\\project\\src\\foo.tsx", "parser": "typescript", "semi": false, "trailingComma": "none", "singleQuote": false, "printWidth": 90, "endOfLine": "auto", "tailwindFunctions": [ "cva", "cx" ], "tabWidth": 2, "useTabs": false, "plugins": [ "C:\\project\\node_modules\\.pnpm\\[email protected][email protected]\\node_modules\\prettier-plugin-tailwindcss\\dist\\index.mjs" ] } ["INFO" - 2:24:17 PM] Formatting completed in 61ms.
The text was updated successfully, but these errors were encountered:
Never mind, I was accidentally using a global prettier instance. Everything is working as expected.
Sorry, something went wrong.
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.
No branches or pull requests
Summary
I discovered inconsistent formatting between vscode and cli when using long arguments with inline type declarations.
Github Repository to Reproduce Issue
see below
Steps To Reproduce:
prettier.config.js
Formatted with vscode
Formatted with
pnpm prettier -w .\src\foo.tsx
Expected result
Formatting should be identical.
Actual result
Inconsistent, see above.
Additional information
VS Code Version:
Version: 1.81.1 (user setup)
Commit: 6c3e3dba23e8fadc360aed75ce363ba185c49794
Date: 2023-08-09T22:22:42.175Z
Electron: 22.3.18
ElectronBuildId: 22689846
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Windows_NT x64 10.0.19044
Prettier Extension Version: v10.1.0
OS and version: Windows 10
pnpm prettier -v
3.0.1
Prettier Log Output
The text was updated successfully, but these errors were encountered: