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.proseWrapto true in vscode settings (you will have a JSON validation warning)By editorconfig, I mean a file so named.
prettier.resolveConfigreads it.printWidthcomes from https://github.com/josephfrazier/editorconfig-to-prettier/blob/29aa34459dfec238ce179f1eb5a4fdcefb9c4961/index.js#L30-L32max_line_lengthis what is transformed toprintWidthim also having this issue. i have integers for all of the
printWidthvalues. isprintWidthsupported 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?