Package Exports
- @gradient-network/prettier-config
- @gradient-network/prettier-config/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@gradient-network/prettier-config) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@gradient-network/prettier-config
Prettier configuration shared for Gradient Network.
Usage
Install the package into your project.
pnpm add -D @gradient-network/prettier-configReference in your package.json by adding the field prettier.
Learn more: Sharing configurations
{
"prettier": "@gradient-network/prettier-config"
}VSCode Extension
Config extensions in your VSCode settings.
Learn more: Prettier VSCode
{
"prettier.configPath": "./package.json"
}Pre-commit Hook
Work with the git hook pre-commit, you need install husky and lint-staged.
Edit the file package.json and add the lint-staged object.
{
"lint-staged": {
"*": "prettier --ignore-unknown --write"
}
}Edit the file .husky/pre-commit and add the command.
lint-staged