Eslint Plugin React: v7.31.0 Release

Release date:
August 24, 2022
Previous version:
v7.30.2 (released August 24, 2022)
Magnitude:
8 Diff Delta
Contributors:
1 total committer
Data confidence:
Commits:

Top Contributors in v7.31.0

ljharb

Directory Browser for v7.31.0

We haven't yet finished calculating and confirming the files and directories changed in this release. Please check back soon.

Release Notes Published

Added

  • [jsx-newline]: add allowMultiline option when prevent option is true (#3311 @TildaDares)
  • [forbid-dom-props]: add disallowedFor option (#3338 @TildaDares)

Fixed

  • [jsx-no-literals]: properly error on children with noAttributeStrings: true (#3317 @TildaDares)
  • [jsx-key]: catch key errors inside conditional statements (#3320 @TildaDares)
  • [display-name]: Accept forwardRef and Memo nesting in newer React versions (#3321 @TildaDares)
  • [jsx-key]: avoid a crash from optional chaining from #3320 (#3327 @ljharb)
  • [jsx-key]: avoid a crash on a non-array node.body from #3320 (#3328 @ljharb)
  • [display-name]: fix false positive for assignment of function returning null (#3331 @apbarrero)
  • [display-name]: fix identifying _ as a capital letter (#3335 @apbarrero)
  • [require-default-props]: avoid a crash when function has no props param (#3350 @noahnu)
  • [display-name], component detection: fix HOF returning null as Components (#3347 @jxm-math)
  • [forbid-prop-types]: Ignore objects that are not of type React.PropTypes (#3326 @TildaDares)
  • [display-name], component detection: fix false positive for HOF returning only nulls and literals (#3305 @golopot)
  • [jsx-no-target-blank]: False negative when rel attribute is assigned using ConditionalExpression (#3332 @V2dha)
  • [jsx-no-leaked-render]: autofix nested "&&" logical expressions (#3353 @hduprat)
  • [jsx-sort-props]: sorted attributes now respect comments (#3358 @ROSSROSALES)

Changed

  • [Refactor] [jsx-indent-props]: improved readability of the checkNodesIndent function (#3315 @caroline223)
  • [Tests] [jsx-indent], [jsx-one-expression-per-line]: add passing test cases (#3314 @ROSSROSALES)
  • [Refactor] boolean-prop-naming, jsx-indent: avoid assigning to arguments (#3316 @caroline223)
  • [Docs] [sort-comp]: add class component examples (#3339 @maurer2)
  • [Docs] [jsx-no-useless-fragment]: add more examples of correct code (#3349 @karlhorky)
  • [Docs] [jsx-boolean-value]: add jsdoc types for helper functions (#3344 @caroline223)
  • [readme] remove dead codeclimate badge, add actions badge (@ljharb)
  • [readme] Remove dead david-dm badge (#3262 @ddzz)
  • [Refactor] [jsx-closing-bracket-location], [jsx-no-bind]: fix eslint issues (#3351 @caroline223)
  • [Tests] [function-component-definition]: add passing test cases (#3355 @TildaDares)
  • [Docs] [jsx-no-target-blank]: Fix link to link-type-noreferrer (#3319 @Luccasoli)
  • [Docs] document which rules provide suggestions (#3359, #3365 @bmish)
  • [Docs] Consistent rule descriptions and doc sections (#3361 @bmish)
  • [Docs] Standardize deprecated rule notice (#3364 @bmish)
  • [Docs] Fix typos (#3366 @bmish)
  • [Docs] Add markdownlint for documentation formatting consistency (#3367 @bmish)
  • [Docs] Add config notice to rule docs (#3362 @bmish)