Skip to content

Prettier not detecting .prettierrc on web (vscode.dev / github.dev) #2916

Open
@eamodio

Description

@eamodio

Summary

Prettier not detecting .prettierrc on web (vscode.dev / github.dev).

See the following in the Output channel:

["INFO" - 5:45:30 PM] No local configuration (i.e. .prettierrc or .editorconfig) detected, falling back to VS Code configuration

Github Repository to Reproduce Issue

https://github.dev/gitkraken/vscode-gitlens/

Steps To Reproduce:

  1. Open the repo above (which has a .prettierrc)
  2. Open a .ts file and run the formatter and notice the formatting will completely change, e.g. not honoring the .prettierrc config

Expected result

Honor the .prettierrc config

Actual result

Doesn't honor the .prettierrc config

Prettier Log Output

["INFO" - 5:41:02 PM] Extension Name: dev.prettier-vscode.
["INFO" - 5:41:02 PM] Extension Version: 0.0.0.
["INFO" - 5:41:02 PM] Using standalone prettier
["INFO" - 5:41:02 PM] Using standalone prettier
["INFO" - 5:44:33 PM] Formatting vscode-vfs://github%2B7b2276223a312c22726566223a7b2274797065223a322c226964223a2264323938633964653461303033306337633564653164616633613462323362386136313030363464227d7d/gitkraken/vscode-gitlens/src/plus/github/githubGitProvider.ts
["INFO" - 5:44:33 PM] Using standalone prettier
["INFO" - 5:44:33 PM] File Info:
{
  "ignored": false,
  "inferredParser": null
}
["WARN" - 5:44:33 PM] Parser not inferred, trying VS Code language.
["INFO" - 5:44:33 PM] No local configuration (i.e. .prettierrc or .editorconfig) detected, falling back to VS Code configuration
["INFO" - 5:44:33 PM] Prettier Options:
{
  "arrowParens": "always",
  "bracketSpacing": true,
  "endOfLine": "lf",
  "htmlWhitespaceSensitivity": "css",
  "insertPragma": false,
  "singleAttributePerLine": false,
  "bracketSameLine": false,
  "jsxBracketSameLine": false,
  "jsxSingleQuote": false,
  "printWidth": 80,
  "proseWrap": "preserve",
  "quoteProps": "as-needed",
  "requirePragma": false,
  "semi": true,
  "singleQuote": false,
  "tabWidth": 2,
  "trailingComma": "es5",
  "useTabs": false,
  "vueIndentScriptAndStyle": false,
  "filepath": "\\gitkraken\\vscode-gitlens\\src\\plus\\github\\githubGitProvider.ts",
  "parser": "typescript"
}
["INFO" - 5:44:34 PM] Formatting completed in 1015ms.
["INFO" - 5:44:34 PM] Formatting vscode-vfs://github%2B7b2276223a312c22726566223a7b2274797065223a332c226964223a2232353630227d7d/gitkraken/vscode-gitlens/src/plus/github/githubGitProvider.ts

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions