Giter Site home page Giter Site logo

Comments (5)

vedantroy avatar vedantroy commented on May 14, 2024 1

Got it. I think it might be worth adding a line to the README that says to put this plugin last.
Otherwise, people might put it first and end up formatting everything with prettier (I did this).

from dprint-plugin-prettier.

dsherret avatar dsherret commented on May 14, 2024

The main thing is it allows you to have format with prettier via dprint's CLI, which may be useful if you're using other dprint plugins and want to run everything from a single CLI.

Beyond that, it should be faster because dprint's CLI will cause multiple file formats to run in parallel and if you're using the incremental feature (https://dprint.dev/config/#incremental) it will only format files that have changed.

from dprint-plugin-prettier.

vedantroy avatar vedantroy commented on May 14, 2024

Thanks for the response.

So to clarify, this plugin will mean that dprint will format most files, but prettier will format the files that dprint doesn't support (e.g: svelte)?

from dprint-plugin-prettier.

dsherret avatar dsherret commented on May 14, 2024

Not exactly. Dprint's CLI has no clue about how to format any kind of file. The plugins do that. So if you use the prettier plugin then it will format using prettier. If you use another plugin like dprint-plugin-typescript in addition to dprint-plugin-prettier, then you can get it formatting JavaScript and TypeScript code with dprint-plugin-typescript by putting the url for dprint-plugin-typescript before dprint-plugin-prettier's url in the plugins array of the configuration file.

from dprint-plugin-prettier.

dsherret avatar dsherret commented on May 14, 2024

Done https://github.com/dprint/dprint-plugin-prettier#why-does-this-exist

from dprint-plugin-prettier.

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.