eslint-plugin-react
eslint-plugin-react copied to clipboard
React-specific linting rules for ESLint
### Is there an existing issue for this? - [x] I have searched the existing issues and my issue is unique - [x] My issue appears in the command-line and...
### Is there an existing issue for this? - [x] I have searched the existing issues and my issue is unique - [x] My issue appears in the command-line and...
Bug report: #3951 This proposed fix treats JSX fragments like JSX elements when handling the `propElementValues` option: * It checks for unnecessary curly brackets in JSX fragments just like it...
## Add `restrictedAttributes` option to `jsx-no-literals` rule ### Summary This PR introduces a new `restrictedAttributes` option for the `jsx-no-literals` rule. With this option, you can enforce translation (i18n) only for...
[HELP WANTED] does `react/prop-types` support typescript declaration(d.ts) files in JS-only project?
Hi team, I'm working on a JS-only codebase(no `.ts` or `.tsx` files), but we use TypeScript declaration(`.d.ts`) files to define types for our components. I've configured eslint with `eslint-plugin-react` to...
### Is there an existing issue for this? - [x] I have searched the existing issues and my issue is unique - [x] My issue appears in the command-line and...
I would like to propose a change to [`react/function-component-definition`](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/function-component-definition.md) or a new adjacent rule. When a component is defined as an arrow function, we can choose to use a shorthand...
## Summary Add suport for [React Strict DOM](https://facebook.github.io/react-strict-dom/) notation of DOM nodes: `html.div`, `html.span`, `h.h1`, etc ## Details The code is based on `forbid-component-props` rule that already supported `Namespace.Component` notation....
Hi @ljharb, hope everything is going well! 👋 Quick PR to add an additional 2 cases of when to not use `react/jsx-no-undef` 1. when using TypeScript, since it has [better...