Practical overview
When it fits
Use Solhint when a Solidity project needs a repeatable command-line check for source-level style and security-related rules, including before deployment as one part of a broader development workflow.
Who it is for
- Solidity developers
- Ethereum smart-contract teams
- Projects adding source-level code-quality checks to a developer toolchain
Documented uses
- Lint one Solidity file or a group of files matched by a glob.
- Initialize and maintain Solidity linting configuration.
- Check selected style and security-related rules before later development or deployment steps.
- Save or format lint reports for downstream tooling.
Requirements & limits
The project is publicly accessible on GitHub and is described as open source under the MIT license. The documented installation uses npm and the command-line interface.
- Solhint runs as a CLI and requires an npm-based installation path.
- Rules can be initialized from the recommended configuration and adjusted through
.solhint.json. - Multiple configuration files can apply across project directories, with the closest applicable rules taking precedence.
- Plugins are supported, including configured plugin paths for environments such as editor integrations.
- Automatic fixing is limited to the rules listed in the project documentation.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Set up Solhint for a Solidity project
Install Solhint, create its initial configuration and lint Solidity files.
Before you start
- npm
- A Solidity project or Solidity source files
Steps
Install Solhint with npm using the documented global installation command.
Run the version option to verify the command is available.
Run
solhint --initto create a.solhint.jsonconfiguration with recommended rules.Run Solhint against one Solidity file or a glob covering the project files.
Expected outcome
The project has an initialized Solhint configuration and a lint report for the selected Solidity source.
Guide limitations
- The documented setup does not establish deployment checks or broader contract assurance.
- Automatic fixes apply only to the listed supported rules.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 2 October 2026
- Original website title
- protofire/solhint · Official homepage title · retained in its source language

