question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Prettier does not consistently respect .prettierrc, .eslintrc nor vscode settings

See original GitHub issue

There are several issues in this repo regarding inconsistent behavior from this extension, so maybe this issue is already posted, but I couldn’t know for sure.

I have a .prettierrc file, a .eslintrc file and even vscode settings with the same 80 print-width settings, but the extension just doesn’t respect it. It does try to format the line, but not enough (and not like the prettier.io playground).

It has worked in the past, but not today, maybe it is an update, I don’t know. I’ve disabled auto-update from now on.

Is there any way to debug this extension? I don’t know whether it ever works and respects all my rules or if it just making things up. It’d be great if I could see what rules prettier is inferring from my setup in every file.

For example:

  • someFile.js => “Check inferred prettier settings for this file”
    • printWidth: 70 (from /.prettierrc)
    • tabWidth: 4 (from vscode settings)
    • singleQuote: true (from global prettier config)

I don’t know if my config is messed up, or if there is a bug in the extension, or if there is a bug in vscode or if I should restart my machine (I tried).

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:34
  • Comments:23 (4 by maintainers)

github_iconTop GitHub Comments

21reactions
aztackcommented, Dec 17, 2018

.prettierrc.js is a valid config name in Prettier, but it does not work with the VSCode extension here.

.prettierrc.json works. prettierrc.js and prettierrc.config.js do not work.

12reactions
arrygoocommented, Feb 17, 2018

I’ve been having this issue since a few days ago and disabling the chrome debugger plugin didn’t fix it for me. So frustrating as I want to stick with VSCode, but eslint/prettier integration seems to have broken

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found