Changelog
v1.24.1 (2025-01-22)
π Fixes
- fix: fixed invalid rules for
disable-debug,disable-dom, anddisable-web-apisconfigs, closes https://github.com/Rel1cx/eslint-react/issues/923 by @Rel1cx in https://github.com/Rel1cx/eslint-react/pull/924
v1.24.0 (2025-01-21)
πͺ Improvements
- perf: overhaul performance optimizations
v1.23.2 (2025-01-07)
β¨ New
- feat(plugins/x): add auto-fix to
prefer-shorthand-fragment, closes #898 (#902)
v1.23.1 (2025-01-03)
π Fixes
- fix(plugins/x): fixed false positives in
no-unstable-context-valueandno-unstable-default-propsby @Rel1cx in https://github.com/Rel1cx/eslint-react/pull/896
v1.23.0 (2024-12-31)
πͺ Improvements
- refactor: JSX fragments related rules no longer rely on
jsxPragmaandjsxPragmaFragsettings to perform their checks by @Rel1cx in https://github.com/Rel1cx/eslint-react/pull/893 - refactor: improve applicability of the
no-useless-fragmentandprefer-shorthand-fragmentrules - refactor: deprecate
settings["react-x"].jsxPragmaandsettings["react-x"].jsxPragmaFragas they are no longer needed by any rules - refactor: replace
short-unique-idw/uidby @SukkaW in https://github.com/Rel1cx/eslint-react/pull/894
π Fixes
- fix(plugins/hooks-extra): fix
callandnewexpression related false positives inno-unnecessary-use-memoandno-unnecessary-use-callbackby @Rel1cx in https://github.com/Rel1cx/eslint-react/pull/895
v1.22.2 (2024-12-30)
πͺ Improvements
- perf: re-implement
no-duplicate-keyrule to improve its performance @Rel1cx in https://github.com/Rel1cx/eslint-react/pull/891 and 33ab3cc - refactor: prevent potential interference from TypeScript's
as,satisfies, and non-null assertion operator in various rules
v1.22.1 (2024-12-24)
πͺ Improvements
- docs: add getting started guides for JavaScript, TypeScript, and JavaScript with Babel
- docs: improve code samples in rules docs
- docs: improve
eslint.config.jsexamples in README.md, docs and the examples folder - docs: improve the error message and description of various rules
- refactor(website): better website layout and navigation experience
π Changes in examples
The eslint.config.js in the examples now uses tsconfig's includes and excludes as the SSoT glob patterns for ESLint's files and ignores fields.
This approach can fundamentally avoid the errors[1, 2, 3] caused by mismatched config scopes between tsconfig.json and eslint.config.js when using type-checked rules.
v1.22.0 (2024-12-22)
πͺ Improvements
- refactor(plugins/x): rename
jsx-use-varstouse-jsx-vars - refactor(plugins/x): rename
jsx-no-duplicate-propstono-duplicate-jsx-props - refactor(plugins/dom): rename
no-children-in-void-dom-elementstono-void-elements-with-children
π Changes you should be aware of
The following rules have been renamed:
jsx-uses-varstouse-jsx-varsjsx-no-duplicate-propstono-duplicate-jsx-propsdom/no-children-in-void-dom-elementstodom/no-void-elements-with-children
The new rule names are aligned with the same rules in the biomejs/rules-sources/#eslint-plugin-react (if any) to enhance consistency. The old rule names will still be available until the next major update to avoid breaking changes.
v1.21.0 (2024-12-20)
β¨ New
- feat(plugins/hooks-extra): add
no-useless-custom-hooksrule by @Rel1cx
πͺ Improvements
- refactor(plugins/hooks-extra): deprecate rule
no-redundant-custom-hookin favor ofno-useless-custom-hooks(the previous rule will still be available until the next major update to avoid breaking changes)
π Changes in Rule implementation
no-useless-custom-hooks now detects Hook calls within comments and the following code no longer triggers a warning:
v1.20.1 (2024-12-18)
πͺ Improvements
- refactor(shared): replace
local-pkgpackage with node built-in API by @Rel1cx in https://github.com/Rel1cx/eslint-react/pull/881
v1.20.0 (2024-12-16)
β¨ New
- feat(plugins/x): add codemod-autofix to
no-component-will-*by @Rel1cx in https://github.com/Rel1cx/eslint-react/pull/879
πͺ Improvements
- refactor: use default settings when no settings are provided in
settings["react-x"]by @Rel1cx in https://github.com/Rel1cx/eslint-react/commit/40ca3bd1cd7adc44f40841b5b4635e0200b73a54 - docs: update
no-context-provider.mdxby @danielrentz in https://github.com/Rel1cx/eslint-react/pull/877 - docs: add 'Min. React' column to rules overview page by @Rel1cx in https://github.com/Rel1cx/eslint-react/pull/880
- docs: add features section to rules overview page by @Rel1cx
New Contributors
- @danielrentz made their first contribution in https://github.com/Rel1cx/eslint-react/pull/877
v1.19.0 (2024-12-10)
β¨ New
- feat(plugins/x): add
no-context-providerrule by @Rel1cx - feat(plugins/x): add autofix for
no-forward-refrule by @Rel1cx in https://github.com/Rel1cx/eslint-react/pull/874 - feat(plugins/eslint-plugin): add
no-forward-refandno-context-providerto recommended presets by @Rel1cx
πͺ Improvements
- refactor(plugins/eslint-plugin): remove
prefer-read-only-propsfromrecommended-type-checkedpreset by @Rel1cx in https://github.com/Rel1cx/eslint-react/pull/872 - refactor(plugins/eslint-plugin): hide
avoid-shorthand-booleanandavoid-shorthand-fragmentfrom presets and docs by @Rel1cx in https://github.com/Rel1cx/eslint-react/pull/876 - Update
@typescript-eslint's packages to^8.18.0
v1.18.0 (2024-12-08)
β¨ New
- feat(plugins/x): add
no-forward-refrule by @Rel1cx in https://github.com/Rel1cx/eslint-react/pull/870
πͺ Improvements
- perf(plugins/dom): improve performance of
no-void-elements-with-childrenby @Rel1cx
v1.17.3 (2024-12-03)
π Fixes
- fix(plugins/web-api): add 'forEach' support to 'no-leaked-event-listener', closes #842 by @Rel1cx in https://github.com/Rel1cx/eslint-react/pull/867
- fix(plugins/web-api): add 'for of' support to 'no-leaked-event-listenner', closes #842 by @Rel1cx in https://github.com/Rel1cx/eslint-react/pull/869
- fix(plugins/x): 'no-array-index-key' mistaking 'foo.bar.map' for 'Rea⦠by @Rel1cx in https://github.com/Rel1cx/eslint-react/pull/868
πͺ Improvements
- Update
@typescript-eslint's packages to^8.17.0
v1.17.2 (2024-12-01)
πͺ Improvements
- Update
eslint's packages to^9.16.0 - Update
@typescript-eslint's packages to^8.16.0 - Update
ts-api-utilsto^2.0.0
v1.17.1 (2024-11-22)
β¨ New
- feat(shared): add version detection logic;
π Fixes
- fix(plugins/x): 'no-leaked-conditional-rendering' should also warn 'anyStringVar' when react version is lower than 18, closes #853 by @Rel1cx in https://github.com/Rel1cx/eslint-react/pull/864
- fix(plugins/dom): add popover api props to 'no-unknown-property', closes #855 by @Rel1cx in https://github.com/Rel1cx/eslint-react/pull/865
- fix(plugins/debug): 'is-from-react' use correct settings when calling 'isInitializedFromReact', by @Rel1cx
v1.17.0 (2024-11-21)
β¨ New
- feat(plugins/naming-convention): add 'ignoreFilesWithoutCode' option to 'filename-extension'
π Fixes
- refactor(plugins/x): xhtml entities should be allowed inside of 'no-useless-fragment', closes: #850
- fix(plugins/eslint-plugin): unexpected top-level property 'name' in legacy presets, closes #863
- fix(plugins/eslint-plugin): rules list in 'debug' and 'disable-debug' presets
v1.16.2 (2024-11-20)
π Fixes
- fix(plugins/x): 'no-leaked-conditional-rendering' report empty string, closes #853 by @Rel1cx in https://github.com/Rel1cx/eslint-react/pull/857
πͺ Improvements
- refactor: update the default behavior of import check, closes #858 by @Rel1cx in https://github.com/Rel1cx/eslint-react/pull/860
v1.16.1 (2024-11-10)
β¨ New
- feat(plugins/x): add
jsx-no-duplicate-propsby @Rel1cx in https://github.com/Rel1cx/eslint-react/pull/851
πͺ Improvements
- docs: use correct link for
prefer-react-namespace-importin rule list by @rakleed in https://github.com/Rel1cx/eslint-react/pull/849
v1.16.0 (2024-11-01)
β¨ New
- feat(plugins/react-x): add
jsx-uses-vars, closes #834 by @Rel1cx in https://github.com/Rel1cx/eslint-react/pull/845 - feat(plugins/react-dom): add
no-unknown-property, closes #846 by @Rel1cx - feat: add
recommended-typescriptandrecommended-typescript-legacypresets by @Rel1cx
πͺ Improvements
- Update
@typescript-eslint's packages to^8.12.2
v1.15.2 (2024-10-29)
πͺ Improvements
- Update
@typescript-eslint's packages to^8.12.1
v1.15.1 (2024-10-26)
β¨ New
- feat: added code fixer to
react-x/avoid-shorthand-booleanandreact-x/prefer-shorthand-fragmentby @Rel1cx
π Fixes
- fix(plugins/react-x): respect semicolon by @hyoban in https://github.com/Rel1cx/eslint-react/pull/841
- fix(utilities/ast): added missing ts
asandsatisfiesexpressions handling togetFunctionIdentifierby @Rel1cx , closes https://github.com/Rel1cx/eslint-react/issues/843
v1.15.0 (2024-10-12)
β¨ New
- feat: add support for constructors in
hooks-extra/prefer-use-state-lazy-initializationby @imjordanxd in https://github.com/Rel1cx/eslint-react/pull/829 - feat: add
prefer-react-namespace-import, closes #803 by @imjordanxd in https://github.com/Rel1cx/eslint-react/pull/832 - feat: add support for
allowExpressionsinno-useless-fragmentby @imjordanxd in https://github.com/Rel1cx/eslint-react/pull/836
π Fixes
- fix: Fix false positives when 'web-api/no-leaked-event-listener' passes a signal to an intermediate variable, closes #838
πͺ Improvements
- docs: Update
hooks-extra-no-direct-set-state-in-use-effect.mdxby @neovov in https://github.com/Rel1cx/eslint-react/pull/831 - docs: use a standard mono-width font for the docs, closes #835 by @Rel1cx in https://github.com/Rel1cx/eslint-react/pull/837
- Undeprecate
hooks-extra-no-direct-set-state-in-use-layout-effectand remove it from recommended presets, closes #839 by @Rel1cx in https://github.com/Rel1cx/eslint-react/pull/840
New Contributors
- @imjordanxd made their first contribution in https://github.com/Rel1cx/eslint-react/pull/829
- @neovov made their first contribution in https://github.com/Rel1cx/eslint-react/pull/831
Full Changelog: https://github.com/Rel1cx/eslint-react/compare/v1.14.3...v1.15.0
v1.14.3 (2024-09-29)
πͺ Improvements
- Update
@typescript-eslint's packages to^8.7.0
v1.14.2 (2024-09-20)
πͺ Improvements
- Update
@typescript-eslint's packages to^8.6.0
v1.14.1 (2024-09-12)
π Fixes
- Fixed false positives in rule
web-api/no-leaked-resize-observer
v1.14.0 (2024-09-10)
π Fixes
- Fixed modular plugins missing default export
- Fixed component name detection when the component name starts with a underscore
πͺ Improvements
- Update
@typescript-eslint's packages to^8.5.0
v1.13.1 (2024-09-09)
π Fixes
- Fixed
hooks-extra/no-unnecessary-use-callbackandhooks-extra/no-unnecessary-use-memofalse positives when there are references from nested scopes
v1.13.0 (2024-09-04)
β¨ New
- Added
web-api/no-leaked-resize-observerrule to prevent leakedResizeObserver
π Fixes
hooks-extra/no-useless-custom-hooksshould allow custom Hooks with empty body
πͺ Improvements
- Rename
debug/react-hookstodebug/hook - Rename
hooks-extra/ensure-custom-using-hookstohooks-extra/no-useless-custom-hooks - Rename
hooks-extra/ensure-use-memo-has-non-empty-depstohooks-extra/no-unnecessary-use-memo - Rename
hooks-extra/ensure-use-callback-has-non-empty-depstohooks-extra/no-unnecessary-use-callback - Upgrade
@typescript-eslint's packages to^8.4.0
(The rules that were renamed in this release will still be available until the next major update to avoid breaking changes.)
v1.12.4 (2024-08-31)
β¨ New
- Added
useLayoutEffectanduseInsertionEffectsupport tohooks-extra/no-direct-set-state-in-use-effect
πͺ Improvements
- Deprecate rule
hooks-extra/no-direct-set-state-in-use-layout-effectin favor ofhooks-extra/no-direct-set-state-in-use-effect(the previous rule will still be available until the next major update to avoid breaking changes)
v1.12.3 (2024-08-29)
β¨ New
- Added support for detecting event listeners removed by abort signal in rule
web-api/no-leaked-event-listener
π Fixes
- Fixed
no-duplicate-keyrule false positives when the key is a variable - Fixed
web-api/no-leaked-set-timeoutandweb-api/no-leaked-set-intervalfalse positives when a timer is assigned to a variable declared byletbut not initialized
v1.12.3 (2024-08-29)
β¨ New
- Added support for detecting event listeners removed by abort signal in rule
web-api/no-leaked-event-listener
π Fixes
- Fixed
no-duplicate-keyrule false positives when the key is an variable - Fixed
web-api/no-leaked-set-timeoutandweb-api/no-leaked-set-intervalfalse positives when a timer is assigned to a variable declared byletbut not initialized
πͺ Improvements
- Allow upper case letters in the rule
naming-convention/component-namewhen the component name is less than 4 characters, e.g.UI,CSS,SVG
v1.12.2 (2024-08-27)
β¨ New
- Added type declarations for
react-xsettings to the@typescript-eslint/utils/ts-eslintmodule via theSharedConfigurationSettingsinterface
πͺ Improvements
- Improve the performance of the
no-missing-keyandno-duplicate-keyrules - Upgrade
@typescript-eslint's packages to^8.3.0
v1.12.1 (2024-08-22)
β¨ New
- Add the options
allowAllCaps,allowNamespace,allowLeadingUnderscoretonaming-convention/component-nameand set their default values tofalse
πͺ Improvements
- Normalize the component name in rule
naming-convention/component-namebefore checking it against the pattern
v1.12.0 (2024-08-21)
β¨ New
- Added
hooks-extrarules torecommendedandrecommended-legacypresets
v1.11.0 (2024-08-20)
β¨ New
- Added
eslint-plugin-react-web-api- A plugin that provides rules for interacting with Web APIs in React applications - Added
web-api/no-leaked-timeoutrule to prevent leakedsetTimeout - Added
web-api/no-leaked-intervalrule to prevent leakedsetInterval - Added
web-api/no-leaked-event-listenerrule to prevent leakedaddEventListener - Added
web-apiandweb-api-legacypresets to enable all rules provided byeslint-plugin-react-web-api - Added
react-web-api/no-leaked-event-listenertorecommendedandrecommended-legacypresets
πͺ Improvements
- Improve performance by skipping unnecessary checks when possible
- Improve dts generation of the
@eslint-react/eslint-pluginpackage - Improve website and documentation
- Upgrade
@typescript-eslint's packages to^8.2.0
v1.10.1 (2024-08-13)
π Fixes
- Fixed
hooks-extra/prefer-use-state-lazy-initializationfalse positive when using an initializer function
πͺ Improvements
- Improve rule
no-implicit-keyerror marker position and range - Upgrade
@typescript-eslint's packages to^8.1.0 - Improve website and documentation
v1.10.0 (2024-08-11)
β¨ New
- Added
disable-type-checkedanddisable-type-checked-legacypresets to disable all type-checked rules
πͺ Improvements
- Rename
off-domandoff-dom-legacypresets todisable-domanddisable-dom-legacy(the old names will still be available until the next major update to avoid breaking changes)
v1.9.1 (2024-08-08)
π Fixes
- Fixed
dom/no-missing-iframe-sandboxfalse positive when thesandboxattribute is set tosandbox="" - Fixed
allandall-legacypresets not includinghooks-extrarules
v1.9.0 (2024-08-06)
β¨ New
- Add
corepreset that includes the most essential rules
πͺ Improvements
- Upgrade
@typescript-eslint's packages to8.0.1
v1.8.2 (2024-08-03)
π Fixes
- Fixed legacy presets not being exported correctly in
@eslint-react/eslint-plugin
v1.8.1 (2024-08-03)
πͺ Improvements
- Enhance rule
hooks-extra/no-direct-set-state-in-use-effectandhooks-extra/no-direct-set-state-in-use-layout-effectto supportsetfunction directly passed touseCallbackanduseMemowithout explicitly calling it - Improve website and documentation
v1.8.0 (2024-08-02)
π Fixes
- Fixed
ESLintReactSettingstype not being exported correctly - Fixed the
setfunction calls that are wrapped in auseMemooruseCallbacklike hook not being detected byhooks-extra/no-direct-set-state-in-use-effectandhooks-extra/no-direct-set-state-in-use-layout-effect
πͺ Improvements
- Upgrade
@typescript-eslint's packages to8.0.0 - Improve website and documentation
v1.7.1 (2024-07-31)
π Fixes
- Fixed the spread attributes support for dom related rules
- Fixed the issue where the overridden value was retrieved when there were duplicate attributes on a JSX element
πͺ Improvements
- Rule
no-leaked-conditional-renderingnow allows a falsy boolean literal to be used on the left side of the logical expression - Tweaked the default settings shipped with various presets
- Overall performance improvements
v1.7.0 (2024-07-30)
β¨ New
- Add
settings["react-x"].polymorphicPropNamesetting to specify the name of the prop that is used to determine the component type
πͺ Improvements
- Dropped the current incomplete lint support for
React.createElementto improve performance and subsequent code maintainability
v1.6.0 (2024-07-27)
β¨ New
- Add
controlledsetting tosettings["react-x"].additionalComponents'attributesobject to set whether it is controlled or not - Add glob support to
settings["react-x"].additionalComponents'namesetting - Add default settings for
react-xsettings to presets - Undeprecate rule
no-implicit-keyand improve its usefulness - Undeprecate rule
no-complicated-conditional-renderingand rename it tono-complex-conditional-rendering(the previous rule will still be available until the next major update to avoid breaking changes)
π Fixes
no-direct-set-state-in-use-(layout?)-effectshould warn only for thesetfunction
πͺ Improvements
- Remove
no-direct-set-state-in-use-(layout?)-effectfrom recommended presets
v1.5.30 (2024-07-22)
π Fixes
- Revert
changeas this format is not supported by all package managers@typescript-eslint's packages independenciesto"^7.16.1 || ^rc-v8"
v1.5.29 (2024-07-22)
β¨ New
- Add rule
no-prop-types - Add rule
no-default-props - Add experimental
settings["react-x"].additionalComponentssettings (currently only theno-unsafe-target-blankrule uses it, but more rules will use it in the future)
πͺ Improvements
- Add rule
no-prop-typesto recommended presets - Add rule
no-default-propsto recommended presets - Remove rule
no-useless-fragmentfrom recommended presets - Optimize performance of rule
no-create-ref - Change
@typescript-eslint' packages independenciesto"^7.16.1 || ^rc-v8"
v1.5.28 (2024-07-20)
π Fixes
- Fix false positives and negatives in rule
hooks-extra/no-direct-set-state-in-use-effect - Fix false positives and negatives in rule
hooks-extra/no-direct-set-state-in-use-layout-effect - Fix rule
prefer-read-only-propsreports only the first component in a file
πͺ Improvements
- Improve website and documentation
v1.5.27 (2024-07-16)
π Fixes
- Fix rule
prefer-read-only-propsthat was accidentally added to the recommended type-checked presets - Fix false negatives in rule
hooks-extra/no-direct-set-state-in-use-effectwhen callsetfunction inside a non-function scope - Fix false negatives in rule
hooks-extra/no-direct-set-state-in-use-layout-effectwhen callsetfunction inside a non-function scope
πͺ Improvements
- Rule
no-leaked-conditional-renderingnow supports BigInt literals on the left side of the logical expression - Rule
no-leaked-conditional-renderingnow allows a truthy number literal to be used on the left side of the logical expression - Optimize bundle size
v1.5.26 (2024-07-15)
β¨ New
- Add rule
hooks-extra/no-direct-set-state-in-use-effect - Add rule
hooks-extra/no-direct-set-state-in-use-layout-effect
π Fixes
- Fix false positives in rule
hooks-extra/ensure-use-memo-has-non-empty-depswhen referencing component block scope - Fix false positives in rule
hooks-extra/no-unnecessary-use-callbackwhen referencing component block scope
πͺ Improvements
- Add rule
hooks-extra/no-direct-set-state-in-use-effectto recommended presets - Add rule
hooks-extra/no-direct-set-state-in-use-layout-effectto recommended presets - Add rule
hooks-extra/prefer-use-state-lazy-initializationto recommended presets
v1.5.25 (2024-07-13)
πͺ Improvements
- Optimize bundle size
v1.5.24 (2024-07-11)
π Fixes
- Fix rule
prefer-read-only-propsfalse positive when usingObjectPatternin function arguments
πͺ Improvements
- Change
typescriptversion inpeerDependenciesto"^4.9.5 || ^5.3.3"
v1.5.23 (2024-07-07)
π Fixes
- Fix rule
prefer-read-only-propsfalse negative when usingObjectPatternin function arguments
πͺ Improvements
- Improve website and documentation
v1.5.22 (2024-07-05)
β¨ New
- Add rule
prefer-read-only-props
πͺ Improvements
- Downgrade
@typescript-eslint's packages to v7, due to stability issues with v8
v1.5.21 (2024-07-03)
π Fixes
- Add missing dependencies to
@eslint-react/eslint-plugin - Fix rule
no-nested-componentsfalse negative when placing components inside JSX props
πͺ Improvements
- Update
@typescript-eslint's packages to v8 - Improve rule
no-leaked-conditional-renderingcompatibility with different versions oftypescript-eslint
v1.5.20 (2024-07-02)
π Fixes
- Fix rule
prefer-destructuring-assignmentfalse positive when the function looks like a component
πͺ Improvements
- Improve
utilities/jsx/is-jsx-valueto better distinguish between normal values and JSX values - Improve
core/component-collectorto better distinguish between normal functions and components - Prevent potential function component detection related false positives
- Switch to a more appropriate value for
DEFAULT_COMPONENT_HINT
v1.5.19 (30 Sun Jun 2024)
πͺ Improvements
- Reduce the number of dependencies by inlining tree-shaking optimized code while bundling
- Deprecate
reactOptionsin favor ofreact-xin ESLint Shared Settings
v1.5.18 (28 Fri Jun 2024)
π Fixes
- Fix rule
no-useless-fragmentnot respectingjsxPragmasettings
πͺ Improvements
- Update documentation for rule
no-useless-fragmentto reflect the actual behavior of the rule
v1.5.17 (2024-06-26)
πͺ Improvements
- Remove rule
no-children-propfrom recommended presets - Improve documentation for rule
no-useless-fragment
v1.5.16 (2024-06-17)
π Fixes
- Fix debug rules not exporting correctly in
@eslint-react/eslint-plugin
πͺ Improvements
- Remove rule
prefer-shorthand-booleanfrom recommended presets - Remove rule
prefer-shorthand-fragmentfrom recommended presets - Remove rule
prefer-destructuring-assignmentfrom recommended presets
v1.5.15 (2024-06-08)
π Fixes
- Remove
languageOptions.parserfrom presets - Remove
@typescript-eslint/parserfrom peer dependencies - Rule
no-leaked-conditional-rendering: object should be considered as valid left-hand type
v1.5.14 (2024-05-30)
β¨ New
- Add rule
avoid-shorthand-boolean - Add rule
avoid-shorthand-fragment
π Fixes
- Fix rule
dom/no-missing-button-typefalse positive when usingtypeattribute in a JSX expression
v1.5.13 (2024-05-28)
π Fixes
- Fix components that use
getDerivedStateFromErrorshould not be warned by ruleno-class-component
πͺ Improvements
- Update
@typescript-eslint's packages to7.11.0
v1.5.12 (2024-05-17)
π Fixes
- Fix ESLint peer dependency range in
package.json
πͺ Improvements
- Update
@typescript-eslint's packages to7.9.0 - Minor improvements
v1.5.11 (2024-05-08)
β¨ New
- Rule
no-class-componentrule now allows class components with acomponentDidCatchmethod - Settings
reactOptionsnow supportsimportSourceto specify the import source for React
ποΈ Deprecations
- Deprecate rule
no-implicit-keybecause it is stylistic and opinionated - Deprecate rule
no-complicated-conditional-renderingbecause it is stylistic and opinionated
πͺ Improvements
- Refactor React pragma and import name retrieval utils to support custom import source
- Update
@typescript-eslint's packages to7.8.0
v1.5.10 (2024-04-28)
πͺ Improvements
- Update
reactto18.3.1 - Update
@typescript-eslint's packages to7.7.1 - Use a wider range of peerDependencies
v1.5.9 (2024-04-19)
πͺ Improvements
- Optimize error messages of rules
- Update
@typescript-eslint's packages to7.7.0
v1.5.8 (2024-04-11)
πͺ Improvements
- Update
@typescript-eslint's packages to7.6.0
v1.5.7 (2024-03-28)
πͺ Improvements
- Update
@typescript-eslint's packages to7.4.0
v1.5.6 (2024-03-12)
πͺ Improvements
- Update
@typescript-eslint's packages to7.2.0
v1.5.5 (2024-02-18)
π Fixes
- Fix rule
no-component-will-receive-propsnot working as expected
πͺ Improvements
- Improve error messages and code samples in rule docs
v1.5.4 (2024-02-16)
π Fixes
- Fix rule
dom/no-render-return-valuenot renamed in v1.0.0
πͺ Improvements
- Improve code samples in rule docs
- Update
effectto2.3.5 - Update
@typescript-eslint's packages to7.0.1
v1.5.3 (2024-02-10)
πͺ Improvements
- Improve diagnostic messages
- Remove needless deps from
peerDependencies - Update
@typescript-eslint's packages to6.21.0
v1.5.2 (2024-01-31)
πͺ Improvements
- Remove needless deps from
peerDependencies - Update
@typescript-eslint's packages to6.20.0 - Update
effectto2.2.3
v1.5.2-beta.2 (2024-01-31)
πͺ Improvements
- Update
effectto2.2.3 - Remove needless deps from
peerDependencies
v1.5.2-beta.0 (2024-01-30)
πͺ Improvements
- Update
@typescript-eslint's packages to6.20.0
v1.5.1 (2024-01-29)
β¨ New
- Add
off-domandoff-dom-legacypresets to disable all DOM related rules
πͺ Improvements
- Reduce dependencies size
v1.5.0 (2024-01-29)
π₯ Breaking Changes
- Remove rule
max-depth - Rename rule
no-spreading-keytono-implicit-key - Rename rule
no-constructed-context-valuetono-unstable-context-value - Rename rule
no-unstable-nested-componentstono-nested-components - Switch to new name prefix of rules in
@eslint-react/eslint-plugin- Replace
jsx/with `` in rule names - Replace
react/with `` in rule names - Replace
react-dom/withdom/in rule names - Replace
react-hooks/withhooks-extra/in rule names
- Replace
- Switch to new settings schema
- Put settings under
reactOptionsinstead ofeslintReact - Replace
jsx.pragmawithjsxPragma - Replace
jsx.fragmentwithjsxPragmaFrag - Replace
react.versionwithversion - Remove
jsx.extensions
- Put settings under
v1.0.2 (2024-01-27)
π Fixes
- Fix rule
react-dom/no-namespacenot renamed in v1.0.0 - Fix rule
react-dom/no-void-elements-with-childrennot renamed in v1.0.0
πͺ Improvements
- Improve rules overview page on website
- Remove
jsxandhookspresets from documentation
v1.0.1 (2024-01-27)
πͺ Improvements
- Improve
jsxandjsx-legacypresets - Improve
coreandcore-legacypresets - Improve
recommendedandrecommended-legacypresets - Improve
recommended-type-checkedandrecommended-type-checked-legacypresets
v1.0.0 (2024-01-27)
π₯ Breaking Changes
All DOM related rules are moved to react-dom namespace
- Rename rule
react/no-void-elements-with-childrentoreact-dom/no-void-elements-with-children - Rename rule
react/no-dangerously-set-innerhtml-with-childrentoreact-dom/no-dangerously-set-innerhtml-with-children - Rename rule
react/no-dangerously-set-innerhtmltoreact-dom/no-dangerously-set-innerhtml - Rename rule
react/no-find-dom-nodetoreact-dom/no-find-dom-node - Rename rule
react/no-missing-button-typetoreact-dom/no-missing-button-type - Rename rule
react/no-missing-iframe-sandboxtoreact-dom/no-missing-iframe-sandbox - Rename rule
react/no-namespacetoreact-dom/no-namespace - Rename rule
react/no-render-return-valuetoreact-dom/no-render-return-value - Rename rule
react/no-script-urltoreact-dom/no-script-url - Rename rule
react/no-unsafe-iframe-sandboxtoreact-dom/no-unsafe-iframe-sandbox - Rename rule
react/no-unsafe-target-blanktoreact-dom/no-unsafe-target-blank
β¨ New
- Make
doman alias ofreact-dompreset - Make
hooksan alias ofreact-hookspreset - Add preset
jsxandjsx-legacy - Add preset
react-domanddom-legacy - Add preset
coreandcore-legacy - Add preset
react-hooksandhooks-legacy
π Fixes
- Fix the lint message for rule
react-dom/no-dangerously-set-innerhtml
v1.0.0-beta.3 (2024-01-26)
π Fixes
- Fix the name prefix for react-dom rules
v1.0.0-beta.2 (2024-01-26)
β¨ New
- Make
doman alias ofreact-dompreset - Make
hooksan alias ofreact-hookspreset
v1.0.0-beta.1 (2024-01-26)
β¨ New
- Add preset
jsxandjsx-legacy - Add preset
domanddom-legacy - Add preset
coreandcore-legacy - Add preset
hooksandhooks-legacy
v1.0.0-beta.0 (2024-01-26)
π₯ Breaking Changes
All DOM related rules are moved to react-dom namespace
- Rename rule
react/no-dangerously-set-innerhtmltoreact-dom/no-dangerously-set-innerhtml - Rename rule
react/no-dangerously-set-innerhtml-with-childrentoreact-dom/no-dangerously-set-innerhtml-with-children - Rename rule
react/no-find-dom-nodetoreact-dom/no-find-dom-node - Rename rule
react/no-missing-button-typetoreact-dom/no-missing-button-type - Rename rule
react/no-missing-iframe-sandboxtoreact-dom/no-missing-iframe-sandbox - Rename rule
react/no-script-urltoreact-dom/no-script-url - Rename rule
react/no-unsafe-iframe-sandboxtoreact-dom/no-unsafe-iframe-sandbox - Rename rule
react/no-unsafe-target-blanktoreact-dom/no-unsafe-target-blank
v0.10.12 (2024-01-21)
πͺ Improvements
- Remove unnecessary
parserOptionsfields from presets
v0.10.12-beta.0 (2024-01-21)
πͺ Improvements
- Remove unnecessary
parserOptionsfields from presets
v0.10.11 (2024-01-20)
β¨ New
- Add rule
react/no-access-state-in-setstate
πͺ Improvements
- Improve rule
react/no-unused-stateto respect the usage ofgetDerivedStateFromProps - Update
@typescript-eslint's packages to6.19.0
v0.10.11-beta.2 (2024-01-19)
β¨ New
- Add rule
react/no-access-state-in-setstate
v0.10.11-beta.1 (2024-01-16)
πͺ Improvements
- Update
@typescript-eslint's packages to6.19.0
v0.10.11-beta.0 (2024-01-15)
πͺ Improvements
- Improve rule
react/no-unused-stateto respect the usage ofgetDerivedStateFromProps
v0.10.10 (2024-01-14)
πͺ Improvements
- Improve rule
react/no-unused-stateto support checking for more cases - Improve rule
react/no-direct-mutation-stateto support checking for more cases - Improve rule
react/no-unused-class-component-membersto support checking for more cases
v0.10.10-beta.0 (2024-01-14)
πͺ Improvements
- Improve rule
react/no-unused-stateto support checking for more cases - Improve rule
react/no-direct-mutation-stateto support checking for more cases - Improve rule
react/no-unused-class-component-membersto support checking for more cases
v0.10.9 (2024-01-12)
π Fixes
- Fix bundle size is larger than expected
v0.10.8 (2024-01-11)
π Fixes
- Fix version format in v0.10.7's package.json
v0.10.7 (2024-01-11)
β¨ New
- Add rule
react/no-unused-state
v0.10.6 (2024-01-09)
π Fixes
- Fix an issue where
react/no-constructed-context-valueandreact/no-unstable-default-propswould report false negatives when using LogicalExpression and ConditionalExpression
v0.10.6-beta.0 (2024-01-08)
π Fixes
- Fix an issue where
react/no-constructed-context-valueandreact/no-unstable-default-propswould report false negatives when using LogicalExpression and ConditionalExpression
v0.10.5 (2024-01-08)
β¨ New
- Add rule
react/no-unused-class-component-members
πͺ Improvements
- Update
@typescript-eslint's packages to6.18.0
v0.10.5-beta.0 (2024-01-07)
β¨ New
- Add rule
react/no-unused-class-component-members
πͺ Improvements
- Update
@typescript-eslint's packages to6.18.0
v0.10.4 (2024-01-06)
πͺ Improvements
- Improve rule
react/no-unstable-default-propsto support checking for ObjectPatterns within VariableDeclarators that occur on props - Improve function component detection in rule
react/no-unstable-nested-componentsanddebug/function-component
π Fixes
- Fix same kind of error inside a component should not only be reported once in rule
react/no-create-refandreact/no-constructed-context-value - Fix an issue where render functions wrapped in
useCallbackwere accidentally detected as function components in rulesreact/no-unstable-nested-componentsanddebug/function-component
v0.10.4-beta.1 (2024-01-06)
πͺ Improvements
- Improve function component detection in rule
react/no-unstable-nested-componentsanddebug/function-component
π Fixes
- Fix an issue where render functions wrapped in
useCallbackwere accidentally detected as function components in rulesreact/no-unstable-nested-componentsanddebug/function-component
v0.10.4-beta.0 (2024-01-06)
πͺ Improvements
- Improve rule
react/no-unstable-default-propsto support checking for ObjectPatterns within VariableDeclarators that occur on props
π Fixes
- Fix same kind of error inside a component should not only be reported once in rule
react/no-create-refandreact/no-constructed-context-value
v0.10.3 (2024-01-05)
πͺ Improvements
- Update
@typescript-eslint's packages to6.17.0
v0.10.3-beta.0 (2024-01-02)
πͺ Improvements
- Update
@typescript-eslint's packages to6.17.0
v0.10.2 (2023-12-30)
β¨ New
- Add
reactHooks.aliassetting support
v0.10.2-beta.0 (2023-12-30)
β¨ New
- Add
reactHooks.aliassetting support
v0.10.1 (2023-12-27)
πͺ Improvements
- Add
react/no-clone-elementtorecommendedandrecommended-legacypresets - Improve rule
react/no-unstable-nested-components, make its behavior closer to react-hooks/no-nested-components - Update
@typescript-eslint's packages to6.16.0
v0.10.1-beta.1 (2023-12-26)
πͺ Improvements
- Update
@typescript-eslint's packages to6.16.0
v0.10.1-beta.0 (2023-12-25)
πͺ Improvements
- Add
react/no-clone-elementtorecommendedandrecommended-legacypresets - Improve rule
react/no-unstable-nested-components, make its behavior closer to react-hooks/no-nested-components
v0.10.0 (2023-12-21)
β¨ New
- Add rule
jsx/max-depth
πͺ Improvements
- Improve
recommendedandrecommended-legacypresets
v0.10.0-beta.0 (2023-12-21)
β¨ New
- Add rule
jsx/max-depth
πͺ Improvements
- Improve
recommendedandrecommended-legacypresets
v0.9.8 (2023-12-19)
β¨ New
- Add rule
react/ensure-forward-ref-using-ref
πͺ Improvements
- Reduce false positives in rule
react/no-unstable-nested-components - Reduce false positives in rule
debug/function-component - Optimize
recommendedandrecommended-legacypresets - Update
@typescript-eslint's packages to6.15.0
v0.9.8-beta.2 (2023-12-19)
πͺ Improvements
- Optimize
recommendedandrecommended-legacypresets
v0.9.8-beta.1 (2023-12-19)
πͺ Improvements
- Minor improvements
v0.9.8-beta.0 (2023-12-17)
β¨ New
- Add rule
react/ensure-forward-ref-using-ref
πͺ Improvements
-
Reduce false positives in rule
react/no-unstable-nested-components -
Reduce false positives in rule
debug/function-component
v0.9.7 (2023-12-17)
π₯ Breaking Changes
- Rule
named-convention/filename-extensionrenameruleoption toallow
π Fixes
- Fix where functions in
<Component footer={() => <div />} />or<Component Footer={() => <div />} />are treated as components - Fix false positive in rule
react/no-unstable-nested-components - Fix false positive in rule
debug/function-component
πͺ Improvements
-
Rules now support reading JSX extensions from
settings.eslintReact.jsx.extensions -
Replace β Incorrect and β Correct with Failing and Passing in rule docs
v0.9.7-beta.2 (2023-12-16)
π Fixes
- Update default rule option in
named-convention/filenametoPascalCase
v0.9.7-beta.1 (2023-12-14)
πͺ Improvements
- Minor improvements
v0.9.7-beta.0 (2023-12-14)
π₯ Breaking Changes
- Rule
named-convention/filename-extensionrenameruleoption toallow
β¨ New
- Rule
named-convention/filenameaddextensionsoption - Rule
named-convention/filename-extensionaddextensionsoption
v0.9.6 (2023-12-12)
β¨ New
- Add rule
react-hooks/prefer-use-state-lazy-initialization
πͺ Improvements
- Rule
named-convention/component-nameadd bothstringandobjectoptions support - Rule
named-convention/filenameadd bothstringandobjectoptions support - Rule
named-convention/filename-extensionadd bothstringandobjectoptions support - Rule
debug/react-hooksreportshookCalls.lengthinstead ofcost - Update
@typescript-eslint's packages to6.14.0
v0.9.6-beta.5 (2023-12-12)
πͺ Improvements
- Update
@typescript-eslint's packages to6.14.0
v0.9.6-beta.4 (2023-12-11)
πͺ Improvements
- Rule
named-convention/component-nameadd bothstringandobjectoptions support - Rule
named-convention/filenameadd bothstringandobjectoptions support - Rule
named-convention/filename-extensionadd bothstringandobjectoptions support
v0.9.6-beta.3 (2023-12-11)
πͺ Improvements
- Remove rule
react-hooks/prefer-use-state-lazy-initializationfromrecommendedandrecommended-legacypresets
v0.9.6-beta.2 (2023-12-11)
β¨ New
- Add rule
react-hooks/prefer-use-state-lazy-initialization
πͺ Improvements
- Rule
named-convention/filename-extensionswitch options format from object to string
v0.9.6-beta.1 (2023-12-11)
πͺ Improvements
- Rule
debug/react-hooksreportshookCalls.lengthinstead ofcost
v0.9.5 (2023-12-11)
πͺ Improvements
- Improve rule
jsx/no-leaked-conditional-renderingerror marker position and range - Improve rule
react/no-missing-button-typeerror marker position and range - Improve rule
react/no-missing-iframe-sandboxerror marker position and range - Improve rule
react/no-unsafe-iframe-sandboxerror marker position and range
v0.9.4 (2023-12-08)
πͺ Improvements
- Improve rule docs
v0.9.3 (2023-12-08)
β¨ New
- Add rule
react/no-direct-mutation-state - Add rule
naming-convention/use-state
πͺ Improvements
- Update
recommendedandrecommended-legacypresets - Improve rules overview page
v0.9.2 (2023-12-06)
β¨ New
- Add rule
react/no-component-will-update - Add rule
react/no-unsafe-component-will-update - Add rule
react/no-component-will-receive-props - Add rule
react/no-unsafe-component-will-receive-props - Add rule
react/no-set-state-in-component-did-mount - Add rule
react/no-set-state-in-component-did-update - Add rule
react/no-set-state-in-component-will-update
v0.9.1 (2023-12-05)
β¨ New
- Add rule
react/no-component-will-mount - Add rule
react/no-unsafe-component-will-mount
v0.9.0 (2023-12-01)
π₯ Breaking Changes
@eslint-react/eslint-plugin-jsx- Remove
allowExpressionsoption from rulejsx/no-useless-fragment
- Remove
@eslint-react/jsx- Remove
isFragmentWithOnlyTextAndIsNotChild,isFragmentHasLessThanTwoChildren,isFragmentWithSingleExpressionfrom@eslint-react/jsx's API
- Remove
β¨ New
- Add rule
react/no-redundant-should-component-update
πͺ Improvements
- Update Options of rule
jsx/no-useless-fragment - Optimize bundle size