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

eslint-config-zcs1

v2.2.0

Published

基于 eslint,react 插件,import 插件,a11y 插件,参考了 airbnb 配置

Downloads

15

Readme

javaScript 和 React 规范

基于 eslint,react 插件,import 插件,a11y 插件,参考了 airbnb 配置

如何使用

对应npm:eslint-config-zcs1

如何更新插件

执行npm run checkRule,会把当前规则和 eslint 官网以及使用插件官网上的规则进行比较,按照提示更新 rule 文件夹

添加或修改规范后,必须严格按照下面样式更新 jsDoc 的注释,并重新生成文档

如何创建文档

执行npm run createDoc 根据 rule 文件夹下的 jsDoc 注释生成文档

关于规范中的注释

注释风格是 jsdoc 形式,请严格按照如下格式修改

/**
 * @meaning
 * 强制要求<hX>的内容不为空
 * @why
 * 标题对正常和残障人士一样重要:精心编写和正确排序的<hX>标签可以
 * 帮助用户更好了解文章内容,节省用户时间。
 * 对于阅读器用户来说,看不到样式,只能通过<hX>标签来确定标题,因此<hX>标签很重要
 * @wrong
 * <h1 />
 * <h1><TextWrapper aria-hidden />
 * @right
 * <h1>Heading Content!</h1>
 * <h1><TextWrapper /><h1>
 * <h1 dangerouslySetInnerHTML={{ __html: 'foo' }} />
 */

meaning

规则含义

why

解释为什么定这个规则

wrong

错误例子

right

正确例子

关于后缀

import中的settings的import/resolver的extension表示如果文件a省略后缀,将按照a.js a.jsx a.json
的顺序尝试解析
'import/resolver': {
  node: {
    extensions: ['.js', '.jsx', '.json'],
  },
}


import中的规则的extension表示,这些后缀是默认的,不允许出现