@mels/prettier-config

1.0.0 • Public • Published


Toolkit
@mels/prettier-config

Shareable Prettier configuration.

npm (scoped) Twitter Follow

InstallHow To UseCreditsLicense

Features

This package contains all my Prettier rules as a shareable configuration.

Install

With npm:

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

With yarn:

yarn add @mels/prettier-config --dev

How To Use

You can use this config in multiple ways, depending on your preference.

Reference it in your package.json using the prettier property:

{
  "name": "some-lib",
  "version": "0.0.0",
  "prettier": "@mels/prettier-config"
}

Use any of the supported extensions to export a string:

// .prettierrc.json
'@mels/prettier-config';
// prettier.config.js or .prettierrc.js
module.exports = '@mels/prettier-config';

If you need to extend the config, you can do so with .prettierrc.js or prettier.config.js and export the modifications in an object:

// prettier.config.js or .prettierrc.js
module.exports = {
  ...require('@mels/prettier-config'), // import the package
  semi: false, // add modifications
};

Credits

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @mels/prettier-config

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

5.68 kB

Total Files

5

Last publish

Collaborators

  • melanieseltzer