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

@dd-code/eslint-config-standard

v1.0.3

Published

dd-code eslint common config

Readme

@dd-code/eslint-config-standard

dd-code 前端通用 ESLint 配置方案,支持 TypeScript、Vue 2/3、React 项目,并集成 Prettier 代码格式化。

安装

只安装本包即可,无需再单独安装 eslint 或各类插件(本包已包含 eslint、eslint-plugin-vue、vue-eslint-parser、prettier 等):

npm install --save-dev @dd-code/eslint-config-standard
# 或
pnpm add -D @dd-code/eslint-config-standard
# 或
yarn add -D @dd-code/eslint-config-standard

安装后在项目里加上对应的 extends 即可使用。

使用 pnpm 时仍报错找不到 eslint-plugin-vue

本包带有 postinstall 脚本:安装完成后会自动把本配置依赖的包(如 eslinteslint-plugin-vuevue-eslint-parser 等)软链到项目根目录的 node_modules,这样在 pnpm 下 ESLint 也能解析到。若项目根已存在同名包则不会覆盖。

若仍希望用配置文件控制提升范围,可任选一种方式(在使用本配置的项目根目录新建 .npmrc 后重新 pnpm install):

方式一:只提升本配置用到的依赖
把本仓库根目录的 .npmrc 复制到你的项目根目录即可。

方式二:提升所有依赖

public-hoist-pattern[]=*

方式三:使用扁平 node_modules(与 npm 行为一致)

node-linker=hoisted

使用方式

根据项目类型选择对应配置扩展即可。

TypeScript / JavaScript 项目

适用于纯 TS/JS 项目(非 Vue、非 React):

// .eslintrc.js 或 .eslintrc.cjs
module.exports = {
  extends: ['@dd-code/eslint-config-standard'],
};

Vue 2 项目

// .eslintrc.js 或 .eslintrc.cjs
module.exports = {
  extends: ['@dd-code/eslint-config-standard/vue2-standard'],
};

Vue 3 项目

// .eslintrc.js 或 .eslintrc.cjs
module.exports = {
  extends: ['@dd-code/eslint-config-standard/vue3-standard'],
};

React 项目

// .eslintrc.js 或 .eslintrc.cjs
module.exports = {
  extends: ['@dd-code/eslint-config-standard/react-standard'],
};

配置包含内容

  • ESLint 推荐规则eslint:recommended
  • TypeScript@typescript-eslint/parser + @typescript-eslint/recommended
  • Prettiereslint-config-prettier + eslint-plugin-prettier(格式问题会以 ESLint 错误形式报告)
  • Import:模块导入相关规则
  • 最佳实践 / 风格 / ES6 / 变量 等自定义规则

Vue 配置额外包含:

  • eslint-plugin-vue 推荐的 Vue 规则
  • eslint-plugin-html(支持 .html<script> 的检查)

React 配置额外包含:

  • eslint-plugin-react + plugin:react/jsx-runtime
  • eslint-plugin-react-hooks

Prettier 格式

配置内置 Prettier 规则,主要约定如下(与 .prettierrc.js 一致):

  • 单引号
  • 分号
  • 2 空格缩进
  • 行宽 100
  • ES5 尾逗号
  • LF 换行符

若需覆盖,可在项目根目录添加 .prettierrc.js.prettierrc

自定义规则

可在 extends 之后通过 rules 覆盖或补充规则:

module.exports = {
  extends: ['@dd-code/eslint-config-standard/vue3-standard'],
  rules: {
    'vue/multi-word-component-names': 'warn',
    '@typescript-eslint/no-explicit-any': 'warn',
  },
};

更多说明

详细规范与说明请参考:飞书文档