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

v1.0.4

Published

BANU ESLint config

Downloads

14

Readme

eslint-config-banu

BANU ESLint config

安装

只使用 Base 规则

1. 安装依赖

npm install eslint eslint-config-banu --save-dev

2. 添加配置

.eslintrc.js 中添加 extends banu👇

module.exports = {
  extends: ["banu"]
};

Vue 2

1. 安装依赖

npm install eslint eslint-config-banu eslint-plugin-vue --save-dev

2. 添加配置

.eslintrc.js 中添加 extends banu👇

module.exports = {
  extends: ["banu", "banu/vue2"]
};

React

1. 安装依赖

npm install eslint eslint-config-banu eslint-plugin-react --save-dev

2. 添加配置

.eslintrc.js 中添加 extends banu👇

module.exports = {
  extends: ["banu", "banu/react"]
};

Typescript

1. 安装依赖

npm install eslint typescript @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-config-banu --save-dev

2. 添加配置

.eslintrc.js 中添加 extends banu👇

module.exports = {
  extends: ["banu", "banu/typescript"]
};

参考(from gpt)

考虑接入的规则集

eslint:recommended:

这是 ESLint 官方提供的一组基本规则,用于捕获常见的错误和风格问题,是一个良好的起点,可以帮助你确保代码的基本质量。

plugin:react/recommended (如果你使用 React)

这个规则集由 eslint-plugin-react 提供,帮助你检测 React 代码中的常见问题,确保你的 React 应用的可维护性和性能。

airbnb-base 或 eslint-config-airbnb-base

Airbnb 出品的规则集,覆盖了许多最佳实践,帮助你编写一致和易维护的 JavaScript 代码。

prettier (与 Prettier 集成)

Prettier 是一个代码格式化工具,它可以自动格式化你的代码,使其保持一致的风格。与 ESLint 集成,可以确保代码风格的一致性。

eslint-plugin-import

这个插件提供了一些规则,用于检查 import 语句的正确性,帮助你管理模块导入的方式。

eslint-plugin-promise

这个插件包含了一些规则,用于确保 Promise 使用的一致性,可以帮助你避免 Promise 相关的错误。

eslint-plugin-security

安全是一个关键关注点,这个插件包含了一些规则,用于检测潜在的安全漏洞,帮助你写更安全的代码。

eslint-plugin-node (如果你在 Node.js 环境中开发)

这个插件提供了一些用于 Node.js 开发的规则,可以帮助你避免一些常见的 Node.js 特定问题。