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-fx

v0.1.5

Published

Fx ESLint 规则集

Downloads

7

Readme

Fx ESLint Config

状态

| 完成版本 | 规则集 | 文档级别 | |---------|----------------------------------|------------| | v0.1.0 | 标准 JavaScript 项目规则集 | af16ebcfbb |

使用方法

  1. 安装 ESLint 依赖及规则集 eslint-config-fx
npm install --save-dev eslint babel-eslint eslint-config-fx
  1. 创建 .eslintrc.js 或将已有规则集指明为 fx
module.exports = {
    ...
    extends: [
        'fx', // 指明规则集
    ]
    ...
};

使用 ESLint 提高代码质量

本套 ESLint Config 在遵循 ESLint 设计哲学 的原则上,考虑如下几点:

  1. 显式包含全部规则:显式声明全部规则,使得在使用中不必考虑默认值问题
  2. 善用 autofix 解决风格冲突:可以充分利用自动修复功能,调配项目成员间的不一致,因此包含尽量多的风格规则
  3. 配置应当合理:考虑前端多项目、架构交互情况,酌情去除不适合的规则(如强制使用 camelCase 等)

ESLint 哲学

https://eslint.org/docs/about/#philosophy

一切都是可插拔的

  • 规则 API 均可被成型的或自定义的规则集使用
  • 格式化工具 API 均可被成型的或自定义的格式化工具集使用
  • 额外的规则或格式化工具可以被在运行时添加
  • 规则或格式化工具都不必须被绑定在一起使用

每条规则

  • 均是独立的
  • 可以被打开或关闭的 (没有什么规则可以被看作"太重要以致于不能被关闭")
  • 可以被单独设定为警告或错误两种级别

另外

  • 规则是风格中立的 - ESLint 不特别提升任何一种编程风格
  • 所有规则集都是通用的

这个项目

  • 赋予文档价值并降低沟通成本
  • 尽可能的透明
  • 相信测试的重要性