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 🙏

© 2026 – Pkg Stats / Ryan Hefner

eslint-hook

v1.0.13

Published

auto compile eslint git hook

Readme

配置代码提交eslint门禁

1.配置npm源

npm config rm proxy 
npm config rm http-proxy
npm config rm https-proxy
npm config set registry https://registry.npmjs.org/
npm config set no-proxy .huawei.com
npm config set proxy http://w3账号:w3密码@proxyhk.huawei.com:8080/
npm config set https-proxy http://w3账号:w3密码@proxyhk.huawei.com:8080/

2.安装eslint-hook插件及eslint

npm install -g eslint-hook
npm install -g eslint

3.配置eslint依赖

在本地代码package.json目录下添加如下依赖:

...
"devDependencies": {
    ...
    "eslint": "^6.8.0",
    "eslint-config-airbnb": "^18.1.0",
    "eslint-config-airbnb-base": "^14.1.0",
    "eslint-plugin-import": "^2.20.2",
    ...
}
...

配置后执行npm install安装相关依赖

4.执行eslint-hook配置本地git工程

在本地代码根路径下执行如下命令,参数为前端工程目录相对于代码根目录的路径

eslint-hook init website\src\main\webapp\base\

4.每次git commit即会对提交的代码执行eslint校验

对于有问题的代码,根据报错信息修改后再次提交。

1586603026158

5.问题反馈

当前使用的eslint校验规则为airbnb-base,校验偏严格,大家尽量严格遵守当前规则,如果有明显不合理的,在本项目下提issuse反馈,我会定期更新。