prettier-vscode
prettier-vscode copied to clipboard
VSCode workspaces ignore file path
Hello,
I'm running prettier in a mono-repo VSCode workspaces with a single configuration file at the root workspace.
I have a ignore rule in a .prettierignore (located at the root workspace too) which exclude all *.hbs files.
- Running prettier with the cli from the root workspace is ignoring correctly
*.hbsfiles. - Running prettier with the VSCode extension when workspaces is not activated is working too.
- But when we are in VSCode workspaces mode, prettier found the root configuration file, but aim to find a
.prettierignorein the nested workspace (instead of the root).
["INFO" - 15:26:56] Formatting file:///Users/*****/projects/*****/my-monorepo-repository/packages/my-package/src/template/html.hbs
["INFO" - 15:26:56] Using config file at '/Users/*****/projects/*****/my-monorepo-repository/package.json'
["INFO" - 15:26:56] Using ignore file (if present) at /Users/*****/projects/*****/my-monorepo-repository/packages/my-package/.prettierignore
["INFO" - 15:26:56] File Info:
{
"ignored": false,
"inferredParser": "glimmer"
}
["INFO" - 15:26:56] Detected local configuration (i.e. .prettierrc or .editorconfig), VS Code configuration will not be used
i have tried to setup the VSCode settings "prettier.ignorePath" to :
"root/.prettierignore""/.prettierignore""./.prettierignore"
and this does not change anything.
How do we force prettier to use a specific ignore file when VSCode workspace is activated ?
Environments:
- Prettier Version: 2.7.1
- Running Prettier via: VScode extensions
- Runtime: Node 18.7.0
- Operating System: macOS
Steps to reproduce:
Expected behavior:
Actual behavior: