Socket
Socket
Sign inDemoInstall

@layerzerolabs/solhint-config

Package Overview
Dependencies
Maintainers
1
Versions
137
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@layerzerolabs/solhint-config

LayerZero Solhint Config


Version published
Weekly downloads
441
decreased by-1.78%
Maintainers
1
Weekly downloads
 
Created
Source

@layerzerolabs/solhint-config

Shared solhint configuration that defines Solidity rules and their severity for LayerZero codebase. It should be used in all LayerZero repositories containing Solidity contracts to ensure the uniform conventions. The full list of solhint rules can be found in solhint repository.

Installation

  1. Install version of solhint package specified in peerDependencies section of package.config
  2. Install @layerzerolabs/solhint-config
yarn add --dev @layerzerolabs/solhint-config

Configuration

Create solhint.config.js file to configure solhint.

If you want to use only the default rules put the following line in solhint.config.js

module.exports = require("@layerzerolabs/solhint-config");

If you want to override the default rules use the following format for solhint.config.js

const defaults = require("@layerzerolabs/solhint-config");

module.exports = {
  ...defaults,
  rules: {
    ...defaults.rules,
    "compiler-version": ["error", "0.8.20"], // override
  },
};

Usage

To lint all files inside contracts directory run

yarn solhint contracts/**/*.sol

To lint a single file run

yarn solhint contracts/MyContract.sol

Keywords

FAQs

Package last updated on 27 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc