Rel1cx / eslint-react

A series of composable ESLint rules for libraries and frameworks that use React as a UI runtime.
https://eslint-react.xyz
MIT License
156 stars 6 forks source link
eslint eslint-plugin eslint-react jsx preact react tsx typescript

logo

ESLint React

Version Size Downloads

A series of composable ESLint rules rewritten from scratch for libraries and frameworks that use React as a UI runtime.

Roadmap

Features

Public packages

All-in-one plugins

Mono plugins (will be available in 2.0)

Supported ESLint versions

Supported React versions

Supported engines

Node.js

Bun

Install

# npm
npm install --save-dev @eslint-react/eslint-plugin

Setup

Add the plugin to your eslint.config.js:

// @ts-check

import js from "@eslint/js";
import react from "@eslint-react/eslint-plugin";

export default [
  js.configs.recommended,
  {
    files: ["**/*.{ts,tsx}"],
    ...react.configs.recommended,
  },
];

Full Installation Guide ↗

Presets

Full Presets List↗

Rules

Rules Overview ↗

FAQ

Frequently Asked Questions ↗

Contributing

Before you start working on something, it's best to check if there is an existing issue first. It's also a good idea to reach the maintainer and confirm if it makes sense or if someone else is already working on it.

Please make sure to read the Contributing Guide before making a pull request.

Thank you to everyone contributing to ESLint React!

License

This project is licensed under the MIT License - see the LICENSE file for details.

Inspiration

Prior art