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
Prettier removes generic types annotation.
original code: let variable: Promise<boolean>;
let variable: Promise<boolean>;
after formatting turns into: let variable: Promise;
let variable: Promise;
VS Code Version: 1.95.2
Prettier Extension Version: v11.0.0
OS and version: Ubuntu 22.04.4 LTS, on WSL 2
["INFO" - 1:43:07 PM] Using config file at /home/omar/code/saas-template/prettier.config.js ["INFO" - 1:43:09 PM] Formatting file:///home/omar/code/saas-template/src/app/%28public%29/layout.tsx ["INFO" - 1:43:09 PM] Using config file at /home/omar/code/saas-template/prettier.config.js ["INFO" - 1:43:09 PM] PrettierInstance: { "modulePath": "/home/omar/code/saas-template/node_modules/prettier/index.cjs", "messageResolvers": {}, "version": "3.3.2" } ["INFO" - 1:43:09 PM] Using ignore file (if present) at /home/omar/code/saas-template/.prettierignore ["INFO" - 1:43:09 PM] File Info: { "ignored": false, "inferredParser": "typescript" } ["INFO" - 1:43:09 PM] Detected local configuration (i.e. .prettierrc or .editorconfig), VS Code configuration will not be used ["INFO" - 1:43:09 PM] Prettier Options: { "filepath": "/home/omar/code/saas-template/src/app/(public)/layout.tsx", "parser": "typescript", "plugins": [ "/home/omar/code/saas-template/node_modules/.pnpm/[email protected][email protected]/node_modules/prettier-plugin-tailwindcss/dist/index.mjs" ], "trailingComma": "none", "tabWidth": 2, "singleQuote": true } ["INFO" - 1:43:09 PM] Formatting completed in 145ms.
The text was updated successfully, but these errors were encountered:
Issue was solved for me.
1 - delete the node_modules directory for the project. 2 - reinstall packages.
node_modules/prettier was v3.3.2 and after deleting and reinstalling everything it got updated to v3.3.3 and that solved the problem.
Sorry, something went wrong.
No branches or pull requests
Prettier removes generic types annotation.
original code:
let variable: Promise<boolean>;
after formatting turns into:
let variable: Promise;
VS Code Version: 1.95.2
Prettier Extension Version: v11.0.0
OS and version: Ubuntu 22.04.4 LTS, on WSL 2
Prettier Log Output
["INFO" - 1:43:07 PM] Using config file at /home/omar/code/saas-template/prettier.config.js
["INFO" - 1:43:09 PM] Formatting file:///home/omar/code/saas-template/src/app/%28public%29/layout.tsx
["INFO" - 1:43:09 PM] Using config file at /home/omar/code/saas-template/prettier.config.js
["INFO" - 1:43:09 PM] PrettierInstance:
{
"modulePath": "/home/omar/code/saas-template/node_modules/prettier/index.cjs",
"messageResolvers": {},
"version": "3.3.2"
}
["INFO" - 1:43:09 PM] Using ignore file (if present) at /home/omar/code/saas-template/.prettierignore
["INFO" - 1:43:09 PM] File Info:
{
"ignored": false,
"inferredParser": "typescript"
}
["INFO" - 1:43:09 PM] Detected local configuration (i.e. .prettierrc or .editorconfig), VS Code configuration will not be used
["INFO" - 1:43:09 PM] Prettier Options:
{
"filepath": "/home/omar/code/saas-template/src/app/(public)/layout.tsx",
"parser": "typescript",
"plugins": [
"/home/omar/code/saas-template/node_modules/.pnpm/[email protected][email protected]/node_modules/prettier-plugin-tailwindcss/dist/index.mjs"
],
"trailingComma": "none",
"tabWidth": 2,
"singleQuote": true
}
["INFO" - 1:43:09 PM] Formatting completed in 145ms.
The text was updated successfully, but these errors were encountered: