prettier-vscode: Option "printWidth" must be of type
Hello, How can I solve this? It used to work just fine, and start getting this error since yesterday. ` Option “printWidth” must be of type: number but instead received: string
Example: { “printWidth”: 80 }`
I’m new to VSCode, How can I solve this? Thanks
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 4
- Comments: 15 (5 by maintainers)
@ray-su For proseWrap, this is certainly because you have a prettier 1.8 installed locally. 3 solutions:
{"proseWrap": true}
prettier.proseWrap
to true in vscode settings (you will have a JSON validation warning)By editorconfig, I mean a file so named.
prettier.resolveConfig
reads it.printWidth
comes from https://github.com/josephfrazier/editorconfig-to-prettier/blob/29aa34459dfec238ce179f1eb5a4fdcefb9c4961/index.js#L30-L32max_line_length
is what is transformed toprintWidth
im also having this issue. i have integers for all of the
printWidth
values. isprintWidth
supported by editorConfig? its not listedI’m also having this issue. I’ve removed all prettier configurations and just using the default plugin options and still seeing this error.
I found this in my setting:
"prettier.printWidth": 80,
It is a number. Is this a bug from VSCode?