npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

hardhat-ignore-warnings

v0.2.12

Published

Hardhat plugin to ignore Solidity warnings

Readme

hardhat-ignore-warnings

This plugin adds ways to ignore Solidity warnings, and a way to turn remaining warnings into errors.

Actual compilation errors will not be silenced by the plugin.

Quickstart

You can turn off all Solidity warnings by installing the plugin and configuring it as follows.

 // hardhat.config.js

+require('hardhat-ignore-warnings');

 module.exports = {
+  warnings: 'off',
 };

Customization

You can be more selective about the warnings that should be ignored and those that shouldn't.

Inline Comments

If you want to ignore a warning in a particular line without setting rules for the entire project, you can use inline comments.

// solc-ignore-next-line unused-param
function bar(uint x) public {

Configuration

In order to ignore warnings or promote to errors across the entire project or in entire files, the plugin accepts more detailed configuration.

The config is an object that maps glob patterns to warning rules. These rules will be applied to files matched by the glob pattern. More specific patterns override the rules of less specific ones.

A warning can be set to 'off', 'error' (promote to error), or 'warn' (the default), as well as false (meaning 'off') and true (meaning the local default, or 'warn' if none is set).

The special id default can be used to apply a setting to all warnings at once.

warnings: {
  // make every warning an error:
  '*': 'error',

  // equivalently:
  '*': {
    default: 'error',
  },

  // add an exception for a particular warning id:
  '*': {
    'code-size': 'warn',
    default: 'error',
  },

  // turn off all warnings under a directory:
  'contracts/test/**/*': {
    default: 'off',
  },
}

Warning IDs

Both inline comments and detailed configuration use the following set of names to identify warnings.

  • unreachable: "Unreachable code."
  • unused-param: "Unused function parameter. Remove or comment out the variable name to silence this warning."
  • unused-var: "Unused local variable."
  • unused-call-retval: "Return value of low-level calls not used."
  • code-size: "Contract code size is N bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries."
  • shadowing: "This declaration shadows an existing declaration."
  • shadowing-builtin: "This declaration shadows a builtin symbol."
  • shadowing-opcode: "Variable is shadowed in inline assembly by an instruction of the same name."
  • func-mutability: "Function state mutability can be restricted to pure/view."
  • license: "SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: " to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information."
  • pragma-solidity: "Source file does not specify required compiler version!"
  • missing-receive: "This contract has a payable fallback function, but no receive ether function. Consider adding a receive ether function." -- To ignore this warning with a comment, it must be placed before the contract definition.
  • transient-storage: "Transient storage as defined by EIP-1153 can break the composability of smart contracts: Since transient storage is cleared only at the end of the transaction and not at the end of the outermost call frame to the contract within a transaction, your contract may unintentionally misbehave when invoked multiple times in a complex transaction. To avoid this, be sure to clear all transient storage at the end of any call to your contract. The use of transient storage for reentrancy guards that are cleared at the end of the call is safe."