@protofire/subgraph-prettier-config
v0.1.1
Published
Shared Prettier configuration to use in subgraphs
Downloads
6,011
Keywords
Readme
Subgraph Prettier Config
Opinionated Prettier configuration used by subgraphs maintained by ProtoFire
Install
$ yarn add --dev @protofire/subgraph-prettier-config
Usage
Add reference to configuration module in the package.json
file:
{
// ...
"prettier": "@protofire/subgraph-prettier-config"
}
Or, if you don't want to use package.json
, use instead any of the supported extensions
to export a string, e.g. .prettierrc.json
:
"@protofire/subgraph-prettier-config"
To extend the configuration to overwrite some properties from the shared configuration, import the module in a prettier.config.js
or .prettierrc.js
file and export the modifications, e.g:
module.exports = {
...require('@protofire/subgraph-prettier-config'),
semi: false, // override desired properties
}
That's it!