Skip to content

Commit a3958f1

Browse files
committed
chore: updates WPCS to version 3.3.0
Updates the WordPress Coding Standards (WPCS) dependency to the latest version, v3.3.0. This upgrade incorporates new coding standards rules and fixes, ensuring code quality and consistency across the project. It also excludes additional directories from code sniffing to improve performance and reduce irrelevant findings.
1 parent e8d2f42 commit a3958f1

File tree

3 files changed

+22
-17
lines changed

3 files changed

+22
-17
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"phpro/grumphp-shim": "v2.17.0",
1111
"squizlabs/php_codesniffer": "^3.5",
1212
"vimeo/psalm": "5.26.1",
13-
"wp-coding-standards/wpcs": "3.2.0"
13+
"wp-coding-standards/wpcs": "3.3.0"
1414
},
1515
"scripts": {
1616
"cs": [

composer.lock

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

phpcs.xml.dist

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@
1111
<!-- Scan all files in directory -->
1212
<file>.</file>
1313

14-
<!-- Exclude the Composer Vendor directory. -->
14+
<!-- Exclude directories -->
1515
<exclude-pattern>src/</exclude-pattern>
1616
<exclude-pattern>vendor/</exclude-pattern>
1717
<exclude-pattern>dist/</exclude-pattern>
18+
<exclude-pattern>config/</exclude-pattern>
19+
<exclude-pattern>node_modules/</exclude-pattern>
1820

1921
<rule ref="WordPress-Extra">
2022
<!-- Exclude as we use a custom autoloader. -->
@@ -25,9 +27,11 @@
2527

2628
<!-- Exclude as we use the short array syntax over the long one. -->
2729
<exclude name="Generic.Arrays.DisallowShortArraySyntax"/>
30+
<exclude name="Universal.Arrays.DisallowShortArraySyntax"/>
2831

29-
<!-- Allow to use short ternary operators since they are very usefull. -->
32+
<!-- Allow to use short ternary operators since they are very useful. -->
3033
<exclude name="WordPress.PHP.DisallowShortTernary.Found"/>
34+
<exclude name="Universal.Operators.DisallowShortTernary.Found"/>
3135
</rule>
3236

3337
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
@@ -44,15 +48,13 @@
4448
<!-- Set ini. -->
4549
<ini name="memory_limit" value="512M"/>
4650
<ini name="max_execution_time" value="-1"/>
47-
<rule ref="PHPCompatibility"/>
4851

4952
<rule ref="WordPress.Security.EscapeOutput">
5053
<properties>
5154
<property name="customAutoEscapedFunctions" type="array">
52-
<element value="bea_get_attachment_image" />
55+
<element value="bea_get_attachment_image"/>
5356
<element value="get_the_icon"/>
5457
<element value="get_the_image"/>
55-
<element value="get_the_image"/>
5658
<element value="get_the_link"/>
5759
<element value="get_acf_link"/>
5860
<element value="get_share_link"/>
@@ -63,4 +65,7 @@
6365
</property>
6466
</properties>
6567
</rule>
68+
69+
<rule ref="PHPCompatibilityWP"/>
70+
<config name="testVersion" value="8.3-"/>
6671
</ruleset>

0 commit comments

Comments
 (0)