Skip to content

Releases: wearerequired/coding-standards

6.0.0

09 Feb 06:49
6.0.0
9ee9e8f
Compare
Choose a tag to compare

Changed

  • PHP: Update wp-coding-standards/wpcs from 2.3.0 to 3.0.1.
    Announcement: https://make.wordpress.org/core/2023/08/21/wordpresscs-3-0-0-is-now-available/
  • PHP: Update slevomat/coding-standard from 8.8.0 to 8.14.1.
  • PHP: Update sirbrillig/phpcs-variable-analysis from 2.11.10 to 2.11.17.
  • JS: Increase supported Node version to v20.
    Migration guide: Make sure to replace the version in .nvmrc with 20.
  • JS: Increase minimum peer dependency of @wordpress/eslint-plugin from 13 to 17.
  • JS: Increase minimum peer dependency of prettier from 2.6 to 3.0.
    Migration guide: Make sure to update the npm alias for prettier in package.json to use 3.0.3.

Full Changelog: 5.0.0...6.0.0

5.0.0

27 Jan 14:08
5.0.0
fdd4baa
Compare
Choose a tag to compare

Changed

  • PHP: Remove minimum_supported_wp_version and testVersion.
    Migration guide: Add the following to the phpcs.xml.dist file to restore previous behaviour.
    <!-- The minimum supported WordPress version for all sniffs which use it. -->
    <config name="minimum_supported_wp_version" value="5.3"/>
    <!-- The minimum PHP requirement. -->
    <config name="testVersion" value="7.4-"/>
  • PHP: Introduce Required-Strict ruleset for stricter rules.
  • PHP: Update slevomat/coding-standard from 8.6.4 to 8.8.0.
  • PHP: Update sirbrillig/phpcs-variable-analysis from 2.11.9 to 2.11.10.

Full Changelog: 4.0.0...5.0.0

4.0.0

08 Dec 21:44
4.0.0
21d0cc9
Compare
Choose a tag to compare

Changed

  • JS: Increase minimum peer dependency of @wordpress/eslint-plugin from 10 to 13.
  • JS: Increase minimum peer dependency of prettier to 2.6.
  • CSS: Increase minimum peer dependency of @wordpress/stylelint-config to 21.
  • PHP: Increase minimum PHP requirement to 7.2.
  • PHP: Update slevomat/coding-standard from 7.0.18 to 8.6.4.
  • PHP: Update phpcompatibility/phpcompatibility-wp from 2.1.3 to 2.1.4.
  • PHP: Update sirbrillig/phpcs-variable-analysis from 2.11.2 to 2.11.9.

3.0.0

11 Feb 10:25
3.0.0
3f81e0e
Compare
Choose a tag to compare

Added

  • CSS: Add SCSS preset for stylelint-config.

Changed

  • PHP: Update slevomat/coding-standard from 7.0.12 to 7.0.18.
  • PHP: Update phpcompatibility/phpcompatibility-wp from 2.1.1 to 2.1.3.
  • PHP: Allow to install on PHP 8.
  • JS: Increase minimum peer dependency of eslint from 7 to 8.
  • JS: Increase minimum peer dependency of @wordpress/eslint-plugin from 8/9 to 10.
  • CSS: Increase minimum peer dependency of stylelint from 13 to 14.
  • CSS: Increase minimum peer dependency of @wordpress/stylelint-config from 19 to 20.

Fixed

  • CSS: Correctly set rules for function-url-quotes and at-rule-no-unknown.

2.2.0

15 Jul 12:05
2.2.0
18c00c0
Compare
Choose a tag to compare

Changed

  • PHP: Update slevomat/coding-standard from 6.4.1 to 7.0.12.
  • PHP: Update sirbrillig/phpcs-variable-analysis from 2.11.0 to 2.11.2.

2.1.0

13 Apr 16:30
2.1.0
Compare
Choose a tag to compare

Changed

  • JS: Allow @wordpress/eslint-plugin v9 as dependency.

2.0.0

26 Feb 16:37
2.0.0
Compare
Choose a tag to compare

Changed

  • PHP: Update sirbrillig/phpcs-variable-analysis from 2.10.0 to 2.10.2.
  • PHP: Increase testVersion for PHP Compatibility check to 7.4.
  • PHP: Increase minimum_supported_wp_version to 5.3.
  • CSS: Replace stylelint-config-wordpress with @wordpress/stylelint-config.
  • JS: Allow @wordpress/eslint-plugin v8 as dependency, remove v6.

Added

  • PHP Rule SlevomatCodingStandard.TypeHints.ReturnTypeHint: Require type hints for return values.
  • PHP Rule SlevomatCodingStandard.TypeHints.ParameterTypeHint: Require type hints for parameters.
  • PHP Rule SlevomatCodingStandard.TypeHints.UselessConstantTypeHint: Disallow useless @var annotations.
  • PHP Rule SlevomatCodingStandard.Classes.ClassConstantVisibility: Require declaring the visibility of class constants.
  • PHP Rule SlevomatCodingStandard.Functions.RequireArrowFunction: Require short closures/arrow functions if possible.
  • PHP Rule SlevomatCodingStandard.Functions.ArrowFunctionDeclaration: Require specific style of arrow functions.

2.0.0-beta.0

15 Dec 11:07
2.0.0-beta.0
Compare
Choose a tag to compare
2.0.0-beta.0 Pre-release
Pre-release

Changed

  • Update sirbrillig/phpcs-variable-analysis from 2.10.0 to 2.10.1.
  • Increase testVersion for PHP Compatibility check to 7.4.
  • Increase minimum_supported_wp_version to 5.3.

Added

  • PHP Rule SlevomatCodingStandard.TypeHints.ReturnTypeHint: Require type hints for return values.
  • PHP Rule SlevomatCodingStandard.TypeHints.ParameterTypeHint: Require type hints for parameters.
  • PHP Rule SlevomatCodingStandard.TypeHints.UselessConstantTypeHint: Disallow useless @var annotations.
  • PHP Rule SlevomatCodingStandard.Classes.ClassConstantVisibility: Require declaring the visibility of class constants.
  • PHP Rule SlevomatCodingStandard.Functions.RequireArrowFunction: Require short closures/arrow functions if possible.
  • PHP Rule SlevomatCodingStandard.Functions.ArrowFunctionDeclaration: Require specific style of arrow functions.

1.6.0

12 Dec 17:45
1.6.0
Compare
Choose a tag to compare

Changed

  • Update slevomat/coding-standard from 6.3.8 to 6.4.1.
  • Update sirbrillig/phpcs-variable-analysis from 2.8.2 to 2.10.0 for PHP 7.4 support.
  • PHP: Add @subpackage to list of disallowed annotations.
  • CSS: Use renamed declaration-property-unit-allowed-list rule to avoid a deprecation warning. [#103]

Upgrade

composer global update wearerequired/coding-standards --with-all-dependencies

1.5.1

15 Jun 20:48
1.5.1
Compare
Choose a tag to compare

Changed

  • Update sirbrillig/phpcs-variable-analysis from 2.8.1 to 2.8.2.
  • Update slevomat/coding-standard from 6.3.7 to 6.3.8.
  • CSS: Always require quotes in url() unless empty.
  • CSS: Allow at-rules used by postcss-mixins.
  • Support eslint peer dependency up to 7.x.
  • Support @wordpress/eslint-plugin peer dependency up to 7.x.