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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@sidestream/solhint-plugin-makerdao

v0.1.1

Published

This repository contains [linting](https://en.wikipedia.org/wiki/Lint_(software)) rules and opinionated configuration for the code style enforced by [MakerDAO](https://github.com/makerdao) protocol engineers. Technically, it's a set of [solhint](https://g

Downloads

35

Readme

MakerDAO solidity linter

This repository contains linting rules and opinionated configuration for the code style enforced by MakerDAO protocol engineers. Technically, it's a set of solhint plugins and a configuration file that can be globally installed in your system and executed on demand of as a pre-commit hook.

Getting started

Use this package as a standalone cli tool

  1. Install solhint globaly via npm i -g solhint
  2. Install this repository via npm i -g solhint-plugin-makerdao@npm:@sidestream/solhint-plugin-makerdao
  3. Lint all solidity files in the current folder via npx solhint-plugin-makerdao ./**/*.sol

Add this linter to existing project

  1. Install solhint via npm i --save-dev solhint
  2. Install this repository via npm i --save-dev solhint-plugin-makerdao@npm:@sidestream/solhint-plugin-makerdao
  3. Create a new .solhint.json according to the documentation or use the one provided in this repository.
  4. Add lint script to the package.json with solhint ./**/*.sol
  5. Run npm run lint manually, in CI or before every commit

Rules

| Rule | Description | | :- | :- | | vertically-aligned-comments | Enforce comments in the same block that start with // to start on the same column | | vertically-aligned-declarations | Enforce contract scope declarations to have variable names start on the same column | | vertically-aligned-state-var-visibility | Enforce visibility modifiers such as public to start on the same column in the declarations | | no-newlines-between-function-signatures | Forbid newlines in interface defenitions | | capitalized-snake-only-for-const | Forbid CAPITALIZED_SNAKE_CASE for variables that are not constants | | newlines-between-custom-and-native-declarations | Enforce newlines between variable declarations of custom and native types (e.g. IExampleContract and uint256 ) | | constructor-arguments-unserscored | Enforce underscores for constructor argument names | | prefer-type-provided-max | enforce using type provided max values over conversions. I.e. type(uint256).max over uint256(-1) |

Publishing to npm

  1. Login to npm (if not yet) via npm login
  2. Update version field inside package.json according to the semver
    • Run npm install to propagate changes to the package-lock.json
  3. Open a PR with the changes
  4. Publish the new version via npm publish --access public