solhint-plugin-prettier

0.1.0 • Public • Published

solhint-plugin-prettier

This Solhint plugin lets you check that your solidity files are correctly formatted according to the solidity plugin for Prettier. 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:

{
  "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.

Package Sidebar

Install

npm i solhint-plugin-prettier

Weekly Downloads

19,696

Version

0.1.0

License

MIT

Unpacked Size

3.88 kB

Total Files

3

Last publish

Collaborators

  • fvictorio