Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sj-distributor/eslint-plugin-react-native
👨💻 ESLint presets for react native
https://github.com/sj-distributor/eslint-plugin-react-native
eslint eslint-plugin eslint-prettier eslint-react-native perttier reactnative
Last synced: about 2 months ago
JSON representation
👨💻 ESLint presets for react native
- Host: GitHub
- URL: https://github.com/sj-distributor/eslint-plugin-react-native
- Owner: sj-distributor
- License: mit
- Created: 2022-10-24T02:05:13.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-05-03T03:09:21.000Z (8 months ago)
- Last Synced: 2024-10-06T09:48:32.478Z (3 months ago)
- Topics: eslint, eslint-plugin, eslint-prettier, eslint-react-native, perttier, reactnative
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/@sj-distributor/eslint-plugin-react-native
- Size: 254 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README-ZH.md
- License: LICENSE
Awesome Lists containing this project
README
# 👨💻 @sj-distributor/eslint-plugin-react-native
[![Npm Version](https://img.shields.io/npm/v/npm.svg)](https://www.npmjs.com/package/@sj-distributor/eslint-plugin-react-native)
[![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-native)
[![downloads](https://img.shields.io/npm/dm/eslint-config-standard.svg)](https://www.npmjs.com/package/@sj-distributor/eslint-plugin-react-native)
[![Ci](https://github.com/sj-distributor/eslint-plugin-react-native/actions/workflows/ci.yml/badge.svg)](https://github.com/sj-distributor/eslint-plugin-react-native/actions/workflows/ci.yml)用于 react native 的 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 eslint-plugin-eslint-plugin --dev
```接下来,安装 `@sj-distributor/eslint-plugin-react-native`:
```sh
yarn add @sj-distributor/eslint-plugin-react-native --dev
```## 使用
Add `eslint-plugin-react-native` to the extends section of your `.eslintrc` configuration file:
```json
{
"extends": ["plugin:@sj-distributor/react-native/recommended"]
}
```## 使用了哪些规则?
- [eslint](https://eslint.org/)
- [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier#readme)
- [eslint-plugin-eslint-plugin](https://github.com/eslint-community/eslint-plugin-eslint-plugin#readme)
- [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import)
- [eslint-plugin-node](https://github.com/mysticatea/eslint-plugin-node#readme)
- [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-react-native](https://github.com/intellicode/eslint-plugin-react-native)
- [eslint-plugin-simple-import-sort](https://github.com/lydell/eslint-plugin-simple-import-sort#readme)
- [@typescript-eslint](https://typescript-eslint.io/)
- [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn)