1.0.1 • Published 4 years ago

@voyage.studio/prettier-config v1.0.1

Weekly downloads
10
License
MIT
Repository
github
Last release
4 years ago

@voyage.studio/prettier-config

npm

A Prettier shareable config for projects using Prettier and JavaScript Standard Style as ESLint rules or separate processes.

Installation

Install with yarn add --dev @voyage.studio/prettier-config

This is only a shareable configuration. It does not install Prettier, Standard, ESLint, or any other part of the tool chain.

Usage

Reference it in package.json using the prettier property:

{
  "name": "my-projects-name",
  "prettier": "@voyage.studio/prettier-config",
  "devDependencies" : {
    "@voyage.studio/prettier-config": "^1.0.0"
  }
}

If you don't want to use package.json, you can use any of the supported extensions to export a string:

// `.prettierrc.json`
"@voyage.studio/prettier-config"
// `prettier.config.js` or `.prettierrc.js`
module.exports = '@voyage.studio/prettier-config'

Sharing configurations

Note: The above method does not offer a way to extend the configuration to overwrite some properties from the shared configuration. If you need to do that, import the file in a .prettierrc.js file and export the modifications, e.g:

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

source: https://github.com/prettier/prettier/blob/cacaa92a3f0acf9618f54cd60c9b36b37744dbde/docs/configuration.md