eslint-plugin-react icon indicating copy to clipboard operation
eslint-plugin-react copied to clipboard

React-specific linting rules for ESLint

Results 270 eslint-plugin-react issues
Sort by recently updated
recently updated
newest added

I have `jsx-newline` enabled, but how can I allow these cases where I want everything to stay on the same line? Without adding `{/* eslint-disable[-line] react/jsx-newline */}` around it? ```tsx...

Following code triggers `react/jsx-no-leaked-render` although it's perfectly valid: ``` return ; ``` with: ``` foo: boolean; bar: number; ```

bug
help wanted
typescript

Consider the following code: ``` const app = new App(); // The 'app' new expression (at line 13) passed as the value prop to the Context provider (at line 22)...

bug
help wanted

The `react/require-default-props` rule configured with `ignoreFunctionalComponents: true` produces false positives for functional components that use `React.forwardRef`, like the following: ```jsx import React from "react" import PropTypes from "prop-types" const Demo...

help wanted

Hey @ljharb, long time no see! 👋 Have been pretty inactive around here, sorry about that! Lots of new students. Wanted to see what you think about a new feature...

The purpose of `ignoreTranspilerName` is to ignore inferred names: ```jsx const SFC = () => ; // inferred name const Foo = class extends React.Component {} // inferred name ```...

help wanted
question
new rule

# Description I am observing `'className' is missing in props validation` despite it being correctly specified in the type definition. - `React.DetailedHTMLProps` - https://github.com/DefinitelyTyped/DefinitelyTyped/blob/90f13b6b5e4ee2db30044f960327e17ed3ef3338/types/react/index.d.ts#L1854 - `React.HTMLAttributes.className?: string | undefined` ##...

enhancement
help wanted
typescript

Hi @yannickcr! I'm working on reducing the disk usage of a typical ESlint setup, and found a couple cases where this plugin can be slimmed down with no functional impact:...

The (react/jsx-key) rule seems to still warn for instances wrapped with the `React.Children.toArray` utility. This seems to be a bug since React no longer warns about missing keys when wrapping...

bug
help wanted

My code was OK until version 7.28.0 but fails with multiple react/jsx-indent errors in versions 7.29.0-3. **Example:** ```js render(): React.Node { const {forwardedRef, isDisabled, key} = this.props; return ; }...

bug
help wanted