-
-
Couldn't load subscription status.
- Fork 490
Description
Summary
Prettier is logging the correct config but formatting with another (default?) one.
Github Repository to Reproduce Issue
N.A.
Steps To Reproduce:
- Install Consider adding instructions on how to have VS Code use these same configs to format files. epicweb-dev/config#43
- Enable Prettier's extension logs by adding
"prettier.enableDebugLogs": true,to your VS Code's settings.json file
Expected result
The file should have been formatted according to the config in the log.
Actual result
The file was formatted with some other rules (the default rules?).
Additional information
VS Code Version:
Version: 1.104.0 (Universal)
Commit: f220831ea2d946c0dcb0f3eaa480eb435a2c1260
Date: 2025-09-10T06:46:18.035Z
Electron: 37.3.1
ElectronBuildId: 12342881
Chromium: 138.0.7204.235
Node.js: 22.18.0
V8: 13.8.258.31-electron.0
OS: Darwin arm64 24.6.0
Prettier Extension Version: 11.0.0
OS and version: macOS Sequoia 15.6.1
Prettier Log Output
["INFO" - 7:51:47 PM] Formatting file:///Users/andrecasal/Developer/Apps/launchfast.pro/app/routes/_dev-resources%2B/typography.tsx
["INFO" - 7:51:47 PM] Using config file at /Users/andrecasal/Developer/Apps/launchfast.pro/package.json
["INFO" - 7:51:47 PM] PrettierInstance:
{
"modulePath": "/Users/andrecasal/Developer/Apps/launchfast.pro/node_modules/prettier/index.cjs",
"messageResolvers": {},
"version": "3.3.3"
}
["INFO" - 7:51:47 PM] Using ignore file (if present) at /Users/andrecasal/Developer/Apps/launchfast.pro/.prettierignore
["INFO" - 7:51:47 PM] File Info:
{
"ignored": false,
"inferredParser": "typescript"
}
["INFO" - 7:51:47 PM] Detected local configuration (i.e. .prettierrc or .editorconfig), VS Code configuration will not be used
["INFO" - 7:51:47 PM] Prettier Options:
{
"filepath": "/Users/andrecasal/Developer/Apps/launchfast.pro/app/routes/_dev-resources+/typography.tsx",
"parser": "typescript",
"__esModule": true,
"config": {
"arrowParens": "always",
"bracketSameLine": false,
"bracketSpacing": true,
"embeddedLanguageFormatting": "auto",
"endOfLine": "lf",
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"jsxSingleQuote": false,
"printWidth": 80,
"proseWrap": "always",
"quoteProps": "as-needed",
"requirePragma": false,
"semi": false,
"singleAttributePerLine": false,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "all",
"useTabs": true,
"overrides": [
{
"files": [
"**/package.json"
],
"options": {
"useTabs": false
}
},
{
"files": [
"**/*.mdx"
],
"options": {
"proseWrap": "preserve",
"htmlWhitespaceSensitivity": "ignore"
}
}
],
"plugins": [
"prettier-plugin-tailwindcss"
],
"tailwindAttributes": [
"class",
"className",
"ngClass",
".*[cC]lassName"
],
"tailwindFunctions": [
"clsx",
"cn",
"cva"
]
},
"default": {
"arrowParens": "always",
"bracketSameLine": false,
"bracketSpacing": true,
"embeddedLanguageFormatting": "auto",
"endOfLine": "lf",
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"jsxSingleQuote": false,
"printWidth": 80,
"proseWrap": "always",
"quoteProps": "as-needed",
"requirePragma": false,
"semi": false,
"singleAttributePerLine": false,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "all",
"useTabs": true,
"overrides": [
{
"files": [
"**/package.json"
],
"options": {
"useTabs": false
}
},
{
"files": [
"**/*.mdx"
],
"options": {
"proseWrap": "preserve",
"htmlWhitespaceSensitivity": "ignore"
}
}
],
"plugins": [
"prettier-plugin-tailwindcss"
],
"tailwindAttributes": [
"class",
"className",
"ngClass",
".*[cC]lassName"
],
"tailwindFunctions": [
"clsx",
"cn",
"cva"
]
}
}
["INFO" - 7:51:47 PM] Formatting completed in 51ms.
As you can see from the logs, semi-colons are supposed to be removed (among other rules), but instead they are added, when saving the file with formatOnSave (or manually selecting "Format Document" from VS Code's command palette).