Releases: jsx-eslint/eslint-plugin-react
Releases · jsx-eslint/eslint-plugin-react
v7.29.0
Added
- add
hook-use-state
rule to enforce symmetric useState hook variable names (#2921 @duncanbeevers) jsx-no-target-blank
: Improve fixer with optionallowReferrer
(#3167 @apepper)jsx-curly-brace-presence
: add "propElementValues" config option (#3191 @ljharb)- add
iframe-missing-sandbox
rule (#2753 @tosmolka @ljharb) no-did-mount-set-state
,no-did-update-set-state
: no-op with react >= 16.3 (#1754 @ljharb)jsx-sort-props
: support multiline prop groups (#3198 @duhamelgm)jsx-key
: addwarnDuplicates
option to warn on duplicate jsx keys in an array (#2614 @ljharb)jsx-sort-props
: addlocale
option (#3002 @ljharb)
Fixed
prop-types
,propTypes
: add support for exported type inference (#3163 @vedadeepta)no-invalid-html-attribute
: allow 'shortcut icon' onlink
(#3174 @Primajin)prefer-exact-props
improve performance forIdentifier
visitor (#3190 @meowtec)propTypes
: Handle TSTypeReference in no-unused-prop-type (#3195 @niik)sort-prop-types
: avoid repeated warnings of the same node/reason (#519 @ljharb)jsx-indent
: Fix indent handling for closing parentheses (#620 @stefanbuck])- [
prop-types
/propTypes
]: follow a returned identifier to see if it is JSX (#1046 @ljharb) no-unused-state
: TS: supportgetDerivedStateFromProps
as an arrow function (#2061 @ljharb)no-array-index-key
: catch.toString
andString()
usage (#2813 @RedTn)function-component-definition
: do not break on dollar signs (#3207 @ljharb)prefer-stateless-function
: avoid a crash insidedoctrine
(#2596 @ljharb)prop-types
: catch infinite loop (#2861 @ljharb)forbid-prop-types
: properly report name in error message; check undestructured arguments (#2945 @ljharb)
Changed
- [readme] change [
jsx-runtime
] link from branch to sha (#3160 @tatsushitoji) - [Docs] HTTP => HTTPS (#3133 @Schweinepriester)
- [readme] Some grammar fixes (#3186 @JJ)
- [Docs]
jsx-no-target-blank
: Improve readme (#3169 @apepper) - [Docs]
display-name
: improve examples (#3189 @golopot) - [Refactor]
no-invalid-html-attribute
: sort HTML_ELEMENTS and messages (#3182 @Primajin) - [Docs]
forbid-foreign-prop-types
: documentallowInPropTypes
option (#1815 @ljharb) - [Refactor]
jsx-sort-default-props
: remove unnecessary code (#1817 @ljharb) - [Docs]
jsx-no-target-blank
: fix syntax highlighting (#3199 @shamrin) - [Docs]
jsx-key
: improve example (#3202 @chnakamura) - [Refactor]
jsx-key
: use more AST selectors (@ljharb)
New Contributors
- @tatsushitoji made their first contribution in #3160
- @Schweinepriester made their first contribution in #3133
- @Primajin made their first contribution in #3174
- @apepper made their first contribution in #3167
- @JJ made their first contribution in #3186
- @niik made their first contribution in #3195
- @tosmolka made their first contribution in #2753
- @stefanbuck made their first contribution in #620
- @kolpax made their first contribution in #1691
- @duhamelgm made their first contribution in #3198
- @shamrin made their first contribution in #3199
- @chnakamura made their first contribution in #3202
Full Changelog: v7.28.0...v7.29.0
v7.28.0
What's Changed
- [New] component detection: track React imports by @duncanbeevers in #3149
- [New]
function-component-definition
: supportnamedComponents
option being an array by @petersendidit in #3129 - [Test] parsers.all augments suggestion code output by @duncanbeevers in #3154
- [Fix]
jsx-indent-props
: Resetline.isUsingOperator
correctly after ternary (#3146) by @tobiaswaltl in #3157 - [New] Component detection: add
util.isReactHookCall
by @duncanbeevers in #3156
New Contributors
- @tobiaswaltl made their first contribution in #3157
Full Changelog: v7.27.1...v7.28.0
v7.27.1
What's Changed
- [Fix]
no-unused-class-component-methods
: add getChildContext lifecycle method by @yoyo837 in #3136 - [readme] fix syntax typo by @moselhy in #3141
- [Fix]
prop-types
: fix false positives on renames in object destructuring by @golopot in #3142
New Contributors
Full Changelog: v7.27.0...v7.27.1
v7.27.0
What's Changed
- [New] add
no-unused-class-component-methods
by @pawelnvk in #2239 - [New] Add
no-arrow-function-lifecycle
rule by @ngtan in #1980 - [react/jsx-uses-vars]: False negative on HTML elements used in JSX by @karlhorky in #2916
- [Fix]
propTypes
: addVoidFunctionComponent
to react generic list by @vedadeepta in #3092 - [Fix]
no-arrow-function-lifecycle
: prevent crashing on ClassProperty by @AriPerkkio in #3098 - [Dev Deps] Upgrade
eslint-plugin-eslint-plugin
to v4 by @bmish in #3105 - [Tests] use parsers.all + features to maximally repeat test cases across parsers, plus fixes by @ljharb in #3108
- [Fix]
display-name
: unwrap TSas
expressions by @ljharb in #3110 - [Fix]
no-unstable-components
: improve handling of objects containing render functions by @fizwidget in #3111 - [Fix]
prop-types
,propTypes
: add forwardRef<>, ForwardRefRenderFunction<> prop-types by @vedadeepta in #3112 - [Tests] test on the new babel eslint parser by @ljharb in #3113
- [Dev Deps] update
eslint-remote-tester
by @AriPerkkio in #3118 - [New] add
no-invalid-html-attribute
rule by @Nokel81 in #2863 - [Dev Deps] update
eslint-remote-tester-run-action
by @AriPerkkio in #3120 - [Fix]
destructuring-assignment
, component detection: improve component detection by @vedadeepta in #3122 - [Docs]
jsx-no-target-blank
: adjust options description by @gebsh in #3124 - [New] support eslint 8.x by @MichaelDeBoey in #3059
New Contributors
- @ngtan made their first contribution in #1980
- @karlhorky made their first contribution in #2916
- @bmish made their first contribution in #3105
- @fizwidget made their first contribution in #3111
- @gebsh made their first contribution in #3124
- @MichaelDeBoey made their first contribution in #3059
Full Changelog: v7.26.1...v7.27.0
v7.26.1
v7.26.0
Added
- add
no-namespace
rule (#2640 @yacinehmito @ljharb) jsx-max-props-per-line
: addsingle
andmulti
options (#3078 @SIL0RAK)
Fixed
display-name
: Get rid of false position on component detection (#2759 @iiison)
Changed
no-access-state-in-setstate
: passing test for “don't error if it's not a React Component” (#1873 @kentcdodds)