Code Monkey home page Code Monkey logo

Comments (2)

gyohza avatar gyohza commented on June 2, 2024 2

To me it works well as long as I'm using Prettier's VS Code extension - but whenever I try

npx prettier -w **/*.vue

It will seldom work on a few files that are not deeply nested - 1 nesting, tops - whilst ignoring most of the project. There's a chance that this is related to file count rather than the nesting itself, but so far I wasn't able to tell.

For the time being, I installed Prettier globally and used find to process one file at a time and it worked, albeit with very poor performance:

find ./src -name *.vue -type f -exec prettier -w {} \;

You can use npx prettier there, but performance is already sucky as it is, it will only get worse via npx. I'm not a great shell programmer, so maybe there's some improvement that could be done. You could also point to the prettier binary inside your project's node_modules if you don't want to install it globally.

from prettier-plugin-sort-imports.

adampolyanskiy avatar adampolyanskiy commented on June 2, 2024

Okay, the problem was that I had Volar VS Code extension as default formatter for vue files instead of Prettier. =)

from prettier-plugin-sort-imports.

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.