@defi-wonderland/solhint-plugin
TypeScript icon, indicating that this package has built-in type declarations

0.0.0-5bf2c4c3 • Public • Published

DeFi Wonderland's Solhint Plugin

image Tests License: MIT

Overview

This custom Solhint Plugin aims to contain all of the Solidity best practices implemented at DeFi Wonderland.

Setup

Setup Solhint in your Solidity project if you haven't already. Then run:

yard add -D @defi-wonderland/solhint-plugin

or

npm install --save-dev @defi-wonderland/solhint-plugin

Finally, inside your .solhint.json configuration file, add:

"plugins": [..., "defi-wonderland"],

Available Rules

Name Description
contract-data-order Contracts storage members should be ordered: constants, immutable variables, others.
enum-name-camelcase Enums name should be in CamelCase.
immutable-name-snakecase Immutable variables names should be in capitalized SNAKE_CASE.
import-statement-format Imports should specify imported node. Example: import {A} from 'b.sol'
interface-member-order Interfaces members should be ordered: events, errors, structs, functions.
interface-starts-with-i Interfaces name should start with I. Example: IMyContract.
named-return-values Functions return values should be named.
non-state-vars-leading-underscore Variables that are not in the state should start with underscore. Example: _myVar.
struct-name-camelcase Structs name should be in CamelCase.

About DeFi Wonderland

DeFi Wonderland is a team of top Web3 researchers, developers, and operators who believe that the future needs to be open-source, permissionless, and decentralized.

DeFi sucks, but DeFi Wonderland is here to make it better.

Package Sidebar

Install

npm i @defi-wonderland/solhint-plugin

Weekly Downloads

1

Version

0.0.0-5bf2c4c3

License

MIT

Unpacked Size

37.1 kB

Total Files

43

Last publish

Collaborators

  • wonderland-bot
  • gas1cent
  • 0xng
  • 0xgorilla
  • kelvinfichter
  • wei3erhase
  • enderman0x