kallookoo/phpcs-rules

WordPress & WooCommerce 检查器

安装: 9

依赖项: 0

建议: 0

安全: 0

星级: 0

关注者: 1

分支: 0

开放问题: 0

类型:phpcodesniffer-standard

1.0.3 2024-09-14 12:01 UTC

This package is auto-updated.

Last update: 2024-09-14 12:05:27 UTC


README

收集PHP_CodeSniffer检查器,用于WordPress & WooCommerce,排除您的文件。

安装

composer require kallookoo/phpcs-rules

用法

当项目与WooCommerce相关时,使用WooCommerce-Excl设置标准,否则使用WordPress-Excl。

配置文件的示例

<?xml version="1.0"?>
<ruleset name="WordPress and WooCommerce Sniffs">
	<description>My project ruleset.</description>
	<!-- Only use for PHP files -->
	<!-- <arg name="extensions" value="php"/> -->

	<!-- Configure the PHP Compatibility WP version. Uncomment only if customize the version. -->
	<!-- <config name="testVersion" value="7.0-"/> -->

	<!-- Configure the minimum WordPress version -->
	<config name="minimum_supported_wp_version" value="6.0"/>

	<!-- Rules -->

	<!-- Uncomment the required rule below -->
	<!-- <rule ref="WordPress-Excl"/> -->
	<!-- <rule ref="WooCommerce-Excl"/> -->

	<rule ref="WordPress.WP.I18n">
		<properties>
			<!-- Replace the text-domain with the text domain in this project or remove this rule. -->
			<property name="text_domain" type="array" value="text-domain"/>
		</properties>
	</rule>
</ruleset>