Prettier ignores configuration file
I've successfully enabled prettier in the configuration. The problem is it completely ignores the .prettierrc.json file located in my project root directory.
My configuration is:
{
"parser": "typescript",
"singleQuote": true,
"trailingComma": "all",
"endOfLine": "lf"
}
but, for example, after formatting all single quotes exchanges to double quotes.
Important detail: On my other machine all works fine, but on the problematic environment my project is located on wsl2.
I'm using following prettier setting in the Webstorm:
Node interpreter: Ubuntu /home/.../node
Prettier package: \\wsl$\Ubuntu\home\...\project\node_modules\prettier
When I edit the .prettierrc.json file I'm getting question: "Use code style based on Prettier for this project?" and my answer is "yes". In logs I can find:
Prettier: The project code style and editor settings were updated based on '.prettierrc.json'.
Edit '.prettierrc.json'
But it still ignores rules from this file
Please sign in to leave a comment.
This issue is tracked at https://youtrack.jetbrains.com/issue/WEB-45978, please follow it for updates
I had a simialr issue, it was because I had a directory called /build and anything in there wouldnt work.
https://intellij-support.jetbrains.com/hc/en-us/community/posts/15399465891218-Prettier-doesnt-seem-to-care-whats-in-prettierrc?page=1#community_comment_15399737032338