Skip to content

Available Rules

The --fix option on the command line automatically fixes problems reported by rules which have a wrench 🔧 below.
The rules with the following star ⭐ are included in the plugin:css/recommended config and the plugin:css/standard config.
The rules with the following lipstick 💄 are included in the plugin:css/standard config.

Possible Errors

Rule IDDescription
css/no-dupe-propertiesdisallow duplicate properties
css/no-invalid-color-hexdisallow invalid hex colors
css/no-shorthand-property-overridesdisallow shorthand properties that override related longhand properties
css/no-unknown-propertydisallow unknown properties
css/no-unknown-unitdisallow unknown units

Best Practices

Rule IDDescription
css/named-colorenforce named colors🔧
css/no-length-zero-unitdisallow units for zero lengths💄🔧
css/no-useless-color-alphadisallow unnecessary alpha-channel transparency value⭐🔧
css/prefer-reduce-shorthand-property-box-valuesrequire reduction in box values of shorthand property💄🔧

Stylistic Issues

Rule IDDescription
css/color-hex-styleenforce hex color style💄🔧
css/no-number-trailing-zerosdisallow trailing zeros in numbers.💄🔧
css/number-leading-zerorequire or disallow a leading zero for fractional numbers less than 1💄🔧
css/property-casingenforce specific casing for CSS properties💄🔧