Prettier-vscode: Prettier plugin stopped working / respecting configured tabSize

Created on 12 Dec 2018  路  6Comments  路  Source: prettier/prettier-vscode

I can't tell whether it's VSCode that stopped using the Prettier plugin when I invoke Format Document on my Javascript files or if it's the Prettier plugin that itself stopped respecting my settings for tabWidth: 4, but in any case it suddenly has stopped working. This has worked fine for months but all of a sudden stopped working.

Steps taken

  • Run Format Document on a Javascript file

Expected results

  • Prettier will format the code, respecting my tabWidth (4 spaces) and other settings

Actual results

  • The code is formatted (by Prettier or not, I don't know), and the tabWidth is set to 2.

Troubleshooting I've tried

  • I tried uninstalling the plugin and reinstalling to no avail.
  • I have nothing configured in workspace settings, in user settings, I have:
    "prettier.tabWidth": 4,
    "prettier.singleQuote": true,
    "prettier.jsxBracketSameLine": true,
    "prettier.trailingComma": "all",

Any ideas for troubleshooting steps that I should go through to narrow down the issue?

Versions

macOS 10.12.6
VSCode v1.29.1 (bc24f98b5f70467bc689abf41cc5550ca637088e)
Prettier-VSCode 1.7.2
Node: v10.14.1

locked

Most helpful comment

Am I the only one seeing this or is this repo just dead/unmaintained?

All 6 comments

Am I the only one seeing this or is this repo just dead/unmaintained?

My printWidth setting just stopped working as well after months of working flawlessly. This was with 1.7.3.
screen shot 2018-12-22 at 9 11 49 pm

Rolling back to 1.7.2 fixed it however. Have you tried rolling back a version?

I can confirm that the last version (1.7.3) doesn't working for me, too.
I couldn't for the life of me understand why the vscode prettier integration stopped working, but after @timothyallan remarks about rolling back to version 1.7.2 everything worked again.

@timothyallan @joelvoss thanks for describing a workaround. 1.7.2 works here too. Edit: Reverting to 1.7.2 makes it work. Really strange since the 1.7.2 version was the one having the error in the first place. Not sure what's going on here.

This is fixed in version 3.0. Do note though, that we now require you to use a prettier config file or editorconfig file. The vscode settings for prettier have been removed. You can try the preview version 3 here: https://marketplace.visualstudio.com/items?itemName=Prettier.prettier-vscode

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.

Was this page helpful?
0 / 5 - 0 ratings