https://github.com/protofire/subgraph-prettier-config
Shared Prettier configuration to use in subgraph projects
https://github.com/protofire/subgraph-prettier-config
Last synced: 7 months ago
JSON representation
Shared Prettier configuration to use in subgraph projects
- Host: GitHub
- URL: https://github.com/protofire/subgraph-prettier-config
- Owner: protofire
- License: mit
- Created: 2020-06-17T10:31:26.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-17T22:55:25.000Z (over 5 years ago)
- Last Synced: 2025-06-01T13:09:09.591Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 2
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Subgraph Prettier Config
Opinionated Prettier configuration used by [subgraphs maintained](https://github.com/protofire?q=subgraph) by [ProtoFire](https://protofire.io/)
## Install
```Shell
$ yarn add --dev @protofire/subgraph-prettier-config
```
## Usage
Add reference to configuration module in the `package.json` file:
```JSON with Comments
{
// ...
"prettier": "@protofire/subgraph-prettier-config"
}
```
Or, if you don't want to use `package.json`, use instead any of the [supported extensions](https://prettier.io/docs/en/configuration.html)
to export a string, e.g. `.prettierrc.json`:
```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:
```JavaScript
module.exports = {
...require('@protofire/subgraph-prettier-config'),
semi: false, // override desired properties
}
```
That's it!