Skip to content

Latest commit

 

History

History
526 lines (295 loc) · 24.7 KB

CHANGELOG.md

File metadata and controls

526 lines (295 loc) · 24.7 KB

Unreleased

21.4.0 (2024-10-30)

21.3.0 (2024-10-16)

21.2.0 (2024-10-03)

21.1.0 (2024-09-19)

21.0.0 (2024-09-05)

Breaking Changes

20.3.0 (2024-08-21)

20.2.0 (2024-08-07)

20.1.0 (2024-07-24)

20.0.0 (2024-07-10)

Breaking Changes

19.2.0 (2024-06-26)

19.1.0 (2024-06-15)

19.0.0 (2024-05-31)

Breaking Changes

  • @wordpress/is-gutenberg-plugin rule has been replaced by @wordpress/wp-global-usage (#61486).
  • @wordpress/wp-process-env rule has been added and included in the recommended configurations (#61486).
  • @wordpress/gutenberg-phase rule 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.

18.1.0 (2024-05-16)

Internal

  • Replaced classnames package with the faster and smaller clsx package (#61138).

18.0.0 (2024-05-02)

Breaking Changes

  • Enable curly eslint rule when using prettier (#61204).

17.13.0 (2024-04-19)

17.12.0 (2024-04-03)

17.11.0 (2024-03-21)

17.10.0 (2024-03-06)

17.9.0 (2024-02-21)

17.8.0 (2024-02-09)

17.7.0 (2024-01-24)

17.6.0 (2024-01-10)

17.5.0 (2023-12-13)

17.4.0 (2023-11-29)

17.3.0 (2023-11-16)

17.2.0 (2023-11-02)

17.1.0 (2023-10-18)

17.0.0 (2023-10-05)

Breaking Changes

  • Change the required major version of Prettier from v2 to v3 (#54775).

16.0.0 (2023-09-20)

Breaking Changes

  • The bundled @typescript-eslint/parser and @typescript-eslint/eslint-plugin dependencies has been updated from requiring ^5.62.0 to requiring ^6.4.1 (#53975):
    • Removes the deprecated @typescript-eslint/no-duplicate-imports rule in favor of import/no-duplicates.

Enhancements

  • Added a new test-playwright ruleset using eslint-plugin-playwright.
  • The bundled eslint-plugin-prettier dependency has been updated from requiring ^3.3.0 to requiring ^5.0.0 (#54539).

15.1.0 (2023-08-31)

15.0.0 (2023-08-16)

Breaking Changes

  • The bundled eslint-plugin-jsdoc dependency has been updated from requiring ^39.6.9 to requiring ^46.4.6 (#53629):
    • Removes jsdoc/newline-after-description rule in favor of jsdoc/tag-lines with option startLines: 0 for "never" and startLines: 1 for "always". Defaults now to startLines: null.
    • Removes dropEndLines: true from jsdoc/tag-lines in favor of option endLines: 0.
    • Drops jsdoc/tag-lines rule's noEndLines: true in favor of applyToEndTag: false.
    • Disables the newly introduced jsdoc/no-defaults rule.

Enhancements

  • Support Typescript 5 and 5.1 by updating both @typescript-eslint/parser and @typescript-eslint/eslint-plugin to version ^5.62.0. (#52621).

14.12.0 (2023-08-10)

14.11.0 (2023-07-20)

14.10.0 (2023-07-05)

14.9.0 (2023-06-23)

14.8.0 (2023-06-07)

14.7.0 (2023-05-24)

14.6.0 (2023-05-10)

Enhancements

  • Validate dependencies in useSelect and useSuspenseSelect hooks. (#49900).

14.5.0 (2023-04-26)

14.4.0 (2023-04-12)

14.3.0 (2023-03-29)

14.2.0 (2023-03-15)

14.1.0 (2023-03-01)

14.0.0 (2023-02-15)

Breaking Changes

  • Increase the severity of the rule jsdoc/check-line-alignment from warn to error. (#47878).

13.10.0 (2023-02-01)

  • The bundled eslint-plugin-jsdoc dependency has been updated from requiring ^37.0.3 to requiring ^39.6.9

Enhancements

  • Bump eslint-plugin-jest version to 27.2.1.

13.9.0 (2023-01-11)

13.8.0 (2023-01-02)

13.7.0 (2022-12-14)

13.6.0 (2022-11-16)

13.5.0 (2022-11-02)

13.4.0 (2022-10-19)

13.3.0 (2022-10-05)

13.2.0 (2022-09-21)

13.0.0 (2022-08-24)

Breaking Changes

  • 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 recommended and recommended-with-formatting presets when Jest package is installed (#43272).

12.8.0 (2022-07-27)

Internal

  • Remove deprecated rules no-negated-in-lhs replaced with no-unsafe-negation, and jsx-a11y/label-has-for replaced with jsx-a11/label-has-associated-control (#42654).

12.6.0 (2022-06-29)

  • Enable no-unused-vars's setting ignoreRestSiblings to allow unused variables when destructuring with rest properties (#41897).

12.2.0 (2022-05-04)

Bug Fixes

  • Fix the recommended preset when Prettier is not installed (#40634).

12.0.0 (2022-04-08)

Breaking Changes

  • Revert the removal of the automatic environment detection of test-unit and test-e2e for the recommended preset. However, They will still be disabled if @playwright/test is installed in the project.

11.0.0 (2022-03-11)

Breaking Changes

  • The integration with Prettier is now optional and gets activated when the prettier package is installed in the project (#39244).

Bug Fixes

  • Replaced no-shadow eslint rule with @typescript-eslint/no-shadow (#38665).

Breaking Changes

  • Remove automatic environment detection of test-unit and test-e2e for the recommended preset. It's now recommended to opt-in to specific preset explicitly.

10.0.0 (2022-01-27)

Breaking Changes

  • The peer dependency constraint for ESLint has been updated from ^6 || ^7 to ^8.
  • The bundled @typescript-eslint/eslint-plugin dependency has been updated from requiring ^4.31.0 to requiring ^5.3.0 (#36283).
  • The bundled @typescript-eslint/parser dependency has been updated from requiring ^4.31.0 to requiring ^5.3.0 (#36283).
  • The bundled eslint-config-prettier dependency has been updated from requiring ^7.1.0 to requiring ^8.3.0 (#36283).
  • The bundled eslint-plugin-jest dependency has been updated from requiring ^24.1.3 to requiring ^25.2.3 (#36283).
  • The bundled eslint-plugin-jsdoc dependency has been updated from requiring ^36.0.8 to requiring ^37.0.3 (#36283).
  • The bundled globals dependency has been updated from requiring ^12.0.0 to requiring ^13.12.0 (#36283).
  • The gutenberg-phase rule has been deprecated and replaced by the is-gutenberg-plugin rule. (#38202)

Enhancements

  • Omit verification for WordPress dependencies in the import statements since they get externalized when used with WordPress (#37639).

Bug Fixes

  • Fix Babel config resolution when a custom ESLint config present (#37406). Warning: it won't recognize the babel.config.json file present in the project until the upstream bug in cosmiconfig is fixed.

9.3.0 (2021-11-15)

Enhancements

  • Replaced deprecated babel-eslint dependency with @babel/eslint-parser (#36244).
  • The bundled eslint-plugin-import dependency has been updated from requiring ^2.23.4 to requiring ^2.25.2 (#36244).

9.2.0 (2021-10-12)

Enhancements

  • The bundled eslint-plugin-jsdoc dependency has been updated from requiring ^34.1.0 to requiring ^36.0.8 (#34338).

Bug Fixes

  • Use Jest related rules only when the jest package is installed (#33120).

9.1.2 (2021-09-09)

Bug Fixes

  • The recommended configuration will now respect type imports in TypeScript files (#34055).

9.1.1 (2021-08-23)

Bug Fixes

  • Include .jsx extension when linting import statements in case TypeScript not present (#33746).

9.1.0 (2021-07-21)

Enhancements

  • Adds JSDoc alignment check (#25300).

9.0.1 (2021-03-19)

Bug Fixes

  • Adds TypeScript as a peer dependency and makes it optional when not installed (#29942).

9.0.0 (2021-03-17)

Breaking Changes

  • Add support and configuration for TypeScript files. #27143

New Features

  • Enabled import/default and import/named rules in the recommended ruleset. #28513
  • Add new rule @wordpress/data-no-store-string-literals to discourage passing string literals to reference data stores (#28726).

8.0.1 (2021-01-28)

Bug Fixes

  • Add missing eslint-plugin-import npm dependency (#28545).

8.0.0 (2021-01-21)

Breaking Changes

  • Increase the minimum Node.js version to 12 (#27934).
  • Enabled import/no-extraneous-dependencies rule in the recommended ruleset.
  • Enabled import/no-unresolved rule in the recommended ruleset.
  • Enabled no-unsafe-wp-apis rule in the recommended ruleset (#27327).
  • The bundled eslint-config-prettier dependency has been updated from requiring ^6.10.1 to requiring ^7.1.0 (#27965).
  • The bundled eslint-plugin-jest dependency has been updated from requiring ^23.8.2 to requiring ^24.1.3 (#27965).

Enhancements

  • The bundled eslint-plugin-jsdoc dependency has been updated from requiring ^30.2.2 to requiring ^30.7.13 (#27965).
  • The bundled eslint-plugin-jsx-a11y dependency has been updated from requiring ^6.2.3 to requiring ^6.4.1 (#27965).
  • The bundled eslint-plugin-prettier dependency has been updated from requiring ^3.1.2 to requiring ^3.3.0 (#27965).
  • The bundled eslint-plugin-react dependency has been updated from requiring ^7.20.0 to requiring ^7.22.0 (#27965).
  • The bundled eslint-plugin-react-hooks dependency has been updated from requiring ^4.0.4 to requiring ^4.2.0 (#27965).

New Features

  • Enable react-hooks/exhaustive-deps rules in the react config in "warn" mode (#24914).

7.4.0 (2020-12-17)

New Features

  • Add no-unsafe-wp-apis rule to discourage usage of unsafe APIs (#27301).

Enhancements

  • The bundled wp-prettier dependency has been upgraded from 2.0.5 to 2.2.1.

Documentation

  • Include a note about the minimum version required for node (10.0.0) and npm (6.9.0).

7.2.1 (2020-09-17)

Bug Fixes

  • Fix TypeError for projects without a local Prettier configuration.

7.2.0 (2020-09-03)

Enhancements

  • The bundled eslint-plugin-jsdoc dependency has been updated from requiring ^26.0.0 to requiring ^30.2.2.

Bug Fixes

  • The recommended configuration will now respect local Prettier configuration. These are merged to the default WordPress configuration.

7.1.0-rc.0 (2020-06-24)

Enhancements

  • Support ESLint ^7 as peer dependency.

7.0.0 (2020-06-15)

Breaking Changes

  • The bundled wp-prettier dependency has been upgraded from 1.19.1 to 2.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-hooks dependency has been updated from requiring ^3.0.0 to requiring ^4.0.4.
  • The bundled eslint-plugin-jsdoc dependency has been updated from requiring ^22.1.0 to requiring ^26.0.0.

Enhancements

  • The bundled eslint-plugin-react dependency has been updated from requiring ^7.19.0 to requiring ^7.20.0.

6.1.0 (2020-05-28)

Bug Fixes

  • @wordpress/dependency-group will now correctly identify issues associated with CommonJS (require) module imports.

6.0.0 (2020-05-14)

Breaking Changes

  • The severity of the rule, jsdoc/no-undefined-types, has been increased from warn to error. In addition, JSX has been added to the default list of defined types.

Enhancements

  • 'AsyncIterableIterator' is now allowed as a valid TypeScript utility type.

5.1.0 (2020-04-30)

Bug Fixes

  • The @wordpress/no-unused-vars-before-return rule will now correctly identify valid usage of a variable as a JSX identifier.
  • Make @wordpress/i18n-text-domain rule less strict by default. When allowedTextDomain option is not provided it allows now skipping text domain or providing any string (#21928).

5.0.1 (2020-04-15)

Bug Fixes

  • Fixes an error caused by missing utils directory from published package (#21609).
  • Added the recommended Prettier config that enforces WordPress coding style guidelines (#21602).

5.0.0 (2020-04-15)

Breaking Changes

  • There is a new i18n ruleset that includes all i18n-related rules and is included in the recommended ruleset.
  • The @wordpress/valid-sprintf rule has been moved from the custom ruleset to the i18n ruleset.
  • The @wordpress/valid-sprintf rule now recognizes mix of ordered and non-ordered placeholders.
  • The bundled eslint-plugin-jest dependency has been updated from requiring ^22.15.1 to requiring ^23.8.2 (#21424).
  • The bundled eslint-plugin-jsdoc dependency has been updated from requiring ^21.0.0 to requiring ^22.1.0 (#21424).
  • The bundled eslint-plugin-react-hooks dependency has been updated from requiring ^1.6.1 to requiring ^3.0.0 (#21424).

New Features

Bug Fixes

  • The @wordpress/valid-sprintf rule now detects usage of sprintf via i18n.sprintf (e.g. when using import * as i18n from '@wordpress/i18n').
  • @wordpress/no-unused-vars-before-return will correctly consider other unused variables after encountering an instance of an excludePattern option exception.

4.1.0 (2020-04-01)

New Features

  • The prefer-const rule included in the recommended and esnext rulesets has been relaxed to allow a let assignment if any of a destructuring assignment are reassigned.

4.0.0 (2020-02-10)

Breaking Changes

  • The recommended ruleset 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-prettier was chosen over options like prettier-eslint because we don't run eslint --fix in 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 with eslint over prettier, so the overhead would be unnecessary. eslint-plugin-prettier was chosen over options like prettier --check because 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 by prettier and the author not realizing it.

3.4.1 (2020-02-04)

Bug Fixes

  • Removed plugin:prettier/recommended from recommended ruleset as it introduces breaking changes.

3.4.0 (2020-02-04)

New Features

  • The recommended ruleset no longer enables rules that check code formatting (whitespace, indenting, etc.) and that could conflict with Prettier.
  • There is a new recommended-with-formatting ruleset that has the code formatting rules still enabled, for projects that want to opt out from Prettier and continue checking code formatting with ESLint.

3.3.0 (2019-12-19)

Bug Fixes

  • The React ruleset now correctly references the WordPress ESLint plugin, resolving an error about an unfound rule.

3.0.0 (2019-08-29)

Breaking Changes

New Features

  • New Rule: @wordpress/no-unguarded-get-range-at
  • Enable wp global by default in the recommended config.
  • New ruleset test-e2e added for end-to-end tests validation.
  • New ruleset test-unit added for unit tests validation.

Enhancements

  • Remove @wordpress/dependency-group and @wordpress/gutenberg-phase rules from the custom and recommended configs and leave them as opt-in features.

2.4.0 (2019-08-05)

New Features

Enhancements

  • The recommended react configuration specifies an option to @wordpress/no-unused-vars-before-return to exempt React hooks usage, by convention of hooks beginning with "use" prefix.
  • The plugin now uses eslint-plugin-jsdoc, rather than the valid-jsdoc rule, for more reliable linting of JSDoc blocks.

2.3.0 (2019-06-12)

Bug Fixes

  • Fixed custom regular expression for the no-restricted-syntax rule enforcing translate function arguments. #15839.
  • Fixed arguments checking of _nx for the no-restricted-syntax rule enforcing translate function arguments. #15839.
  • Fixed false positive with react-no-unsafe-timeout which would wrongly flag errors when assigning setTimeout result to a variable (for example, in a useEffect hook).

2.2.0 (2019-05-21)

New Features

2.1.0 (2019-03-20)

New Features

  • The bundled eslint-plugin-jsx-a11y dependency has been updated from requiring ^6.0.2 to requiring ^6.2.1 (see new features added in 6.2.0 and 6.1.0).
  • The bundled eslint-plugin-react dependency has been updated from requiring 7.7.0 to 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).

2.0.0 (2019-03-06)

Breaking Changes

New Features

1.0.0 (2018-12-12)

New Features

  • Initial release.