Releases: jsx-eslint/eslint-plugin-react
Releases · jsx-eslint/eslint-plugin-react
v7.23.0
v7.22.0
v7.21.5
v7.21.4
v7.20.0
Added
- support eslint v7 (#2635 @ljharb, @toshi-toma)
forbid-component-props
/forbid-dom-props
: Allow a custom message with forbid props (#2615 @mtamhankar1)jsx-no-literals
: addignoreProps
option to ignore props validation (#2146 @iiison)
Fixed
jsx-sort-props
: only use localeCompare when case is ignored (#2556 @tanmoyopenroot)jsx-key
: add a failing test case for optional chaining (#2610 @JonathanLee-LX)no-unused-state
: handle optional chaining (#2588 @golopot)jsx-pascal-case
: Do not consider namespaces when checking for DOM (#2638 @yacinehmito)jsx-curly-spacing
,jsx-no-bind
,usedPropTypes
util: avoid node.start and node.end (25b1936 @toshi-toma)jsx-no-target-blank
: allowno-referrer
withoutnoopener
by default (#2043 @seancrater)button-has-type
: improve message when non-static value is used (aecff62 @golopot)no-adjacent-inline-elements
: prevent crash on nullish children (#2621 @Rogdham)prop-types
: avoid crash when spreading any type (#2606 @golopot))require-render-return
: add missing "a" (#2604 @leothorp)jsx-no-comment-textnodes
: fix for@typescript-eslint/parser
(#2601 @Axnyff)- [
displayName
][]: avoid a crash when using React.memo (#2587 @golopot)
Docs
- Clean up examples in rule docs (#2546 @silvenon)
- [readme] Add Rules of Hooks to Other useful plugins section (#2633 @petetnt)
no-this-in-sfc
: backtickthis
(#2616 @mrflip)function-component-definition
: Fix unnamedComponents option examples (#2608 @vkrol))
Changed
- [Deps] Move "semver" to devDependencies (#2595 @rajivshah3)
- [eslint] remove
operator-linebreak
override (#2578 @golopot) - [Tests]
button-has-type
: ensure no mistakenly allowed identifiers namedbutton
/submit
/reset
(#2625 @golopot) - [Tests]
displayName
: add a test case (#2593 @golopot) - [Dev Deps] update
@types/eslint
,@types/estree
,@types/node
,@typescript-eslint/parser
,coveralls
,eslint-config-airbnb-base
,eslint-plugin-import
,typescript
v7.17.0
Added
jsx-no-target-blank
: addallowReferrer
option (#2478 @eps1lon)jsx-handler-names
: addcheckLocalVariables
option (#2470 @aub)prop-types
: Support Flow Type spread (#2446 @moroine)jsx-props-no-spreading
: addexplicitSpread
option to allow explicit spread of props (#2449 @pawelnvk)jsx-no-target-blank
: warn ontarget={'_blank'}
expressions (#2451 @timkraut)
Fixed
sort-prop-types
,jsx-sort-default-props
: disable broken autofix (#2505 @webOS101)no-typos
: improve report location (#2468 @golopot)jsx-no-literals
: trim whitespace forallowedStrings
check (#2436 @cainlevy)jsx-curly-brace-presence
: Fix filter of undefined error with whitespace inside jsx attr curlies (#2460 @dustinyoste)no-render-return-value
: should warn when used in assignment expression ([#2462][] @jichu4n)jsx-curly-brace-presence
: allow trailing spaces in literal (#2448 @doochik)
Changed
- [Deps] update
jsx-ast-utils
,object.fromentries
,resolve
- [eslint] fix func-names and change object-shorthand to 'always' (#2483 @golopot)
- [Docs]
jsx-first-prop-new-line
: Fix documentation formatting (#2489 @pjg) - [Docs]
prop-types
: Update 'skipUndeclared' in rule options (#2504 @cjnickel) - [Docs]
jsx-first-prop-new-line
: fix wrong rule name (#2500 @zgayjjf) - [eslint] enable eslint-plugin-eslint-plugin (#2469 @golopot)
- [Docs]
jsx-props-no-multi-spaces
: suggest using core rule instead (#2463 @golopot) - [Docs]
jsx-first-prop-new-line
: add rule options (#2465 @SerdarMustafa1) - [Docs]
jsx-no-target-blank
: Add section about overriding for trusted links (#2438 @aschriner) - [Docs] fix typo (#2453 @cainwatson)
- [Docs]
no-unused-prop-types
: clean up prose (#2273 @coryhouse) - [Docs]
jsx-no-bind
: add section about React Hooks (#2443 @Kdex)
v7.16.0
Added
jsx-sort-default-props
: make rule fixable (#2429 @emroussel)
Fixed
jsx-no-useless-fragment
: usearray-includes
over.includes
for back compat (@ljharb)jsx-curly-brace-presence
: allow necessary white-space literal (#2437 @uniqname)jsx-curly-brace-presence
: warns incorrectly on trailing whitespace (#2431 @bc-m)no-unused-prop-types
: false positive when nested destructuring (#2428 @golopot)
v7.15.1
Fixed
jsx-curly-brace-presence
: bail out checks when JSXElements are passed as props (#2426 @vedadeepta)
Changed
- [Docs]
prefer-es6-class
: Fix typos (#2425 @spencerbyw)
v7.15.0
Added
- add
jsx-no-useless-fragment
rule (#2261 @golopot) - [
jsx-handler-name
][]: allowfalse
to disableeventHandlerPrefix
/eventHandlerPropPrefix
(#2410 @tanmoyopenroot) sort-comp
: addstatic-variables
grouping (#2408 @vedadeepta)jsx-no-literals
: AddallowedStrings
option (#2380 @benhollander)no-multi-comp
: Added handling forforwardRef
andmemo
wrapping components declared in the same file (#2184 @jenil94)jsx-pascal-case
:allowAllCaps
option now allowsSCREAMING_SNAKE_CASE
(#2364 @TylerR909)
Fixed
jsx-indent
: Fix false positive when a jsx element is the last statement within a do expression (with tests) (#2200 @Kenneth-KT)jsx-curly-brace-presence
: fix jsx tags in braces (#2422 @tanmoyopenroot)display-name
: Fix false positives (#2399 @BPScott)jsx-curly-brace-presence
: report unnecessary curly braces with children on next line (#2409 @vedadeepta)no-unused-prop-types
: false positive with callback (#2375 @golopot)- Fix prop-types detection collision on renamed props (#2383 @yannickcr)
jsx-sort-props
: use localeCompare rather than comparison operator (#2391 @tanmoyopenroot)jsx-pascal-case
: allow one-letter-named components (#2395 @Haegin)jsx-wrap-multilines
: fix incorrect formatting (#2392 @tanmoyopenroot)require-optimization
: fix when using arrow function in class components (#2385 @jenil94)no-deprecated
: Deprecate cWM/cWRP/cWU lifecycle methods since React 16.9.0 (#2378 @meowtec)jsx-key
: improve docs and confusing error message (#2367 @kaykayehnn)- Recognize props wrapped in flow $ReadOnly<> utility type (#2361 @lukeapage)
prop-types
: false positive with setState updator (#2359 @golopot)
Changed
- [Docs]
no-access-state-in-setstate
: update grammar ([#2418][] @neaumusic) jsx-curly-brace-presence
,jsx-one-expression-per-line
,no-danger-with-children
: addisWhiteSpaces
tolib/util/jsx
(#2409 @vedadeepta)
v7.14.3
Fixed
- Fix
prop-types
to ignore validation when Flow indexers are used (#2330 @yannickcr) - Fix error being thrown after the first warning when react version cannot be detected (#2336 @abhishekdev)
- Fix component detection when
memo
andforwardRef
are used together (#2349 @yannickcr)