eslint-plugin-react
eslint-plugin-react copied to clipboard
React-specific linting rules for ESLint
Closes #3216 . ~~The categories are taken from https://eslint.org/docs/rules/ .~~ Rendered Readme: https://github.com/yannickcr/eslint-plugin-react/blob/793d5374e09beb34dfcbc4ac3e8494f6ecaf48f1/README.md
Add `type` property to all rules to support usage of eslint's `--fix-type` option Fixes #2618. Fixes #2039. Successor of this PR: https://github.com/yannickcr/eslint-plugin-react/pull/2619
Enforced by [eslint-plugin/require-meta-schema](https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin/blob/master/docs/rules/require-meta-schema.md) after the eslint-plugin-eslint-plugin v4 upgrade (https://github.com/yannickcr/eslint-plugin-react/pull/3105).
#3008 request to add a test for maintainers - figure out why there's a false positive - adds an easy way to keep investigating the issue - No side effects...
This PR adds an ability to set ignored tags when checking the `jsx-sort-props` rule. Generally, we like the idea of sorting props but in some cases it does not make...
Hello! eslint-plugin-react is an amazing plugin - it catches so many problems that I consider it indispensable :) Recently on a large-ish project I noticed some of the rules running...
With `ignoreUnsafeChildren` enabled, this rule will only warn about useless fragments that removing would guarantee no change in behavior. addresses some of: https://github.com/yannickcr/eslint-plugin-react/issues/2584
This rule disallows use of `&&` inside JSX Embeds to avoid conditional numbers from being rendered. Fixes https://github.com/yannickcr/eslint-plugin-react/issues/1979
Discussed in https://github.com/yannickcr/eslint-plugin-react/issues/2847 ## Test ``` npm run lint npm run test ``` shows no errors and warnings --- - [x] Added it in README
Fixes #2842. As explained by @ljharb, the issue there isn’t that it’s nested - it’s that it’s treated as a component despite being used in an object literal with a...