Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fvictorio/solhint-plugin-prettier
A Solhint plugin for checking your contracts style
https://github.com/fvictorio/solhint-plugin-prettier
Last synced: 3 months ago
JSON representation
A Solhint plugin for checking your contracts style
- Host: GitHub
- URL: https://github.com/fvictorio/solhint-plugin-prettier
- Owner: fvictorio
- Created: 2019-01-07T13:21:31.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-10-31T00:02:27.000Z (about 1 year ago)
- Last Synced: 2024-10-04T12:47:16.065Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 12.7 KB
- Stars: 28
- Watchers: 4
- Forks: 13
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-web3-tools-and-dapps - Solhint-Prettier Plugin - Tidy up your files using the Solidity plugin for Prettier, a tool that formats code. (dApps directory / Static Analysis Tools)
README
# solhint-plugin-prettier
This [Solhint](https://github.com/solhint-community/solhint-community) plugin lets you check that
your solidity files are correctly formatted according to the [solidity plugin
for Prettier](https://github.com/prettier-solidity/prettier-plugin-solidity).
Each difference with how prettier would format it is reported as an individual
issue.## Setup
First install the necessary packages:
```
npm install --save-dev solhint-community solhint-plugin-prettier prettier prettier-plugin-solidity
```Then add a `.solhint.json` configuration file:
```json
{
"plugins": ["prettier"],
"rules": {
"prettier/prettier": "error"
}
}
```This rule will emit an error for each difference between your code and how prettier-solidity would format it. You can also set it to `warning` instead of `error` if you prefer that.