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

efe-lint

v1.7.0

Published

A progressive code style check tool which supports .html/.css/.js/.san

Downloads

16

Readme

efe-lint: Yet another fecs

efe-lint是一款代码规范检测工具,基于fecs, 在fecs的基础上,支持了渐进式检测。

install

npm install -g efe-lint

how to use

efe-lint [-p | --progressive] [path]

最简单的,进入一个项目,运行efe-lint命令:

cd your-project
efe-lint

efe-lint默认会对当前目录下所有html/css/js/.san文件进行代码规范检测,并有如下的输出结果:

img

efe-lint会在控制台输出每个被检测文件的规范信息,如果被检测文件中有错误,还会在最后集中打印出错的文件路径列表。

或者,也可以指定文件夹或者文件进行检测:

efe-lint ./src/demo.js
efe-lint ./src/

此外还提供了渐进式支持。所谓渐进式,就是配合git对比上次的提交,只检测相比于上次commit有过修改的文件:

efe-lint -p
# 或者
efe-lint --progressive

这样,就会自动对比上次commit之后修改了哪些文件,并进行规范检测。

配合pre-commit构建工程流,提升开发规范程度

由于efe-lint对渐进式的支持,使得其非常适合配合git hooks进行commit前的代码检测,提升团队工程项目编码规范程度。

推荐配合pre-commit实现代码自动检测。只需要安装efe-lintpre-commit,然后在package.json中增加如下配置:

  "scripts": {
      "efe-lint": "efe-lint -p"
  },
  "pre-commit": {
      "efe-lint"
  }