Skip to content

A series of composable ESLint plugins for libraries and frameworks that use React as a UI runtime.

License

Notifications You must be signed in to change notification settings

SayaOvO/eslint-react

Repository files navigation

eslint-plugin-react-ts

Note: This plugin is still in early development and is not ready for use.

Installation

# npm
npm install --save-dev eslint-plugin-react-ts

# or yarn
yarn add --dev eslint-plugin-react-ts

# or pnpm
pnpm add --save-dev eslint-plugin-react-ts

Usage

Legacy Config (.eslintrc, .eslintrc.json, etc.)

{
  "plugins": ["react-ts"],
  "rules": {
    "react-ts/jsx-boolean-value": "error"
  }
}

Flat Config (eslint.config.js) (requires eslint >= v8.23.0)

import reactTs from "eslint-plugin-react-ts";

export default [
  {
    plugins: {
      reactTs,
    },
    rules: {
      "react-ts/jsx-boolean-value": "error",
    },
  },
];

Supported Engine Versions

Node.js

  • 16.x Maintenance
  • 18.x LTS Hydrogen
  • 20.x Current

Bun (planned)

  • 1.x

Todo

Rules

  • react-ts/jsx-key
  • react-ts/jsx-uses-react
  • react-ts/jsx-boolean-value
  • react-ts/jsx-no-comment-textnodes
  • react-ts/jsx-no-leaked-render
  • react-ts/no-children-prop
  • react-ts/no-danger-with-children
  • react-ts/no-direct-mutation-state
  • react-ts/no-is-mounted
  • react-ts/no-render-return-value
  • react-ts/no-string-refs
  • react-ts/no-unescaped-entities
  • react-ts/no-unknown-property
  • react-ts/no-unsafe
  • react-ts/require-render-return
  • ...

Docs

  • react-ts/jsx-key
  • react-ts/jsx-uses-react
  • react-ts/jsx-boolean-value
  • react-ts/jsx-no-comment-textnodes
  • react-ts/jsx-no-leaked-render
  • react-ts/no-children-prop
  • react-ts/no-danger-with-children
  • react-ts/no-direct-mutation-state
  • react-ts/no-is-mounted
  • react-ts/no-render-return-value
  • react-ts/no-string-refs
  • react-ts/no-unescaped-entities
  • react-ts/no-unknown-property
  • react-ts/no-unsafe
  • react-ts/require-render-return
  • ...

Tests

  • react-ts/jsx-key
  • react-ts/jsx-uses-react
  • react-ts/jsx-boolean-value
  • react-ts/jsx-no-comment-textnodes
  • react-ts/jsx-no-leaked-render
  • react-ts/no-children-prop
  • react-ts/no-danger-with-children
  • react-ts/no-direct-mutation-state
  • react-ts/no-is-mounted
  • react-ts/no-render-return-value
  • react-ts/no-string-refs
  • react-ts/no-unescaped-entities
  • react-ts/no-unknown-property
  • react-ts/no-unsafe
  • react-ts/require-render-return
  • ...

License

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

THIRD-PARTY-LICENSE

This project uses code from following third-party projects:

  • eslint-plugin-perfectionist (MIT)
  • eslint-plugin-react (MIT)
  • eslint-plugin-solid (MIT)
  • griffel (MIT)

Licenses are list in THIRD-PARTY-LICENSE

About

A series of composable ESLint plugins for libraries and frameworks that use React as a UI runtime.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 88.7%
  • MDX 10.7%
  • Other 0.6%