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

Hey guys! I was wondering if there are any plans to do a similar rule to react/no-access-state-in-setstate but for useState? I feel that there is still a lot of benefit...

question
new rule

Hello First, thank you for the plugin which works very well and helps us catch a lot of issues at code time :-) I have a use-case in my project...

enhancement
question

[The documentation for the `function-component-definition` rule](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/docs/rules/function-component-definition.md) helpfully points out, that certain cases in TypeScript code using generics can not be fixed. For example this: ```ts function Component(props: Props) { return...

help wanted
typescript

After upgrading to 7.25.0 I get a false positive from `react/function-component-definition` on the anonymous arrow function returned inside this: ``` function mapStateToProps() { const internItems = makeInternArray(); const internClassList =...

bug
help wanted

The sort props rule is fantastic for consistency, but I'm wondering if it's possible to order props besides just alphabetically or by the given booleans in the current rule options....

question

Autofix for jsx-sort-props doesn't respect comments. For example: ```jsx ``` will be fixed like this: ```jsx ``` But I think it should be like this: ```jsx ```

bug
help wanted

There's a false positive on the rule with forwarded children. Use cases are pretty rare but still exist. Without a fragment around the `children`, code breaks at runtime ``` const...

help wanted

The rule `react/no-unused-prop-types` doesn't seem to pick up that the component has unused props. Environment: Dependencies: ``` "typescript": "4.6.3", "eslint-plugin-react": "7.30.1", "@typescript-eslint/eslint-plugin": "5.29.0", "@typescript-eslint/parser": "5.29.0", ``` `eslintrc.js` ```js module.exports =...

bug
help wanted
typescript

Please see this comment: https://github.com/prettier/eslint-plugin-prettier/issues/65#issuecomment-1184764958

bug
help wanted

I have this code example ```js ``` Both target and rel attribute are dynamically defined, and always both present when needed. However, the rule reports it as an error: ```...

enhancement
help wanted