- The
dependency-grouprule's"never"mode now recognizes dependency comments regardless of capitalization or a trailing period while preserving other comments. (#81246)
- Added
no-non-module-stylesheet-importsrule to prevent importing non-module stylesheets from JavaScript files (#77984).
- Added
use-import-asrule to enforce configured aliases for selected named imports and directunlock( privateApis )destructuring (#77389). - Added
no-unsafe-render-orderrule to flag unsafe render-prop composition withVisuallyHiddenandLink/Text(#77428).
- Improved the Design System token lint rules to recognize CSS declaration strings more accurately, avoiding false bare-token reports for declarations while still flagging invalid token assignments and unknown token names (#77384).
- Update
use-recommended-componentsrule to preferVisuallyHiddenfrom@wordpress/uiover@wordpress/components(#77575).
- Upgraded to ESLint v10 with flat config format. The plugin now exports flat config arrays instead of eslintrc objects. Consumers must migrate from
.eslintrc.*files toeslint.config.mjs. See the migration guide for details (#76654). - The minimum required ESLint version is now
^9.0.0 || ^10.0.0(#76654). - Upgraded
eslint-plugin-importto v2.31+ (wrapped withfixupPluginRulesfor flat config compatibility) (#76654). - Upgraded
@typescript-eslint/*from v6 to v8 (via the unifiedtypescript-eslintpackage) (#76654). - Replaced
eslint-plugin-eslint-commentswith@eslint-community/eslint-plugin-eslint-comments. Rule prefixes changed fromeslint-comments/*to@eslint-community/eslint-comments/*(#76654).
- Added
@wordpress/eslint-plugin/eslintrcentry point — a compatibility wrapper for ESLint v9 consumers still using.eslintrc.*files. This is deprecated and will be removed in a future major version (#76654). - Configs are now exported as flat config arrays (e.g.,
wordpress.configs.recommendedreturns an array of config objects suitable for spreading intoeslint.config.mjs) (#76654).
- Disabled the
jsx-a11y/heading-has-contentrule in the recommended configuration, which reports many false positives when heading elements are passed via arenderprop (#77073).
- Added
no-dom-globals-in-module-scope,no-dom-globals-in-constructor,no-dom-globals-in-react-cc-render, andno-dom-globals-in-react-fcrules to prevent DOM global usage in SSR-unsafe contexts, replacing the unmaintainedeslint-plugin-ssr-friendlypackage (#76508). - Added
use-recommended-componentsrule to encourage the use of recommended UI components in a WordPress environment (#76222). - Added
no-unmerged-classnamerule to flag components that set an explicitclassNamewhile spreading rest props without destructuring and merging the incomingclassName(#76458).
- The
no-unknown-ds-tokensrule now reports bare--wpds-*tokens not wrapped invar(), which would silently miss build-time fallback injection. - The
no-setting-ds-tokensrule now checks all object property keys, not just those inside JSXstyleattributes (#76212).
- Added
no-ds-tokensrule to disallow usage of Design System token CSS custom properties (--wpds-*).
- The
no-unknown-ds-tokensrule now checks all string literals and template literals, not just JSXstyleattributes. It also reports dynamically constructed--wpds-*token names.
- The
dependency-grouprule now accepts an optional"never"mode to forbid dependency group comments.
- Updated recommended ruleset to enforce
import/no-unresolvedfor@wordpress/packages. These packages were previously exempted from the rule. (#72978) - Removed default configuration of
import/internal-regexto classify@wordpress/packages as internal. From the perspective of an external consumer of this package,@wordpress/packages should be considered external. (#72978)
- Added
no-setting-ds-tokensrule to disallow setting Design System token CSS custom properties (--wpds-*). (#74325) - Added
no-unknown-ds-tokensrule to disallow unknown Design System tokens. (#74325) - Added
components-no-missing-40px-size-proprule to opt-in to the new 40px default size for components from the@wordpress/componentspackage. (#74611) - Added
components-no-unsafe-button-disabledrule to ensure that buttons from the@wordpress/componentspackage are accessible when disabled. (#74611)
- The
dependency-grouprule is not recommended anymore. (#73616)
- Disabled
import/no-unresolved,import/default, andimport/namedchecks for TypeScript files when TypeScript is installed, since these issues are already checked by TypeScript. - Improved resolution behavior to support modern package export semantics by updating default import resolver to
eslint-import-resolver-typescript, including for non-TypeScript files.
- Added stricter ESLint checks for translator comments.
- Supports unnamed (%s, %d, %f), positional (%1$s, etc.) and named placeholders.
- Flags missing and extra/outdated placeholders.
- The minimum required TypeScript version changed to 5 (#67461)
- Add
@wordpress/i18n-no-flanking-whitespaceto the recommended i18n ruleset (#64710). - Add
@wordpress/i18n-hyphenated-rangeto the recommended i18n ruleset (#64710).
- Add
@typescript-eslint/no-unused-varsrule to the recommended TypeScript ruleset (#62925). - Add
@typescript-eslint/method-signature-stylerule to the recommended TypeScript ruleset (#62718).
@wordpress/is-gutenberg-pluginrule has been replaced by@wordpress/wp-global-usage(#61486).@wordpress/wp-process-envrule has been added and included in the recommended configurations (#61486).@wordpress/gutenberg-phaserule has been removed (deprecated in v10.0.0) (#61486).- Increase the minimum required Node.js version to v18.12.0 matching long-term support releases (#31270). Learn more about Node.js releases.
- Replaced
classnamespackage with the faster and smallerclsxpackage (#61138).
- Enable
curlyeslint rule when using prettier (#61204).
- Change the required major version of Prettier from v2 to v3 (#54775).
- The bundled
@typescript-eslint/parserand@typescript-eslint/eslint-plugindependencies has been updated from requiring ^5.62.0 to requiring ^6.4.1 (#53975):- Removes the deprecated
@typescript-eslint/no-duplicate-importsrule in favor ofimport/no-duplicates.
- Removes the deprecated
- Added a new
test-playwrightruleset usingeslint-plugin-playwright. - The bundled
eslint-plugin-prettierdependency has been updated from requiring^3.3.0to requiring^5.0.0(#54539).
- The bundled
eslint-plugin-jsdocdependency has been updated from requiring ^39.6.9 to requiring ^46.4.6 (#53629):- Removes
jsdoc/newline-after-descriptionrule in favor ofjsdoc/tag-lineswith optionstartLines: 0for "never" andstartLines: 1for "always". Defaults now tostartLines: null. - Removes
dropEndLines: truefromjsdoc/tag-linesin favor of optionendLines: 0. - Drops
jsdoc/tag-linesrule'snoEndLines: truein favor ofapplyToEndTag: false. - Disables the newly introduced
jsdoc/no-defaultsrule.
- Removes
- Support Typescript 5 and 5.1 by updating both
@typescript-eslint/parserand@typescript-eslint/eslint-pluginto version^5.62.0. (#52621).
- Validate dependencies in
useSelectanduseSuspenseSelecthooks. (#49900).
- Increase the severity of the rule
jsdoc/check-line-alignmentfromwarntoerror. (#47878).
- The bundled
eslint-plugin-jsdocdependency has been updated from requiring^37.0.3to requiring^39.6.9
- Bump
eslint-plugin-jestversion to 27.2.1.
- Increase the minimum Node.js version to 14 and minimum npm version to 6.14.4 (#43141).
- Remove all rules targeting test files from the
recommendedandrecommended-with-formattingpresets when Jest package is installed (#43272).
- Remove deprecated rules
no-negated-in-lhsreplaced withno-unsafe-negation, andjsx-a11y/label-has-forreplaced withjsx-a11/label-has-associated-control(#42654).
- Enable
no-unused-vars's settingignoreRestSiblingsto allow unused variables when destructuring with rest properties (#41897).
- Fix the
recommendedpreset when Prettier is not installed (#40634).
- Revert the removal of the automatic environment detection of
test-unitandtest-e2efor therecommendedpreset. However, They will still be disabled if@playwright/testis installed in the project.
- The integration with Prettier is now optional and gets activated when the
prettierpackage is installed in the project (#39244).
- Replaced no-shadow eslint rule with @typescript-eslint/no-shadow (#38665).
- Remove automatic environment detection of
test-unitandtest-e2efor therecommendedpreset. It's now recommended to opt-in to specific preset explicitly.
- The peer dependency constraint for ESLint has been updated from
^6 || ^7to^8. - The bundled
@typescript-eslint/eslint-plugindependency has been updated from requiring^4.31.0to requiring^5.3.0(#36283). - The bundled
@typescript-eslint/parserdependency has been updated from requiring^4.31.0to requiring^5.3.0(#36283). - The bundled
eslint-config-prettierdependency has been updated from requiring^7.1.0to requiring^8.3.0(#36283). - The bundled
eslint-plugin-jestdependency has been updated from requiring^24.1.3to requiring^25.2.3(#36283). - The bundled
eslint-plugin-jsdocdependency has been updated from requiring^36.0.8to requiring^37.0.3(#36283). - The bundled
globalsdependency has been updated from requiring^12.0.0to requiring^13.12.0(#36283). - The
gutenberg-phaserule has been deprecated and replaced by theis-gutenberg-pluginrule. (#38202)
- Omit verification for WordPress dependencies in the import statements since they get externalized when used with WordPress (#37639).
- Fix Babel config resolution when a custom ESLint config present (#37406). Warning: it won't recognize the
babel.config.jsonfile present in the project until the upstream bug incosmiconfigis fixed.
- Replaced deprecated
babel-eslintdependency with@babel/eslint-parser(#36244). - The bundled
eslint-plugin-importdependency has been updated from requiring^2.23.4to requiring^2.25.2(#36244).
- The bundled
eslint-plugin-jsdocdependency has been updated from requiring^34.1.0to requiring^36.0.8(#34338).
- Use Jest related rules only when the
jestpackage is installed (#33120).
- The recommended configuration will now respect
typeimports in TypeScript files (#34055).
- Include
.jsxextension when linting import statements in case TypeScript not present (#33746).
- Adds JSDoc alignment check (#25300).
- Adds TypeScript as a peer dependency and makes it optional when not installed (#29942).
- Add support and configuration for TypeScript files. #27143
- Enabled
import/defaultandimport/namedrules in therecommendedruleset. #28513 - Add new rule
@wordpress/data-no-store-string-literalsto discourage passing string literals to reference data stores (#28726).
- Add missing
eslint-plugin-importnpm dependency (#28545).
- Increase the minimum Node.js version to 12 (#27934).
- Enabled
import/no-extraneous-dependenciesrule in therecommendedruleset. - Enabled
import/no-unresolvedrule in therecommendedruleset. - Enabled
no-unsafe-wp-apisrule in therecommendedruleset (#27327). - The bundled
eslint-config-prettierdependency has been updated from requiring^6.10.1to requiring^7.1.0(#27965). - The bundled
eslint-plugin-jestdependency has been updated from requiring^23.8.2to requiring^24.1.3(#27965).
- The bundled
eslint-plugin-jsdocdependency has been updated from requiring^30.2.2to requiring^30.7.13(#27965). - The bundled
eslint-plugin-jsx-a11ydependency has been updated from requiring^6.2.3to requiring^6.4.1(#27965). - The bundled
eslint-plugin-prettierdependency has been updated from requiring^3.1.2to requiring^3.3.0(#27965). - The bundled
eslint-plugin-reactdependency has been updated from requiring^7.20.0to requiring^7.22.0(#27965). - The bundled
eslint-plugin-react-hooksdependency has been updated from requiring^4.0.4to requiring^4.2.0(#27965).
- Enable
react-hooks/exhaustive-depsrules in the react config in "warn" mode (#24914).
- Add
no-unsafe-wp-apisrule to discourage usage of unsafe APIs (#27301).
- The bundled
wp-prettierdependency has been upgraded from2.0.5to2.2.1.
- Include a note about the minimum version required for
node(10.0.0) andnpm(6.9.0).
- Fix TypeError for projects without a local Prettier configuration.
- The bundled
eslint-plugin-jsdocdependency has been updated from requiring^26.0.0to requiring^30.2.2.
- The recommended configuration will now respect local Prettier configuration. These are merged to the default WordPress configuration.
- Support ESLint
^7as peer dependency.
- The bundled
wp-prettierdependency has been upgraded from1.19.1to2.0.5. Refer to the Prettier 2.0 "2020" blog post for full details about the major changes included in Prettier 2.0. - The bundled
eslint-plugin-react-hooksdependency has been updated from requiring^3.0.0to requiring^4.0.4. - The bundled
eslint-plugin-jsdocdependency has been updated from requiring^22.1.0to requiring^26.0.0.
- The bundled
eslint-plugin-reactdependency has been updated from requiring^7.19.0to requiring^7.20.0.
@wordpress/dependency-groupwill now correctly identify issues associated with CommonJS (require) module imports.
- The severity of the rule,
jsdoc/no-undefined-types, has been increased fromwarntoerror. In addition,JSXhas been added to the default list of defined types.
'AsyncIterableIterator'is now allowed as a valid TypeScript utility type.
- The
@wordpress/no-unused-vars-before-returnrule will now correctly identify valid usage of a variable as a JSX identifier. - Make
@wordpress/i18n-text-domainrule less strict by default. WhenallowedTextDomainoption is not provided it allows now skipping text domain or providing any string (#21928).
- Fixes an error caused by missing
utilsdirectory from published package (#21609). - Added the recommended
Prettierconfig that enforces WordPress coding style guidelines (#21602).
- There is a new
i18nruleset that includes all i18n-related rules and is included in therecommendedruleset. - The
@wordpress/valid-sprintfrule has been moved from thecustomruleset to thei18nruleset. - The
@wordpress/valid-sprintfrule now recognizes mix of ordered and non-ordered placeholders. - The bundled
eslint-plugin-jestdependency has been updated from requiring^22.15.1to requiring^23.8.2(#21424). - The bundled
eslint-plugin-jsdocdependency has been updated from requiring^21.0.0to requiring^22.1.0(#21424). - The bundled
eslint-plugin-react-hooksdependency has been updated from requiring^1.6.1to requiring^3.0.0(#21424).
- New Rule:
@wordpress/i18n-text-domain - New Rule:
@wordpress/i18n-translator-comments - New Rule:
@wordpress/i18n-no-variables - New Rule:
@wordpress/i18n-no-placeholders-only - New Rule:
@wordpress/i18n-no-collapsible-whitespace - New Rule:
@wordpress/i18n-ellipsis - The bundled
eslint-plugin-reactdependency has been updated from requiring^7.14.3to requiring^7.19.0(#21424).
- The
@wordpress/valid-sprintfrule now detects usage ofsprintfviai18n.sprintf(e.g. when usingimport * as i18n from '@wordpress/i18n'). @wordpress/no-unused-vars-before-returnwill correctly consider other unused variables after encountering an instance of anexcludePatternoption exception.
- The
prefer-construle included in therecommendedandesnextrulesets has been relaxed to allow aletassignment if any of a destructuring assignment are reassigned.
- The
recommendedruleset checks again code formatting (whitespace, indenting, etc.). These rules are now enforced by Prettier itself through a plugin that diffs the code with its formatted output and reports the differences as lint errors.eslint-plugin-prettierwas chosen over options likeprettier-eslintbecause we don't runeslint --fixin hooks as we'd rather leave certain linting errors to be resolved or ignored at the author's discretion. We also don't apply any additional formatting witheslintoverprettier, so the overhead would be unnecessary.eslint-plugin-prettierwas chosen over options likeprettier --checkbecause it's nice to see format errors as you type as it leads you to write code with a more optimal auto-formatted output and it avoids issues like comment directives being moved out of place byprettierand the author not realizing it.
- Removed
plugin:prettier/recommendedfromrecommendedruleset as it introduces breaking changes.
- The
recommendedruleset no longer enables rules that check code formatting (whitespace, indenting, etc.) and that could conflict with Prettier. - There is a new
recommended-with-formattingruleset that has the code formatting rules still enabled, for projects that want to opt out from Prettier and continue checking code formatting with ESLint.
- The React ruleset now correctly references the WordPress ESLint plugin, resolving an error about an unfound rule.
- The
@wordpress/no-unused-vars-before-returnrule has been improved to exempt object destructuring only if destructuring to more than one property. - Stricter JSDoc linting using
eslint-plugin-jsdoc. - Stricter validation enabled for test files only using new
test-e2eandtest-unitrulesets.
- New Rule:
@wordpress/no-unguarded-get-range-at - Enable
wpglobal by default in therecommendedconfig. - New ruleset
test-e2eadded for end-to-end tests validation. - New ruleset
test-unitadded for unit tests validation.
- Remove
@wordpress/dependency-groupand@wordpress/gutenberg-phaserules from thecustomandrecommendedconfigs and leave them as opt-in features.
@wordpress/no-unused-vars-before-returnnow supports anexcludePatternoption to exempt function calls by name.
- The recommended
reactconfiguration specifies an option to@wordpress/no-unused-vars-before-returnto exempt React hooks usage, by convention of hooks beginning with "use" prefix. - The plugin now uses
eslint-plugin-jsdoc, rather than thevalid-jsdocrule, for more reliable linting of JSDoc blocks.
- Fixed custom regular expression for the
no-restricted-syntaxrule enforcing translate function arguments. #15839. - Fixed arguments checking of
_nxfor theno-restricted-syntaxrule enforcing translate function arguments. #15839. - Fixed false positive with
react-no-unsafe-timeoutwhich would wrongly flag errors when assigningsetTimeoutresult to a variable (for example, in auseEffecthook).
- New Rule:
@wordpress/react-no-unsafe-timeout - Add React Hooks Rules config.
- The bundled
eslint-plugin-jsx-a11ydependency has been updated from requiring^6.0.2to requiring^6.2.1(see new features added in 6.2.0 and 6.1.0). - The bundled
eslint-plugin-reactdependency has been updated from requiring7.7.0to requiring^7.12.4(see new features added in 7.12.0, 7.11.0, 7.10.0, 7.9.0 and 7.8.0).
- The
esnextandrecommendedrulesets now enforceobject-shorthand - The
es5andrecommendedrulesets now enforcearray-callback-return
- New Rule:
@wordpress/no-unused-vars-before-return - New Rule:
@wordpress/dependency-group - New Rule:
@wordpress/valid-sprintf - New Rule:
@wordpress/gutenberg-phase - New Rule:
@wordpress/no-base-control-with-label-without-id
- Initial release.