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 🙏

© 2025 – Pkg Stats / Ryan Hefner

eslint-config-team-spec

v1.0.7

Published

适用于团队的 ESLint 规则规范

Downloads

7

Readme

eslint-config-team-spec

Build Status 版本 Greenkeeper badge

统一团队内部编码规范的 ESLint 标准规则集,目前支持 js 规则以及 vue 规则。基于 eslint-config-alloy 修改。

注释解释

  • @recommended 表示当前规则在官方基础规则中已包含,如果自定义规则和推荐规则不同则会加上 x 标识。
  • @fix 表示可以被 eslint 自动修复。
  • @desc 表示对于当前规则功能和制定的背景说明。

如何使用

请先安装相关依赖。

npm i eslint-config-team-spce eslint --save-dev

使用 JavaScript 规则

请在 .eslintrc.js 中添加以下配置,并安装相关依赖。

npm i babel-eslint --save-dev
module.exports = {
  extends: ['eslint-config-team-spec']
  // ... 自定义配置
}

使用 Prettier 规则

请在 .eslintrc.js 中添加以下配置,并安装相关依赖。

npm i prettier eslint-config-prettier eslint-plugin-prettier --save-dev
module.exports = {
  extends: [
    'eslint-config-team-spec',
    'eslint-config-team-spec/prettier',
  ]
  // ... 自定义配置
}

使用 Vue 规则

请在 .eslintrc.js 中添加以下配置,并安装相关依赖:

npm i eslint-plugin-vue vue-eslint-parser eslint-plugin-prettier-vue --save-dev

eslint-plugin-prettier-vue 可以指定将 prettier 的规则运用于 template, script, style 中的哪一个模块,默认关闭了 template 的校验。

module.exports = {
  extends: [
    'eslint-config-team-spec',
    // 如果需要 prettier
    'eslint-config-team-spec/prettier',
    'eslint-config-team-spec/vue',
  ]
  // ... 自定义配置
}

因为 eslint 本身不支持 vue 的解析所以需要在 VSCode 中添加以下配置:

// .vscode/settings.json
{
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    {
      "language": "vue",
      "autoFix": true
    },
    {
      "language": "typescript",
      "autoFix": true
    },
    {
      "language": "typescriptreact",
      "autoFix": true
    }
  ],
  "javascript.validate.enable": false,
  "vetur.format.enable": false,
  "vetur.validation.template": false,
}

本地调试

请在 VSCode 中安装 eslint 插件以及 prettier 插件,如果校验没有马上生效的话,请尝试重启 VSCode