npm.io
1.0.2 • Published 4 years ago

@ascend-innovations/prettier-config

Licence
MIT
Version
1.0.2
Deps
0
Size
5 kB
Vulns
0
Weekly
0

[Add cover image here]

Ascend's Prettier config for consistent formatting


NPM version PRs welcome!

Installing

  1. Put a prettier.config.js (or any valid prettier config file) in your project root
  2. You can alternatively put the config in your package.json under the property "prettier":. This makes one less file in your project.
  3. Install dependencies and select the configuration you want (available configs listed below)

Default Configuration

The default install will install all required AND optional dependencies. You can safely remove un-needed packages without triggering a peer dependency warning if you aren't consuming the associated configs:

Install it with NPM: npx install-peerdeps --dev @ascend-innovations/prettier-config
Install it with Yarn: npx install-peerdeps --dev @ascend-innovations/prettier-config -Y\

Use it with no overrides:

module.exports = require('@ascend-innovations/prettier-config')

OR in package.json

"prettier: "@ascend-innovations/prettier-config"

Use it and allow overrides:

module.exports = {
    ...require('@ascend-innovations/prettier-config')
}

Notes: If you are using ESLint, you will want to add prettier as the last item in your extends array.

Svelte Configuration

Use it: Svelte is a bit finicky with Prettier setups and requires it's own plugin, so we have it as a separate export.

module.exports = {
    ...require('@ascend-innovations/prettier-config/svelte')
}

OR in package.json

"prettier: "@ascend-innovations/prettier-config/svelte"