Comments (2)
@aidanm1999 I thought I had the same problem, but I actually got it working just now. Maybe I can help you with your setup?
Summary
I'm building a monorepo with pnpm workspaces. I have prettier, a couple plugins, and a shared config in the root workspace (i.e., top level directory).
VS Code open to pnpm root workspace
["INFO" - 11:04:09 PM] Formatting file:///workspaces/test/prettier.config.mjs
["INFO" - 11:04:09 PM] Using config file at /workspaces/test/prettier.config.mjs
["INFO" - 11:04:09 PM] PrettierInstance:
{
"modulePath": "/workspaces/test/node_modules/prettier/index.cjs",
"importResolver": {},
"callMethodResolvers": {},
"currentCallMethodId": 5,
"version": "3.2.5"
}
["INFO" - 11:04:09 PM] Using ignore file (if present) at /workspaces/test/.prettierignore
["INFO" - 11:04:09 PM] File Info:
{
"ignored": false,
"inferredParser": "babel"
}
["INFO" - 11:04:09 PM] Detected local configuration (i.e. .prettierrc or .editorconfig), VS Code configuration will not be used
["INFO" - 11:04:09 PM] Prettier Options:
{
"filepath": "/workspaces/test/prettier.config.mjs",
"parser": "babel",
"arrowParens": "avoid",
"printWidth": 100,
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": true,
"tabWidth": 4,
"semi": true,
"plugins": [
"/workspaces/test/node_modules/.pnpm/[email protected]/node_modules/prettier-plugin-java/dist/index.js",
"/workspaces/test/node_modules/.pnpm/@[email protected][email protected]/node_modules/@prettier/plugin-xml/src/plugin.js"
]
}
["INFO" - 11:04:09 PM] Formatting completed in 230ms.
VS Code open using .code-workspace
["INFO" - 11:20:20 PM] Formatting file:///workspaces/test/apps/app1/package.json
["INFO" - 11:20:20 PM] Using config file at /workspaces/test/prettier.config.mjs
["INFO" - 11:20:20 PM] PrettierInstance:
{
"modulePath": "/workspaces/test/node_modules/prettier/index.cjs",
"importResolver": {},
"callMethodResolvers": {},
"currentCallMethodId": 2,
"version": "3.2.5"
}
["INFO" - 11:20:20 PM] Using ignore file (if present) at /workspaces/test/apps/app1/.prettierignore
["INFO" - 11:20:20 PM] File Info:
{
"ignored": false,
"inferredParser": "json-stringify"
}
["INFO" - 11:20:20 PM] Detected local configuration (i.e. .prettierrc or .editorconfig), VS Code configuration will not be used
["INFO" - 11:20:20 PM] Prettier Options:
{
"filepath": "/workspaces/test/apps/app1/package.json",
"parser": "json-stringify",
"arrowParens": "avoid",
"printWidth": 100,
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": true,
"tabWidth": 2,
"semi": true,
"plugins": [
"/workspaces/test/node_modules/.pnpm/[email protected]/node_modules/prettier-plugin-java/dist/index.js",
"/workspaces/test/node_modules/.pnpm/@[email protected][email protected]/node_modules/@prettier/plugin-xml/src/plugin.js"
]
}
["INFO" - 11:20:20 PM] Formatting completed in 104ms.
["INFO" - 11:20:46 PM] Formatting file:///workspaces/test/apps/app2/pom.xml
["INFO" - 11:20:46 PM] Using config file at /workspaces/test/prettier.config.mjs
["INFO" - 11:20:46 PM] PrettierInstance:
{
"modulePath": "/workspaces/test/node_modules/prettier/index.cjs",
"importResolver": {},
"callMethodResolvers": {},
"currentCallMethodId": 9,
"version": "3.2.5"
}
["INFO" - 11:20:46 PM] Using ignore file (if present) at /workspaces/test/apps/app2/.prettierignore
["INFO" - 11:20:46 PM] File Info:
{
"ignored": false,
"inferredParser": "xml"
}
["INFO" - 11:20:46 PM] Detected local configuration (i.e. .prettierrc or .editorconfig), VS Code configuration will not be used
["INFO" - 11:20:46 PM] Prettier Options:
{
"filepath": "/workspaces/test/apps/app2/pom.xml",
"parser": "xml",
"arrowParens": "avoid",
"printWidth": 100,
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": true,
"tabWidth": 4,
"semi": true,
"plugins": [
"/workspaces/test/node_modules/.pnpm/[email protected]/node_modules/prettier-plugin-java/dist/index.js",
"/workspaces/test/node_modules/.pnpm/@[email protected][email protected]/node_modules/@prettier/plugin-xml/src/plugin.js"
]
}
["INFO" - 11:20:46 PM] Formatting completed in 93ms.
from prettier-vscode.
This issue has been labeled as stale due to inactivity. Reply to keep this issue open.
from prettier-vscode.
Related Issues (20)
- "prettier.configPath" in vscode's settings.json is ignored HOT 2
- `this.prettierModule.resolveConfigFile is not a function` error when formatting HOT 4
- Prettier not working HOT 1
- The vscode extension is inconsistent with the default value of the prettier configuration file HOT 1
- Inconsistency in line break formatting in Java with Prettier in VS Code
- Ignore `CODEOWNERS` file HOT 1
- semi
- Ability to use/configure Format On Save to work with prettier configs within folders
- How to set the `rangeStart` configuration for the `prettier-vscode` extension in VS Code? HOT 2
- Prettier formatting yaml files even though a different formatter is selected... HOT 2
- Notification of breaking api change with v1.92 release of VS Code HOT 1
- Unexpectedly resolving globally installed prettier version
- Prettier extesion not working on version 10.4.0 HOT 3
- Markdown formula incorrectly formatted HOT 1
- use prettier's builtin configuration instead of falling back to VS Code configuration when locally installed prettier is used HOT 2
- [FR] `prettier.pluginsPath` HOT 1
- Include PHP Formatting Options In VSCode Extension
- Prettier error spawnSync EINVAL when formatting Apex classes HOT 7
- Option to let prettier determine format options instead of falling back to VSCode settings when project doesn't contain explicit prettier config
- Extension causes high cpu load
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prettier-vscode.