[!NOTE] This PR body was truncated due to platform limits.
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| @eslint-react/eslint-plugin (source) | ^1.41.0 → ^5.28.8 |
Release Notes
Rel1cx/eslint-react (@​eslint-react/eslint-plugin)
v5.28.8
🐞 Fixes
react-x/purity: builtin member resolution no longer follows computed or unknown middle segments (ex:window[fetch],window.myLibrary.fetch), preventing false reports of non-builtin calls. (#2074)
🏗️ Internal
@eslint-react/eslint: added dual-purposegetTextfor direct or callback-style source text extraction, replacing repeatedcontext.sourceCode.getTextwrappers across packages. (#2073)
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.28.7...v5.28.8
v5.28.7
🐞 Fixes
react-x/purity: now reportsDatecalls during render, includingDate(),Date(arg), andwindow.Date(); unlikenew Date(arg),Date(arg)ignores its arguments and always returns the current time. (#2071) Thanks to @aki05162525!
🏗️ Internal
- Bumped
effectand@effect/platform-nodeto4.0.6,@tanstack/react-routerto1.170.46,@tanstack/react-startto1.169.4, andeslint-plugin-de-morganto2.3.0.
New Contributors
- TAKAGI AKIHIRO (@aki05162525) made their first contribution in #2071.
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.28.6...v5.28.7
v5.28.6
🐞 Fixes
react-x/set-state-in-effect: the ref-derived parameter exemption now also applies to helpers wrapped inuseCallback(ex:measure(ref.current)wheremeasure = useCallback((el) => { setWidth(el.offsetWidth); }, [])). (#2065) Thanks to @amhunt!react-x/set-state-in-effect: a helper call behind a ref-derived guard (if, ternary, short-circuit, or early return) now exempts thesetStatecalls it reaches, as asetStatewritten in its place would be (ex:if (!anchorRef.current) return; commitPosition(0, true);); call sites are judged individually. (#2065) Thanks to @amhunt!
New Contributors
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.28.5...v5.28.6
v5.28.5
✨ New
react-dom/no-unsafe-target-blank: the suggested fix now addsrel="noreferrer"instead ofrel="noreferrer noopener", sincenoreferreralready impliesnoopenerper the HTML spec; values combining both tokens remain valid. (#2068)
🏗️ Internal
- Removed redundant transitive dependency overrides. (#2064)
- Bumped
viteto8.3.5andlucide-reactto1.61.0.
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.28.4...v5.28.5
v5.28.4
🐞 Fixes
Reverted the component-scope-bounded identifier resolution introduced in v5.28.3, including the per-component single-report attribution; class declarations in a component body remain recognized as per-render constructions. (#2062)
Affected rules:
react-x/no-unstable-context-valuereact-x/no-unstable-default-props
📝 Documentation
- Updated the AST Explorer links across the website docs and recipes.
🏗️ Internal
@eslint-react/var: removed theboundaryoption fromresolveandresolveObjectType, and theClassDeclarationresolution inresolveObjectType, following the revert. (#2062)- Renamed the
Jsx-prefixed@eslint-react/coreexports to all-capsJSX(ex:JsxConfig→JSXConfig,isJsxLike→isJSXLike). (#2061) - Bumped
fumadocs-mdxto15.4.9.
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.28.3...v5.28.4
v5.28.3
✨ New
Identifier resolution is now bounded by the enclosing component scope, so render-scoped values referenced from nested callbacks (ex:
items.map((item) => <Context.Provider value={foo}>)) are now detected, values declared outside the component (ex: module-level constants) are treated as stable, and nested components report each value only once, attributed to the innermost component. (#2060)Affected rules:
react-x/no-unstable-context-valuereact-x/no-unstable-default-props
Class declarations (ex:
class Foo {}in a component body) are now recognized as per-render constructions, so using one as a context value or default prop is now reported. (#2060)Affected rules:
react-x/no-unstable-context-valuereact-x/no-unstable-default-props
🏗️ Internal
@eslint-react/var:resolveandresolveObjectTypenow accept aboundaryoption that bounds scope-chain traversal to an enclosing component or hook;resolveObjectTypealso resolvesClassDeclarationnodes. (#2060)- Bumped
typescript-eslintto8.72.0,fumadocs-coreandfumadocs-uito16.17.7,fumadocs-mdxto15.4.8,lucide-reactto1.60.0, andtypedoc-plugin-markdownto4.14.1.
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.28.2...v5.28.3
v5.28.2
🐞 Fixes
- Website: fixed a build failure caused by an unquoted
:sequence in the YAML frontmatter description of thereact-x/use-memodoc; the rule scaffold script now emits a YAML-safe quoted description so scaffolded rules cannot reintroduce the issue.
📝 Documentation
- Aligned the
react-debug/jsxrule doc messages with the actual JSON report format. - Corrected the documented minimum ESLint version to
10.0.0in the READMEs and getting-started guides. - Documented per-layer isolated testing in the fact-based rule implementation patterns guide.
- Generalized the
isAPI/isAPICalldocs and updated the custom rule samples to useis.APICall. (#2059)
🏗️ Internal
- Added unit tests for the
react-ximmutability rule modules (collect,effects,helpers,origins). (#2056) - Bumped the
postcssoverride to8.5.31.
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.28.1...v5.28.2
v5.28.1
🐞 Fixes
react-dom/no-unknown-property: fixed a false positive where the React camelCase SVG proprenderingIntentwas reported as an unknown property, including on code produced by this rule's own autofix forrendering-intent. (#2055)react-jsx/no-useless-fragment: the auto-fixer no longer unwraps fragments outside JSX whose children are all whitespace (ex:const x = <> </>;orreturn <>\n</>withallowExpressions: false); the previous fix produced syntactically invalid JavaScript such asconst x = ;. These fragments are still reported, just without a fix. (#2055)
📝 Documentation
- Aligned rule docs, comments, and diagnostic messages with actual behavior across the plugins. (#2055)
🏗️ Internal
- Bumped
eslintto10.13.0,pnpmto12.14.0,tsl-dxto0.15.0,@effect/language-serviceto0.87.5, andlucide-reactto1.59.0. - Added a TanStack Start example project.
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.28.0...v5.28.1
v5.28.0
✨ New
@eslint-react/eslint-plugin: the general-purpose presets now enable JSX syntax support vialanguageOptions.parserOptions.ecmaFeatures.jsx: true, so you no longer need to configure it yourself. (#2049)Affected presets:
recommendedrecommended-typescriptrecommended-type-checkedstrictstrict-typescriptstrict-type-checked
🏗️ Internal
- Bumped
fumadocs-coreandfumadocs-uito16.17.5, andlucide-reactto1.58.0.
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.27.4...v5.28.0
v5.27.4
🐞 Fixes
@eslint-react/jsx:resolveAttributeValuenow handles a parser-toleratedJSXFragmentin attribute value position (ex:<a href=<></> />), reporting it as kind"element"instead of falling through toundefined; as a result,react-dom/no-missing-iframe-sandboxnow reports<iframe sandbox=<></> />instead of silently skipping it. (#2048)
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.27.3...v5.27.4
v5.27.3
🐞 Fixes
react-jsx/no-key-after-spread: the fast-path text check now matcheskeyassignments with whitespace around=(ex:<div {...props} key = {id} />or a newline before=), so such elements are no longer silently skipped. (#2043) Thanks to @amir-rahmanii!react-jsx/no-children-prop: achildrenprop alongside nested children content (ex:<div children="x">y</div>,createElement("div", { children: "x" }, "y")) is no longer reported by this rule — that conflict case belongs toreact-jsx/no-children-prop-with-children— removing the unsafe merge suggestion and the duplicate diagnostics. (#2044) Thanks to @amir-rahmanii!react-jsx/no-children-prop-with-children: empty expression containers (ex:{},{/* comment */}) are no longer treated as meaningful children, so<div children="x">{/* comment */}</div>is no longer reported. (#2045) Thanks to @amir-rahmanii!
📝 Documentation
react-naming-convention/ref-name: corrected theadditionalRefHooksexample to use the/pattern/flagsRegExp string form; a bare(a|b)string is treated as exact equality and never matches. (#2042) Thanks to @amir-rahmanii!- The settings docs examples for the additional hooks settings now use full RegExp strings. (#2047)
🏗️ Internal
@eslint-react/jsx:hasChildrennow treats empty expression containers as non-meaningful, aligned withgetChildren. (#2045)react-x: refactored the internals ofset-state-in-effect,set-state-in-render, andstatic-componentsfor readability; no behavior change. (#2041)- Bumped
vitestto5.0.5,nextto16.4.2,fumadocs-coreandfumadocs-uito16.17.4, andundicito8.12.2.
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.27.2...v5.27.3
v5.27.2
🏗️ Internal
- Added the missing
@tsconfig/node20and@types/nodedependencies to the workspace packages. (#2040) - Bumped
effectand@effect/platform-nodeto4.0.5,import-integrity-lintto1.3.1, andsort-package-jsonto4.1.0. (#2040)
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.27.1...v5.27.2
v5.27.1
🐞 Fixes
Lifecycle methods defined as class properties (ex:
componentDidMount = () => { this.setState(...) }, including type-expression-wrapped values) are now reported just like the method shorthand form. (#2039)Affected rules:
react-x/no-set-state-in-component-did-mountreact-x/no-set-state-in-component-did-updatereact-x/no-set-state-in-component-will-update
Effect cleanups are now recognized when the
useEffectcall is nested in an outerreturn(ex:return useEffect(() => () => { ... })), so resources released there are no longer reported as leaked. (#2039)Affected rules:
react-web-api/no-leaked-event-listenerreact-web-api/no-leaked-fetchreact-web-api/no-leaked-intersection-observerreact-web-api/no-leaked-intervalreact-web-api/no-leaked-resize-observerreact-web-api/no-leaked-timeout
🏗️ Internal
@eslint-react/ast: added theCheck.isFunctionOrClassandCheck.isTypeOrChainExpressionhelpers; parent lookups acrossast,core, and the rules are now bounded at enclosing function/class boundaries. (#2039)@eslint-react/core:isUseEffectSetupCallbackandisUseEffectCleanupCallbackreimplemented on bounded parent lookups. (#2039)
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.27.0...v5.27.1
v5.27.0
🐞 Fixes
react-web-api/no-leaked-event-listener: cleanups returned through conditional expressions (ex:return cond ? () => window.removeEventListener(...) : null) are now recognized and no longer reported. (#2038)react-web-api/no-leaked-fetch: effect setups wrapped in type expressions (ex:useEffect((() => { fetch(...) }) as any, [])) are now recognized. (#2038)react-debug/function-component: computed string-literaldisplayNamekeys (ex:App["displayName"] = "...") are now recognized. (#2038)
📝 Documentation
- Revised the rule implementation pattern guides and refined the core ideas and layer dependency model in the fact-based rule implementation docs. (#2034, #2035)
🏗️ Internal
@eslint-react/core: accuracy and consistency fixes in detection helpers. (#2038)react-x: the customtslconfig now enforces the fact-based layer dependency order. (#2036)- Bumped
reactandreact-domto19.3.1, andnextto16.4.1.
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.26.7...v5.27.0
v5.26.7
🏗️ Internal
@eslint-react/core: collectors now use the node's source range start as the map key, replacing the shared counter, keys are stable across repeated lints, traceable to source positions when debugging, and slightly cheaper than stringified numbers. (#2033)
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.26.6...v5.26.7
v5.26.6
🏗️ Internal
@eslint-react/core: component and hook collectors now use sequential integer keys instead of randomrandomByteshex keys, removingnode:cryptofrom the lint hot path. (#2032) Thanks to @kurtextrem!- Bumped
effectto4.0.4,ts-patternto5.9.2,fumadocs-coreandfumadocs-uito16.17.3,lucide-reactto1.57.0,oxlintto1.88.0,typedoc-plugin-markdownto4.14.0, andundicito8.12.1.
New Contributors
- Jacob Groß (@kurtextrem) made their first contribution in #2032.
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.26.5...v5.26.6
v5.26.5
🐞 Fixes
react-x/set-state-in-effect: asetStateon the right side of a short-circuit operator (&&,||,??) is now exempt when the left operand is ref-derived (ex:ref.current && setData(1)), matching the existing ref-gated conditional exemption; a left-sidesetStatestill runs unconditionally and stays reported. (#2031)react-x/set-state-in-effect: setup identifiers are now collected from the setup argument of the effect call only; the callee and the deps array are no longer scanned, so a function referenced only in the deps array (ex:useEffect(setup, [helper])) is no longer mistaken for the setup and itssetStatecalls stay unattributed. (#2031)react-x/set-state-in-effect: arrow function parameters are no longer collected as callback-body setter references (ex: thesetStateinuseMemo((setState) => ..., [])); only actual callback bodies are collected (ex:useMemo(() => setState, [])). (#2031)
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.26.4...v5.26.5
v5.26.4
🐞 Fixes
The name lookup now stops at function boundaries, so expression-bodied factory functions and custom hooks (ex:
export const useAnchor = () => useRef(null)) are no longer misreported; calls inside JSX expressions, computed keys, or class static blocks no longer fall back to the outer variable. (#2029) Closes #2026.Affected rules:
react-naming-convention/context-namereact-naming-convention/id-namereact-naming-convention/ref-name
The name lookup no longer crosses containers or derived values (ex:
const refs = [useRef(null)],const n = useRef(0) + 1), so such calls are no longer reported on the enclosing variable; sequence expressions check only the last value, and unresolvable computed keys (ex:{ [key]: useRef(null) }) no longer fall back to the outer variable. (#2030)Affected rules:
react-naming-convention/context-namereact-naming-convention/id-namereact-naming-convention/ref-name
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.26.3...v5.26.4
v5.26.3
🐞 Fixes
An enclosing object literal property key now takes precedence over the outer assignment target when statically known (ex:
const refs = { myRef: useRef(0) }); computed keys with string literals (ex:refs["value"] = useRef(null)) are now checked, and unresolvable computed keys are no longer reported. (#2028)Affected rules:
react-naming-convention/context-namereact-naming-convention/id-namereact-naming-convention/ref-name
react-naming-convention/ref-name: immediate dereferences of theuseRefresult through TypeScript type wrappers (ex:(useRef(null) as { current: null }).current,useRef(null)!.current) are no longer reported, extending the #1375 fix. (#2028)
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.26.2...v5.26.3
v5.26.2
✨ New
react-x/no-unused-props: improved prop usage detection. Props parameters with default values (ex:function Component(props: Props = defaultProps)) are now unwrapped and analyzed, props aliased to a local variable (ex:const alias = props) are tracked through the alias, and template literals without substitutions (ex:props[`foo`]) are recognized as static prop keys. (#2021)
🐞 Fixes
react-x/no-unused-props: a component whose used prop keys cannot be fully determined (ex: it passes the whole props object to another function) now marks all of its declared props as used, so a props declaration shared with another fully analyzable component is no longer reported as unused. (#2021)react-x/set-state-in-effect: ref-derived values that reach thesetStateargument through assignment statements (rather than the declaration initializer) are now recognized; only writes that lexically precede the use and live in the use's own function or an ancestor count. (#2027)react-x/set-state-in-effect: parameters of a helper invoked from the effect setup are now treated as ref-derived when the call-site argument is ref-derived, matched per call site by parameter definition. (#2027)react-x/set-state-in-effect: a.currentread rooted at a function parameter is now recognized as a ref read (ex:setReferenceElement(anchor?.current)whereanchoris aRefObjectprop); previously only parameters namedrefor ending inRefwere recognized. (#2027)react-x/no-unused-class-component-members: public methods (including function-valued properties) of an exported class component are no longer reported as unused, as they may be part of the component's imperative API invoked by consumers through refs. Data fields,private/protectedmembers, and members of non-exported classes are still reported. (#2024)
🏗️ Internal
- Ordered message ids by first usage and unified default/suggestion message id naming across
react-dom,react-jsx,react-web-api, andreact-xrules. (#2022)
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.26.1...v5.26.2
v5.26.1
🏗️ Internal
Renamed the internal suggestion message id from
"replace"to"suggest".Affected rules:
react-x/no-context-providerreact-x/no-forward-refreact-x/no-use-context
react-x/immutability: moved context-dependent helpers fromhelpers.tsintoorigins.tsandeffects.tsto match the fact-based implementation pattern.react-x/globals: movedresolveToFunctionfromhelpers.tstoorigins.ts.Bumped
effectto4.0.3,tsl-dxto0.14.1,@tsconfig/node20to20.1.10, and@types/nodeto20.19.43.
📝 Documentation
- Refreshed spec diff verification dates and notes for
react-xrules.
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.26.0...v5.26.1
v5.26.0
✨ New
- Lowered the minimum required Node.js version from
>=22.0.0to>=20.19.0. (#2020)
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.25.0...v5.26.0
v5.25.0
✨ New
react-dom/no-unsafe-target-blank: added anallowReferreroption (default:false). When enabled,rel="noopener"alone is accepted and the suggested fix addsrel="noopener"instead ofrel="noreferrer noopener", preserving referrer information while still requiring an explicit token. (#2019) Closes #2012.
🏗️ Internal
@eslint-react/ast: addedhasParentandhasEnclosingTryBlockshortcuts toTraverse. (#2016)@eslint-react/ast: renamed thetypesmodule totreeand narrowed theExtract.unwrapresult type. (#2017)@eslint-react/core: removed the unusedREACT_BUILTIN_HOOK_NAMESconstant.- Bumped
tsdownto0.23.1,@effect/platform-nodeto4.0.3,pnpmto12.11.2,@types/nodeto26.6.5,setup-uvtov10.3.0, andfumadocsandlucide-reactin the website.
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.24.10...v5.25.0
v5.24.10
📝 Documentation
- Added a link to the Astryx
no-react-introspectionrule in thereact-x/no-children-countandreact-x/no-children-maprule documentation.
🏗️ Internal
Disabled test isolation in the vitest config.
Reordered
react-web-api/no-leaked-event-listenertest specs from typical cases to edge cases. (#2015)Unified
KNOWN_-prefixed constant names. (#2014)Affected rules:
react-x/no-array-index-keyreact-x/no-missing-key
Bumped
effectto4.0.2,@effect/platform-nodeto4.0.2,nxto23.3.0,viteto8.3.4,lucide-reactto1.53.0, andpnpmto12.10.1.
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.24.9...v5.24.10
v5.24.9
🐞 Fixes
react-x/set-state-in-effect: optional chaining in asetStateargument (ex:setData(ref.current?.value),setWidth(el?.offsetWidth ?? 0)whereelis ref-derived) no longer defeats the ref-value exemption; theChainExpressionwrapper is now unwrapped during ref-source detection. (#2011)
📝 Documentation
- Aligned rule documentation with the current react.dev reference docs. (#2013)
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.24.8...v5.24.9
v5.24.8
🐞 Fixes
react-x/rules-of-hooks: removed the incorrectFIXfeature declaration; the rule does not provide an auto-fix and is no longer advertised as fixable. (#2009)
🏗️ Internal
- Added edge-case test specs from the v5.24.7 change review covering
react-x/immutability,react-x/set-state-in-render,react-web-api/no-leaked-event-listener, and the leaked-observer rules. - Bumped
nextto16.4.0,viteto8.3.3, and related dependencies.
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.24.7...v5.24.8
v5.24.7
🐞 Fixes
react-x/immutability: no longer reports rebinding a plain local alias of props/state as a mutation; destructured props rebinding and member writes through aliases are still reported. (#1995)react-x/set-state-in-render:setStatecalls after nested component or hook declarations are now attributed to the outer component again. (#2004)react-x/set-state-in-render: anonymous callbacks passed directly tomemo()/forwardRef()are now treated as component render functions. (#1998)react-web-api/no-leaked-fetch: signal alias chains are now resolved recursively, so fetches with aliased signals correctly pair with their cleanupabortcall. (#1997)react-web-api/no-leaked-event-listener: bare globaladdEventListener(...)calls now pair with matchingremoveEventListener(...)cleanup calls. (#1996)react-web-api/no-leaked-event-listener: asignaldestructured fromnew AbortController()is now recognized. (#2001)disconnect()/unobserve(...)now only count as cleanup in the cleanup phase;useRef-held observer instances are tracked;unobserve(...)inside the observer callback no longer pairs withobserve(...). (#2002, #2003)Affected rules:
react-web-api/no-leaked-resize-observerreact-web-api/no-leaked-intersection-observer
🏗️ Internal
- Bumped
typescript-eslintto8.71.1andpostcssto8.5.29.
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.24.6...v5.24.7
v5.24.6
🐞 Fixes
react-x/no-unused-props: computed member access and destructuring with an identifier key (ex:props[key],const { [key]: value } = props) no longer count as usage of a prop named after the key; the rule now bails out on such dynamic keys instead of reporting actually-used props as unused. (#1994)react-x/set-state-in-effect: object-pattern destructuring of theuseStatetuple is now resolved by numeric key: a name bound at key 0 (ex:const { 0: value } = useState()) is no longer mistaken for the setter, while key 1 (ex:const { 1: setData } = useState()) is still recognized. (#1994)react-x/set-state-in-render: sameuseStateobject-pattern destructuring fix asset-state-in-effect. (#1994)
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.24.5...v5.24.6
v5.24.5
🏗️ Internal
Self-linted rule implementations with
eslint-plugin-eslint-plugin, removing redundant emptydefaultOptionsdeclarations and enforcingmeta.defaultOptionsfor rules with options. (#1993) Thanks to @rakleed and @Rel1cx!Minor code cleanups. Thanks to @Rel1cx!
Affected rules:
react-web-api/no-leaked-intersection-observerreact-x/no-create-refreact-x/no-nested-lazy-component-declarationsreact-x/use-state
Bumped
effectto4.0.1,pnpmto12.9.1,fumadocs-coreandfumadocs-uito16.16.1,lucide-reactto1.52.0,tsl-dxto0.14.0, andtinybenchto6.2.0. Thanks to @Rel1cx!
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.24.4...v5.24.5
v5.24.4
🏗️ Internal
- Enable dead-code elimination in tsdown config, producing smaller published packages.
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.24.3...v5.24.4
v5.24.3
🏗️ Internal
@local/eff: minor code optimizations.@eslint-react/shared: minor code optimizations.
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.24.2...v5.24.3
v5.24.2
🏗️ Internal
@eslint-react/core,@eslint-react/var, thereact-domplugin, and thereact-xplugin: replacedinoperator checks with thehasPropertyhelper from@local/eff.@eslint-react/shared: documentedgetNormalizedSettings.- JSDoc comments are now stripped from the tsdown build output, producing smaller published packages.
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.24.1...v5.24.2
v5.24.1
📝 Documentation
- Added a link to the Astryx
no-react-introspectionrule in thereact-x/no-children-countandreact-x/no-children-maprule documentation.
🏗️ Internal
Disabled test isolation in the vitest config.
Reordered
react-web-api/no-leaked-event-listenertest specs from typical cases to edge cases. (#2015)Unified
KNOWN_-prefixed constant names. (#2014)Affected rules:
react-x/no-array-index-keyreact-x/no-missing-key
Bumped
effectto4.0.2,@effect/platform-nodeto4.0.2,nxto23.3.0,viteto8.3.4,lucide-reactto1.53.0, andpnpmto12.10.1.
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.24.9...v5.24.10
v5.24.0
🐞 Fixes
react-x/set-state-in-effect: more value shapes are recognized as ref-derivedsetStatearguments: interpolations in template literals (ex:setData(`${ref.current}`)), tagged templates (both the quasi and a ref-derived tag), object and array literals (ex:setData({ value: ref.current })), and spreads (ex:setData({ ...ref.current })) — previously these fell through to the default case and were reported. (#1988)
📝 Documentation
- Added eslint-config-xo-react to the website's community presets.
🏗️ Internal
@local/eff: added predicate combinators and type guards synced with effect, and migrated call sites across the workspace to them. (#1989)Reworked to the fact-based implementation pattern — fact collection (
collect.ts), provenance resolution (origins.ts), and violation inference (effects.ts) are now separate modules, withlib.tsreplaced by a pure-ASThelpers.ts;set-state-in-effectagain classifies a hook name configured as bothadditionalStateHooksandadditionalEffectHooksas a state hook first. (#1983, #1985, #1986)Affected rules:
react-x/set-state-in-effectreact-x/set-state-in-renderreact-x/use-memo
react-x/use-state: aligned the nested-expression collectors' visitor keys to callee-first order, matchingeslint-visitor-keys; no behavior change. (#1988)Migrated package unit tests to the shared
@local/testkithelpers. (#1987)Renamed message ids to kebab-case across all plugins. (#1984)
Bumped
fumadocs-coreandfumadocs-uito16.15.18,fumadocs-mdxto15.4.6,lucide-reactto1.50.0, and@types/nodeto26.6.4.
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.23.5...v5.24.0
v5.23.5
🐞 Fixes
react-x/set-state-in-effect: the ref-derived value exemption now also coverssetStatecalls reached indirectly through functions or hook callbacks invoked from the effect setup, not onlysetStatewritten directly in the setup body. (#1982)react-x/set-state-in-effect: more ref read shapes are recognized as ref-derived values —<ref-named>.currentanywhere in a member chain, locals derived from other ref-derived locals, and reads through aref/xxxRefparameter. (#1982)react-web-api/no-leaked-event-listener:removeEventListenerinside a function called from the effect cleanup now pairs with itsaddEventListener, fixing false positives for listeners removed on unmount; cleanup calls resolve to the actual functions, so same-named shadowed functions no longer pair by coincidence. (#1982)
🏗️ Internal
- Bumped
effectto4.0.0and migrated the repo scripts to the v4 APIs. (#1981)
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.23.4...v5.23.5
v5.23.4
🐞 Fixes
Added the missing
react-x/static-componentsrule to thedisable-experimentalpreset. (#1980)Fixed type imports (
RuleFeatureis now imported from@eslint-react/eslintinstead of@eslint-react/shared).Affected rules:
react-x/exhaustive-depsreact-x/rules-of-hooks
📝 Documentation
react-jsx/no-useless-fragment: clarified the scope of theallowExpressionsoption and unified experimental-rule callout wording across rule docs.react-x: unified cross-rule references in rule docs to full rule names.- Removed low-relevance entries from the further reading sections of rule docs, and removed a redundant note about
eslintbeing an optional peer dependency. - Fixed inaccuracies in internal documentation. (#1980)
🏗️ Internal
- Adopted
ts-patternfor type checks in@eslint-react/core,@eslint-react/jsx, and thereact-domplugin, and declared the missingts-patterndependencies. - Added behavior boundary tests for
react-jsx/no-useless-fragment. - Bumped
fumadocs-core,fumadocs-ui, andlucide-reactin the website.
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.23.3...v5.23.4
v5.23.3
🐞 Fixes
react-x/immutability: reassigning a binding that resolves to component props or state (value = value + "!",count++, including destructuring andfor...ofrebinding forms) is now reported as a direct mutation, matching upstreamreact-hooks/immutability; rebinding iterator or shallow-copy bindings remains allowed. (#1979)react-x/set-state-in-effect: ref reads traced through intermediate local computations (ex:const dv = visible - prevVisible.current) are now recognized as ref-derived values, and a preceding early-return guard whose test is ref-derived (ex:if (dv === 0) return;) now exempts thesetStatecalls that follow it — previously onlysetStatenested directly inside a ref-gatedif/conditional was exempted. Aligns withreact-hooks7.1.1. (#1979)
📝 Documentation
react-x/no-unstable-context-value: documented the React 19<Context>provider detection heuristic and its name-based limitations. (#1979)- Updated the README badges to reference
eslint-plugin-react-x.
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.23.2...v5.23.3
v5.23.2
🏗️ Internal
- Removed unused dependencies and fixed phantom dependencies across the workspace.
- Bumped
nextto16.3.7,fumadocs-coreandfumadocs-uito16.15.16, andeslint-plugin-package-jsonto1.10.1.
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.23.1...v5.23.2
v5.23.1
🏗️ Internal
- Re-verified and synchronized the IMPL-SPEC diff reports for the following
react-xrules. (#1977, #1978)react-x/error-boundariesreact-x/globalsreact-x/immutabilityreact-x/purityreact-x/refsreact-x/set-state-in-effectreact-x/set-state-in-renderreact-x/use-memo
- Bumped
typescript-eslintto8.71.0,tsl-dxto0.13.7, andpnpmto12.8.1.
📝 Documentation
- Added argo-cd, griffel, tanstack/table, and eslint-config-studio to the website's community lists.
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.23.0...v5.23.1
v5.23.0
✨ New
react-x/static-components: dynamic creation-site tracing now follows both sides of logical expressions (ex:const C = DefaultComponent || (() => <div />)) and the last element of sequence expressions (ex:const C = (setup(), () => <div />)), in initializers and reassignments alike. (#1975)
🐞 Fixes
react-x/static-components: parameters of nested non-component functions (ex:function render(Comp) { return <Comp /> }) are no longer mistaken for render-created components; definitions are judged by definition type instead of AST node type. (#1975)react-x/static-components:createdHereis now reported once per creation site instead of once per JSX usage; thedefaultdiagnostic remains per usage. (#1975)
🏗️ Internal
react-x/static-components: restructured the rule to the fact-based implementation pattern —collect.ts(usage facts),origins.ts(creation-site resolution), andeffects.ts(effect inference) are now separate modules, with reporting centralized inProgram:exit; added 14 boundary test cases covering creation-site resolution, render boundaries, and per-usage reporting. (#1975)- Renamed
lib.tstohelpers.tsin the fact-basedreact-xrules (globals,immutability,refs). (#1976) - Bumped
@effect/language-serviceto0.87.3andoxlintto1.86.0.
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.22.1...v5.23.0
v5.22.1
🐞 Fixes
react-x/use-state: directly returning theuseStateresult (ex:return React.useState()) is now allowed regardless of the rule's options, matching the exemption in the originalreact/hook-use-staterule. Covers explicit, implicit (arrow function), and type-asserted returns; lazy initialization checks still apply. (#1974, closes #1963)
📝 Documentation
- Added a note about
eslintbeing an optional peer dependency to the READMEs and the website's getting-started guides. - Simplified the
@eslint-react/kitREADME to point to the full documentation.
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.22.0...v5.22.1
v5.22.0
✨ New
react-dom/no-unknown-property: added React 19.3 properties to the known property allowlist. (#1973)closedbyondialogonFullscreenChange,onFullscreenError(and theirCapturevariants),credentialless, andmaskType— gated on React version>= 19.3.0onLoadonbodyonScrollEnd(and itsCapturevariant)shadowrootmode,shadowrootclonable,shadowrootdelegatesfocus, andshadowrootserializableontemplate
🏗️ Internal
- Bumped
fumadocs-coreandfumadocs-uito16.15.15.
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.21.3...v5.22.0
v5.21.3
🐞 Fixes
react-x/purity: reverted the v5.21.2 exemption for impure calls inuseRefinitializer arguments (ex:useRef(document.createElement("div"))); such calls are reported again. (#1972)
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.21.2...v5.21.3
v5.21.2
🐞 Fixes
react-x/no-unnecessary-use-prefix: hooks that call other hooks only within nested callbacks, functions named exactlyuse, and hooks defined in test mock module registrations are no longer reported. (#1971)react-x/no-unused-class-component-members: methods invoked by host environments through refs (React Native'sNativeMethods) are no longer reported as unused. (#1971)react-x/purity: async function components in modules without ause clientdirective and impure calls inuseRefinitializer arguments are no longer reported. (#1971)react-x/set-state-in-effect: local variables initialized from nested member expressions rooted at a ref are now recognized as ref-derived values and no longer reported. (#1971)
🏗️ Internal
@eslint-react/ast: predefined and exported common node-type helpers in theChecknamespace and migrated call sites to them.
📝 Documentation
- Website rule docs no longer include the per-rule
## Versionssection; a rule's changelog can be viewed directly via theRule Changeloglink under the## Resourcessection of each rule doc.
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v5.21.1...v5.21.2
v5.21.1
🐞 Fixes
Fixed missed reports where a timer, fetch controller, or observer created in one effect was treated as cleaned up because an unrelated cleanup in another effect referenced a different variable with the same name; identifier matching now resolves both sides to their variables by scope instead of comparing names only. (#1969)
Affected rules:
react-web-api/no-leaked-timeoutreact-web-api/no-leaked-intervalreact-web-api/no-leaked-fetchreact-web-api/no-leaked-resize-observerreact-web-api/no-leaked-intersection-observer
🏗️ Internal
Simplified the
react-web-apileaked-resource rules by replacing manual function-context stack tracking withTraverse.findParentancestor lookup, and added boundary tests covering deeply nested callbacks, cross-effect pairing, and wrapped or referenced setup callbacks. (#1969)Affected rules:
react-web-api/no-leaked-timeout
[!IMPORTANT] ✂ PR body was truncated to here.
Configuration
📅 Schedule: (UTC)
- Branch creation
- At any time (no schedule defined)
- Automerge
- At any time (no schedule defined)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
- If you want to rebase/retry this PR, check this box
This PR was generated by Mend Renovate. View the repository job log.