GithubHelp home page GithubHelp logo

Comments (6)

CiGit avatar CiGit commented on May 26, 2024 1

This extension doesn't make use of your global installed prettier. By local I was meaning one lying in a node_modules on the path to your file. Exactly the same prettier as if you would require("prettier") from your file.
You have to at least reload window for this extension to pick the new version up. Previous version was cached by node.

I think we should put those information into the readme ( Any native english speaker to do that 😄 )

from prettier-vscode.

CiGit avatar CiGit commented on May 26, 2024

We currently have a problem with those kind of errors #55 .
It seems to be a problem with our settings and prettier's version you are using.
Do you have any prettier@ < 0.19 installed locally?
You can also see the complete error message in Help -> Toggle Developer Tools

from prettier-vscode.

marcpechaitis avatar marcpechaitis commented on May 26, 2024

Thank you @CiGit.

I have Prettier 0.22.0 installed locally.

I used the Help -> Toggle Developer Tools and confirmed the error message is the same "trailingComma" error per #54 and #55

from prettier-vscode.

CiGit avatar CiGit commented on May 26, 2024

If it uses Prettier 0.22 it shouldn't yell for those trailingComma. By default we pass 'none' in which is valid for that Prettier version.
I'm confused, your settings seems fine regarding trailingComma.

from prettier-vscode.

marcpechaitis avatar marcpechaitis commented on May 26, 2024

Update:
I checked that the version of Prettier in the package.json was ^0.18.0, but I also have it installed globally at 0.22.0. Confirmed (via which prettier) that it was using the global version.

I changed the version in my package.json to ^0.22.0, ran npm update, closed VSC and after re-opening my problems went away. (I'm not sure if all those steps are necessary or proper...still trying to grok it all!). Is it possible that the ^0.18.0 version in package.json was throwing it off?

from prettier-vscode.

github-actions avatar github-actions commented on May 26, 2024

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.

from prettier-vscode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.