interactivestrategies/wordpress-cs
Composer 安装命令:
composer require interactivestrategies/wordpress-cs
包简介
Custom Interactive Strategies code sniffer ruleset for WordPress projects.
关键字:
README 文档
README
This package defines customized Code Sniffer rules for WordPress projects. It is primarily based on WordPress , with some sniffs excluded and others downgraded to warnings. Some additional sniffs not provided have also been added.
Installing the ruleset
Use Composer to install the ruleset and its dependencies as a package:
composer require --dev interactivestrategies/wordpress-cs
Making the IS rules the default for your project
Add a phpcs.xml.dist file in your project with content like this(make sure to replace the path with the correct theme file name):
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="IS WordPress Standards">
<rule ref="ISWordPress"/>
<file>web/app/themes/emperor</file>
<exclude-pattern>*.twig</exclude-pattern>
<exclude-pattern type="relative">^*/.*\.twig$</exclude-pattern>
</ruleset>
The tag(s) define what paths the rules should be applied to/within.
统计信息
- 总下载量: 97
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2025-05-02