@bedandbreakfast/prettier-config
TypeScript icon, indicating that this package has built-in type declarations

1.0.11 • Public • Published

prettier-config

The Prettier configuration for Bedandbreakfast.eu.

##Usage

  1. Make sure @bedandbreakfast/prettier-config is available in your project.

  2. Install the required dependencies into your project using:

    (
      export PKG=@bedandbreakfast/prettier-config;
      npm info "$PKG@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev
    )

    This installs the correct version of Prettier as a devDependency.

    On Windows this should work using Git for Windows.

  3. Add the following to your package.json:

    {
      "prettier": "@bedandbreakfast/prettier-config"
    }

    If you don't want to use package.json, use a .prettierrc.json that exports a string:

    "@bedandbreakfast/prettier-config"

    Or if you need to extend this config use a .prettierrc.js:

    module.exports = {
      ...require("@bedandbreakfast/prettier-config"),
      semi: false
    };

Prettier should now work in PhpStorm, hit Ctrl + Alt + Shift + P to format a file.

Prettier on save

To automatically run Prettier when saving files, use file watchers in PhpStorm:

File > Settings > Tools > File Watchers

Click + and use the build-in Prettier Template, repeat for each filetype you want this for.

Readme

Keywords

none

Package Sidebar

Install

npm i @bedandbreakfast/prettier-config

Weekly Downloads

0

Version

1.0.11

License

ISC

Unpacked Size

323 kB

Total Files

16

Last publish

Collaborators

  • bedandbreakfast