Skip to content

protofire/subgraph-prettier-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.jsor .prettierrc.js file and export the modifications, e.g:

module.exports = {
  ...require('@protofire/subgraph-prettier-config'),
  semi: false, // override desired properties
}

That's it!

About

Shared Prettier configuration to use in subgraph projects

Resources

License

Stars

Watchers

Forks

Packages

No packages published