Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sj-distributor/eslint-plugin-react
👨💻 ESLint presets for react
https://github.com/sj-distributor/eslint-plugin-react
eslint eslint-plugin eslint-react perttier react react-web
Last synced: about 2 months ago
JSON representation
👨💻 ESLint presets for react
- Host: GitHub
- URL: https://github.com/sj-distributor/eslint-plugin-react
- Owner: sj-distributor
- License: mit
- Created: 2022-12-30T07:13:19.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-21T05:50:10.000Z (almost 2 years ago)
- Last Synced: 2024-10-30T10:44:26.303Z (2 months ago)
- Topics: eslint, eslint-plugin, eslint-react, perttier, react, react-web
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/@sj-distributor/eslint-plugin-react
- Size: 108 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README-ZH.md
- License: LICENSE
Awesome Lists containing this project
README
# 👨💻 @sj-distributor/eslint-plugin-react
[![Npm Version](https://img.shields.io/npm/v/npm.svg)](https://www.npmjs.com/package/@sj-distributor/eslint-plugin-react)
[![MIT License](https://img.shields.io/npm/l/react-native-tab-view.svg?style=flat-square)](https://www.npmjs.com/package/@sj-distributor/eslint-plugin-react)
[![downloads](https://img.shields.io/npm/dm/eslint-config-standard.svg)](https://www.npmjs.com/package/@sj-distributor/eslint-plugin-react)
[![Ci](https://github.com/sj-distributor/eslint-plugin-react/actions/workflows/ci.yml/badge.svg)](https://github.com/sj-distributor/eslint-plugin-react/actions/workflows/ci.yml)用于 react 的 ESLint 预置
## 安装
你首先需要安装 [ESLint](https://eslint.org/) 和约定的第三方插件包:
```sh
yarn add eslint @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-config-prettier eslint-plugin-import eslint-plugin-prettier eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-simple-import-sort eslint-plugin-unicorn prettier typescript
```接下来,安装 `@sj-distributor/eslint-plugin-react`:
```sh
yarn add @sj-distributor/eslint-plugin-react
```## 使用
Add `eslint-plugin-react` to the extends section of your `.eslintrc` configuration file:
```json
{
"extends": ["plugin:@sj-distributor/react/recommended"]
}
```## 使用了哪些规则?
- [eslint](https://eslint.org/)
- [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier#readme)
- [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import)
- [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier#readme)
- [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react)
- [eslint-plugin-react-hooks](https://www.npmjs.com/package/eslint-plugin-react-hooks)
- [eslint-plugin-simple-import-sort](https://github.com/lydell/eslint-plugin-simple-import-sort#readme)
- [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint#readme)
- [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint#readme)
- [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn#readme)