@zilahir/prettier-config

1.0.2 • Public • Published

@zilahir/prettier-config

This package provides a common Prettier configuration, so that all projects have consistent code formatting.

Installation

npm install --save-dev @zilahir/prettier-config

Setup

Create the following file .prettierrc.js

module.exports = require("@zilahir/prettier-config");

Running

As this package only provides the Prettier configuration, it is assumed you already have prettier installed in your project.

  • It's recommended to install the relevant Editor Addons/Plugins and enable "Pretter on Save".

  • It's recommended to add a prettier script to package.json. An example one is:

    scripts: {
      "prettier": "prettier '**/*.{js,json,css,scss,html,hbs,md}' --write"
    }

    You can then run the following, to automatically format your project's code:

    npm run prettier
    

Package Sidebar

Install

npm i @zilahir/prettier-config

Weekly Downloads

0

Version

1.0.2

License

ISC

Unpacked Size

2.02 kB

Total Files

7

Last publish

Collaborators

  • zilahir