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-chaos-react

v1.0.0

Published

> 自己用的, 在家好找一点

Downloads

4

Readme

React Eslint 配置

自己用的, 在家好找一点

配置 eslint

{
  "extends": ["eslint-config-chaos-react"]
}

安装

yarn add eslint-config-chaos-react

安装后 VSCode ESLint 插件不能够正常工作的话, 问题应该是 依赖冲突, 可以安装 peerDependices 到工程跟目录, 或者使用下面这个命令

npx install-peerdeps eslint-config-chaos-react

使用

extends:
  - "eslint-config-chaos-react"

依赖冲突

这是一个比较沙雕的问题, 安装包的时候逻辑大概是这样的

项目里面有跟当前 dep 版本冲突的吗?

  1. 没有: 直接安装到 跟项目的 node_modeuls (这种情况是没有问题的)
  2. 有: 安装到 eslint-config-chaos-react/node_modules (这里就开始有隐患了)

然后在这个配置中, 是有 extends 和使用其他的 plugins 的, 然后 eslint 的配置是根据项目目录的 node_modules 来查找对应插件(参考下方链接), 这时候就会出现找不到的情况, 这种情况下, 就需要很难受的 手动来安装 eslint 所需要的插件到项目的 node_modules 中来处理这种问题

当然可以等等 npm@7 的 peerDependices 来处理, 见下方文档

参考文档

 yarn add @typescript-eslint/eslint-plugin @typescript-eslint/parser babel-eslint eslint eslint-config-prettier eslint-config-react-app eslint-plugin-flowtype eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-prettier eslint-plugin-react eslint-plugin-react-hooks prettier