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

@runningsnail/eslint-config-cdfe

v1.0.1

Published

eslint 配置文件

Readme

CD FE eslint config

抽取相关配置,形成满足特定规范的配置文件

配置规则文件

本库里面目前针对使用不同技术栈的工程,提供了不同的配置文件。但其核心的编码规范和代码格式是一致的。

  • vue

该配置文件,针对 Vue 2.0+ 的传统项目

module.exports = {
  root: true,
  extends: ['@runningsnail/cdfe/vue'],
};
  • vue-ts 该配置文件,针对 vue 2.0+ 以及 typescript 的项目使用
module.exports = {
  root: true,
  extends: ['@runningsnail/cdfe/vue-ts'],
};
  • weixin 该配置文件,针对原生微信小程序项目使用
module.exports = {
  root: true,
  extends: ['@runningsnail/cdfe/weixin-mini-program'],
};

如何使用

安装依赖

该配置文件基于 eslint 库,以及相关插件。本库只包含配置项,因此需要自己安装以下的库和插件。


// 使用 yarn 安装
yarn add eslint eslint-plugin-prettier eslint-plugin-vue --save-dev

// 使用 npm 安装
npm install eslint eslint-plugin-prettier eslint-plugin-vue --save-dev

在工程中加入相关配置文件

在工程根目录下创建以下几个文件:

  • .eslintrc.js

该文件是 eslint 的配置文件,在该文件下可以写入以下内容:

module.exports = {
  root: true,
  extends: ['@runningsnail/cdfe/vue'],  // 注意这里是传统vue项目使用的配置文件。根据不同的项目使用不同的配置文件
};
  • .prettierrc.js

该文件为 prettier 的配置文件,可以方便我们格式化代码,在该文件下可以写入以下内容:


module.exports = require('@runningsnail/eslint-config-cdfe/prettier');

vscode 安装相关插件

vscode中安装以下插件:

  • Code Spell Checker

该插件是单词拼写检测插件

  • Eslint

本地 Eslint 插件,可以在编写代码时,实时提示不符合预设规则的代码。

  • Prettier

本地 Prettier 插件, 可以帮助代码格式化。

至此,工程已经接入本代码规范和代码格式