Option "printWidth" must be of type
See original GitHub issueHello, 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
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:15 (5 by maintainers)
Top Results From Across the Web
Options - Prettier
Prettier's printWidth option does not work the same way. It is not the hard upper allowed line length limit. It is a way...
Read more >VSCode prettier's printWidth - Stack Overflow
If yes, open the "Output" tab in VS Code and try to format the file. What do you see as output (you might...
Read more >VS Code Prettier Setting: prettier.printWidth - YouTube
Want to master VS Code? Click here: https://andrecasal.com/courses/mastery-for-vs-codeWant to upgrade web dev skills?
Read more >Visual Studio Code and Prettier not respecting print width field
Visual Studio Code and Prettier not respecting print width field. Hi all, I have decided to swap from the dev console to visual...
Read more >How to use the prettier.formatWithCursor function in prettier
{ printWidth?: number }>); // $ExpectError (Options should have proper types) ... Test return types */ let result; result = prettier.format(code); (result: ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@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 toprintWidth