@ascend-innovations/prettier-config
v1.0.2
Published
Ascend's base Prettier config
Downloads
8
Readme
Installing
- Put a
prettier.config.js
(or any valid prettier config file) in your project root - You can alternatively put the config in your
package.json
under the property"prettier"
:. This makes one less file in your project. - 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"