question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

prettier.configPath don't work

See original GitHub issue

Summary

prettier.configPath don’t work

Steps To Reproduce:

  1. I create a .prettierrc.js file in ~/.prettierrc.js
  2. setting prettier.configPath "prettier.configPath": "~/.prettierrc.js"
  3. the config don’t work.
  4. I remove the .prettierrc.js file to my project’s root path;and delete the setting "prettier.configPath": "~/.prettierrc.js"
  5. the confit work.

VS Code Version: 版本: 1.40.0 提交: 86405ea23e3937316009fc27c9361deee66ffbf5 日期: 2019-11-06T17:09:34.601Z Electron: 6.1.2 Chrome: 76.0.3809.146 Node.js: 12.4.0 V8: 7.6.303.31-electron.0 OS: Darwin x64 19.0.0 Prettier & Prettier Plugin Version: Prettier - Code formatter: 3.3.5 OS and version: mac os 10.15.1

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
MartinP7rcommented, Jan 17, 2020

This seems to be still not working, at least when using in connection with remote extension (remote is linux).
getting the error:

["ERROR" - 6:32:10 PM] Error resolving prettier configuration for /path/to/project/esources/js/app.js
ENOENT: no such file or directory, open '/path/to/project/~/.prettierrc'
Error: ENOENT: no such file or directory, open '/path/to/project/~/.prettierrc'

when setting

"prettier.configPath": "~/.prettierrc",
0reactions
github-actions[bot]commented, Apr 16, 2020

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Prettier vscode extension ignoring config files - Stack Overflow
Basically Prettier: Config Path Path to the prettier configuration file option overrides all other config files regardless of placement. Share.
Read more >
Prettier config file is ignored under WSL 2 : WEB-45978
Is there any temporary workaround? I've tried with file watchers but it doesn't work with wsl as well.
Read more >
.prettierrc Not Working | Have Fun Learning
.prettierrc Not Working. August 23, 2020 lucia Leave a comment. Sometimes we just need to explicitly set prettier config path in vscode: "prettier....
Read more >
CLI - Prettier
Use the `prettier` command to run Prettier from the command line. ... Use a .prettierignore file to ignore things that should not be...
Read more >
@brixtol/prettier-config - npm
If you are working within a pnpm monorepo workspace there are 2 ways you can leverage prettier. For us here at brixtol we...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found