Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rel1cx/eslint-react
Monorepo for eslint-plugin-react-[x, dom, web-api, hooks-extra, naming-convention].
https://github.com/rel1cx/eslint-react
eslint-plugin-react-dom eslint-plugin-react-hooks-extra eslint-plugin-react-naming-convention eslint-plugin-react-web-api eslint-plugin-react-x
Last synced: 6 days ago
JSON representation
Monorepo for eslint-plugin-react-[x, dom, web-api, hooks-extra, naming-convention].
- Host: GitHub
- URL: https://github.com/rel1cx/eslint-react
- Owner: Rel1cx
- License: mit
- Created: 2023-08-18T22:11:16.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-18T04:30:04.000Z (8 days ago)
- Last Synced: 2024-12-18T04:51:34.428Z (8 days ago)
- Topics: eslint-plugin-react-dom, eslint-plugin-react-hooks-extra, eslint-plugin-react-naming-convention, eslint-plugin-react-web-api, eslint-plugin-react-x
- Language: TypeScript
- Homepage: https://eslint-react.xyz
- Size: 33.1 MB
- Stars: 277
- Watchers: 3
- Forks: 13
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
ESLint React
[![Version](https://img.shields.io/npm/v/@eslint-react/eslint-plugin?style=flat&colorA=000000&colorB=000000)](https://npmjs.com/package/@eslint-react/eslint-plugin)
[![Downloads](https://img.shields.io/npm/dt/@eslint-react/eslint-plugin.svg?style=flat&colorA=000000&colorB=000000)](https://npmjs.com/package/@eslint-react/eslint-plugin)A series of composable ESLint plugins for libraries and frameworks that use React as a UI runtime.
## Features
- **Universal** rules for libraries and frameworks that use React as a UI runtime.
- **Well designed** rule behaviors and sensible defaults.
- **Maximum flexibility** through minimum rule options.## Public packages
### All-in-one plugins
- [`@eslint-react/eslint-plugin`](https://www.npmjs.com/package/@eslint-react/eslint-plugin) - The main ESLint plugin package including all rules and config presets in this repository.
### Mono plugins
- [`eslint-plugin-react-x`](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) - Core rules (renderer-agnostic, compatible with x-platform).
- [`eslint-plugin-react-dom`](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) - DOM specific rules for React DOM.
- [`eslint-plugin-react-web-api`](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-web-api) - Rules for interacting with Web APIs.
- [`eslint-plugin-react-hooks-extra`](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-hooks-extra) - Extra React Hooks rules.
- [`eslint-plugin-react-naming-convention`](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-naming-convention) - Naming convention rules.## Installation
### Install
```sh
# npm
npm install --save-dev typescript-eslint @eslint-react/eslint-plugin# yarn
yarn add --dev typescript-eslint @eslint-react/eslint-plugin# pnpm
pnpm add --save-dev typescript-eslint @eslint-react/eslint-plugin
```### Setup
```js
// eslint.config.js// @ts-check
import react from "@eslint-react/eslint-plugin";
import tseslint from "typescript-eslint";export default tseslint.config({
files: ["**/*.ts", "**/*.tsx"],
extends: [
react.configs["recommended"],
],
languageOptions: {
parser: tseslint.parser,
parserOptions: {
projectService: true,
},
},
rules: {
// Put rules you want to override here
},
});
```[Full Installation Guide ↗](https://eslint-react.xyz/docs/getting-started)
## Presets
### Bare Bones
- **Core** (`core`)\
Enable rules for `"react"`.
- **DOM** (`dom`)\
Enable rules for `"react-dom"`.
- **Web API** (`web-api`)\
Enable rules for interacting with Web APIs.### General Purpose
- **Recommended** (`recommended`)\
Enforce rules that are recommended by ESLint React.\
_This preset includes the `core`, `dom`, and `web-api` presets._### TypeScript Specialized
- **Recommended TypeScript** (`recommended-typescript`)\
Same as the `recommended` preset but disables rules that can be covered by TypeScript.- **Recommended Type-Checked** (`recommended-type-checked`)\
Same as the `recommended-typescript` preset but enables additional rules that require type information.[Full Presets List↗](https://eslint-react.xyz/docs/presets)
## Rules
[Rules Overview ↗](https://eslint-react.xyz/docs/rules/overview)
## FAQ
[Frequently Asked Questions ↗](https://eslint-react.xyz/docs/faq)
## Roadmap
- [Milestone 2.0 ↗](https://eslint-react.xyz/roadmap#milestone-20)
- [Milestone 3.0 ↗](https://eslint-react.xyz/roadmap#milestone-30-draft)## Used by
![used-by](https://eslint-react.xyz/used_by.png)
### Also available in
- [`antfu/eslint-config`](https://github.com/antfu/eslint-config) - Anthony's ESLint config preset.
- [`eslint-config-sheriff`](https://github.com/AndreaPontrandolfo/sheriff) - A comprehensive and opinionated Typescript-first ESLint configuration.
- [`eslint-config-sukka`](https://github.com/SukkaW/eslint-config-sukka) - Sukka's ESLint config preset._Data collected from GitHub dependents network, if there are any mismatch or outdated information, feel free to [open issue](https://github.com/Rel1cx/eslint-react/issues/new?assignees=&labels=type%3A+documentation&projects=&template=docs_report.md&title=%5Bdocs%5D+) or pull request._
Find more on [GitHub Dependents](https://github.com/Rel1cx/eslint-react/network/dependents).
## Contributing
Please follow our [contributing guidelines](./.github/CONTRIBUTING.md).
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Inspiration
- [eslint-plugin-solid](https://github.com/solidjs-community/eslint-plugin-solid)
- [eslint-plugin-functional](https://github.com/eslint-functional/eslint-plugin-functional)
- [eslint-plugin-perfectionist](https://github.com/azat-io/eslint-plugin-perfectionist)
- [eslint-plugin-filenames-simple](https://github.com/epaew/eslint-plugin-filenames-simple)
- [rome/tools](https://github.com/rome/tools)