What’s New

eslint-plugin-react

Developer Tools

eslint-plugin-react release notes.

Latest v7.37.5 · by eslint-plugin-reactWebsitejsx-eslint/eslint-plugin-react

Changelog

v7.37.5

Changed
  • Clean up phrasing in button-has-type documentation
Fixed
  • Allow shadow root attrs on <template> in no-unknown-property
  • Support ComponentPropsWithRef from a namespace import in prop-types
  • Detect constructed context values in React 19 <Context> usage in jsx-no-constructed-context-values
  • Allow transform-origin on rect in no-unknown-property
Fixed
Changed

v7.37.4

Fixed
  • Support onBeforeToggle, popoverTarget, popoverTargetAction attributes in no-unknown-property rule
  • Fix types of flat configs
Fixed
  • no-unknown-property: support onBeforeToggle, popoverTarget, popoverTargetAction attributes (#3865 @acusti)
  • [types] fix types of flat configs (#3874 @ljharb)

v7.37.3

Fixed
  • no-danger: avoid a crash on a nested component name
  • Correct generated type declaration
  • no-unknown-property: support precedence prop in React 19
  • prop-types: props missing in validation when using generic types from a namespace import
Fixed
  • no-danger: avoid a crash on a nested component name (#3833 @ljharb)
  • [Fix] types: correct generated type declaration (#3840 @ocavue)
  • no-unknown-property: support precedence prop in react 19 (#3829 @acusti)
  • prop-types: props missing in validation when using generic types from a namespace import (#3859 @rbondoc96)
Changed

v7.37.1

Changed
  • Fix shared settings link in readme
Fixed
  • Do not npmignore d.ts files
Fixed
  • [meta] do not npmignore d.ts files (#3836 @ljharb)
Changed
  • [readme] Fix shared settings link (#3834 @MgenGlder)

v7.37.0

Added
  • Add type generation
  • Add suggestions to no-unescaped-entities rule
  • Add allowedForPatterns and disallowedForPatterns options to forbid-component-props rule
  • Add propNamePattern option to no-unstable-nested-components rule to support custom render prop naming conventions
Changed
  • Update readme flat config example for react 17+
Added
Changed
  • [readme] flat config example for react 17+ (#3824 @GabenGar)

v7.36.1

Fixed
  • Fix logic in method name check for no-is-mounted rule
  • Avoid crashing on valueless boolean props in jsx-no-literals rule
Fixed

v7.36.0

Added
  • Allow this.refs in React > 18.3.0 for no-string-refs rule
  • Add elementOverrides option to jsx-no-literals rule and ability to ignore this rule on specific elements
  • Add forward-ref-uses-ref rule for checking ref parameter is added
Changed
  • Add JSDoc type annotations to types
Fixed
  • Use type args in function-component-definition, boolean-prop-naming, jsx-first-prop-new-line, jsx-props-no-multi-spaces, and propTypes rules
  • JSX pragma fails gracefully
  • Add explicitSpread option to jsx-props-no-spreading rule schema
Added
Fixed
Changed
  • [Tests] add @typescript-eslint/parser v6 (#3629 @HenryBrown0)
  • [Tests] add @typescript-eslint/parser v7 and v8 (#3629 @hampustagerud)
  • [Docs] no-danger: update broken link (#3817 @lucasrmendonca)
  • [types] add jsdoc type annotations (#3731 @y-hsgw)
  • [Tests] button-has-type: add test case with spread (#3731 @y-hsgw)

v7.35.2

Fixed
  • avoid autofixing attributes with double quotes to a double quoted attribute in jsx-curly-brace-presence rule
Fixed