@s1mpson/prettier-config

1.0.1 • Public • Published

prettier-config

npm (scoped) install size code style: prettier

Shareable Prettier config for my projects to produce neat and readable code

Highlights

  • Prints single quotes instead of double quotes (including inside of JSX)
  • Prints trailing commas where possible (excluding function parameters and calls)
  • Prints single attribute per line in HTML, Vue and JSX
  • Removes semicolons at the ends of statements

Install

First, you want to install this package as a dev dependency:

$ npm install -D @s1mpson/prettier-config
# or
$ yarn add -D @s1mpson/prettier-config
# or
$ pnpm add -D @s1mpson/prettier-config
# or
$ bun add -D @s1mpson/prettier-config

Usage

Now, you just need to reference this module as your Prettier configuration.

  • You can do it by either adding "prettier" key in your package.json:
{
  // ...
  "prettier": "@s1mpson/prettier-config"
}
  • Or by creating .prettierrc or .prettierrc.json file with the name of this package as its only content:
"@s1mpson/prettier-config"

Voilà! You now have a working Prettier configuration!

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @s1mpson/prettier-config

      Weekly Downloads

      20

      Version

      1.0.1

      License

      MIT

      Unpacked Size

      3.73 kB

      Total Files

      4

      Last publish

      Collaborators

      • s1mpson