Speeding up Prettier locally using the new –cache CLI option

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • parallel-prettier

    Concurrent prettier runner

  • There are third party options you could try like this one (no personal experience): https://github.com/microsoft/parallel-prettier

    Alternatively, it’s pretty common to only run prettier on changed files using lint-staged or pretty-quick.

  • jest-runner-prettier

    Prettier runner for Jest

  • You can run it through jest:

    https://github.com/keplersj/jest-runner-prettier

    Or run it through eslint through jest (which is what we do):

    https://github.com/jest-community/jest-runner-eslint

    https://www.npmjs.com/package/eslint-plugin-prettier

    Either way gets you parallelism from jest. Personally I like the approach of using jest for all the "match files and run actions" logic (tests, lint etc) and then eslint for all the kinds of linting and formatting.

    We then configure VSCode to lint autofix on save and get a really nice experience.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • jest-runner-eslint

    An ESLint runner for Jest

  • You can run it through jest:

    https://github.com/keplersj/jest-runner-prettier

    Or run it through eslint through jest (which is what we do):

    https://github.com/jest-community/jest-runner-eslint

    https://www.npmjs.com/package/eslint-plugin-prettier

    Either way gets you parallelism from jest. Personally I like the approach of using jest for all the "match files and run actions" logic (tests, lint etc) and then eslint for all the kinds of linting and formatting.

    We then configure VSCode to lint autofix on save and get a really nice experience.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts