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
esbenp.prettier-vscode reformats code that when running npx prettier --write filename
npx prettier --write filename
it will format this :
export class Test { private test(params: any) { console.log(); } private test2() { this.test({ parameter1: 1, parameter2: 2, parameter3: 3, parameter4: 4 }); } }
to this
we are using the following .prettierrc
.prettierrc
{ "endOfLine": "lf", "printWidth": 180, "tabWidth": 4, "trailingComma": "none", "semi": true, "arrowParens": "always", "overrides": [ { "files": ["*.yaml", "*.yml"], "options": { "tabWidth": 2 } } ] }
Here you can see that both are valid and VS Code save should not change anything
prettier.io-multiline
prettier.io-singleline
VS Code Version:
Version: 1.97.2 (system setup) Commit: e54c774e0add60467559eb0d1e229c6452cf8447 Date: 2025-02-12T23:20:35.343Z Electron: 32.2.7 ElectronBuildId: 10982180 Chromium: 128.0.6613.186 Node.js: 20.18.1 V8: 12.8.374.38-electron.0 OS: Windows_NT x64 10.0.26100
Prettier Extension Version: 11.0.0
OS and version: WSL: Ubuntu-22.04
["INFO" - 1:09:09 PM] Formatting file://projectfolder/test.ts ["INFO" - 1:09:09 PM] Using config file at projectfolder/.prettierrc ["INFO" - 1:09:09 PM] PrettierInstance: { "modulePath": "projectfolder/node_modules/prettier/index.cjs", "messageResolvers": {}, "version": "3.4.2" } ["INFO" - 1:09:09 PM] Using ignore file (if present) at projectfolder/.prettierignore ["INFO" - 1:09:09 PM] File Info: { "ignored": false, "inferredParser": "typescript" } ["INFO" - 1:09:09 PM] Detected local configuration (i.e. .prettierrc or .editorconfig), VS Code configuration will not be used ["INFO" - 1:09:09 PM] Prettier Options: { "filepath": "projectfolder/test.ts", "parser": "typescript", "endOfLine": "lf", "printWidth": 180, "tabWidth": 4, "trailingComma": "none", "semi": true, "arrowParens": "always" } ["INFO" - 1:09:09 PM] Formatting completed in 10ms.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Summary
esbenp.prettier-vscode reformats code that when running
npx prettier --write filename
it will format this :
to this
we are using the following
.prettierrc
Additional information
Here you can see that both are valid and VS Code save should not change anything
prettier.io-multiline
prettier.io-singleline
VS Code Version:
Version: 1.97.2 (system setup)
Commit: e54c774e0add60467559eb0d1e229c6452cf8447
Date: 2025-02-12T23:20:35.343Z
Electron: 32.2.7
ElectronBuildId: 10982180
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.26100
Prettier Extension Version: 11.0.0
OS and version: WSL: Ubuntu-22.04
Prettier Log Output
The text was updated successfully, but these errors were encountered: