Releases: wearerequired/coding-standards
Releases · wearerequired/coding-standards
6.0.0
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
with20
. - 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 forprettier
inpackage.json
to use3.0.3
.
Full Changelog: 5.0.0...6.0.0
5.0.0
Changed
- PHP: Remove
minimum_supported_wp_version
andtestVersion
.
Migration guide: Add the following to thephpcs.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
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
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
andat-rule-no-unknown
.
2.2.0
2.1.0
2.0.0
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
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
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
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.