0.1.0 • Published 1 year ago

@aniftyco/prettier v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@aniftyco/prettier

Standardized code formatting via Prettier config for NiftyCo projects.

Install

npm install --save-dev @aniftyco/prettier

Usage

Reference @aniftyco/prettier in your package.json:

{
  "name": "my-nifty-app",
  "version": "1.2.4",
  "prettier": "@aniftyco/prettier"
}

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

// `.prettierrc.json`
"@aniftyco/prettier"
// `prettier.config.js` or `.prettierrc.js`
module.exports = '@aniftyco/prettier';

Extending

This configuration is not intended to be changed, but if you have a setup where modification is required, it is possible. Prettier does not offer an "extends" mechanism as you might be familiar from tools such as ESLint.

To extend a configuration you will need to use a prettier.config.js or .prettierrc.js file that exports an object:

module.exports = {
  ...require('@aniftyco/prettier'),
  semi: false,
};