简体   繁体   English

wro4j CSS Lint添加自定义规则

[英]wro4j CSS Lint Adding Custom Rules

Our team wants to use the wro4j tool, and we have gotten it setup and able to run the csslint and jslint. 我们的团队希望使用wro4j工具,并且已经对其进行了设置并能够运行csslint和jslint。 We would like to create our own custom CSS rules, but we can't find any documentation on where the csslint rules are stored and how to create our own. 我们想创建自己的自定义CSS规则,但是找不到关于csslint规则的存储位置以及如何创建我们自己的规则的任何文档。

Any help would be greatly appreciated. 任何帮助将不胜感激。

In order to add csslint rules, you should update configuration options section of the maven plugin: 为了添加csslint规则,您应该更新maven插件的配置选项部分:

<plugins>
  <plugin>
    <groupid>ro.isdc.wro4j</groupid>
    <artifactid>wro4j-maven-plugin</artifactid>
    <version>${wro4j.version}</version>
    <executions>
      <execution>
    <goals>
      <goal>csslint</goal>
    </goals>
      </execution>
    </executions>
    <configuration>
      <options>box-model</options>
    </configuration>
  </plugin>
</plugins>

More details are documented here . 更多详细信息在此处记录

Update : The rules are defined by csslint library (version 0.9.10). 更新 :规则由csslint库(版本0.9.10)定义。 All the rules defined in the library can be referred in the configuration section of the maven plugin. 库中定义的所有规则都可以在maven插件的配置部分中引用。 Adding custom rule is not supported out of the box, if you need this feature, feel free to create a feature request . 开箱即用不支持添加自定义规则,如果需要此功能,请随时创建功能请求

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM