diff --git a/lib/rules/property-sort-order.js b/lib/rules/property-sort-order.js index adbecbf2..854d2025 100644 --- a/lib/rules/property-sort-order.js +++ b/lib/rules/property-sort-order.js @@ -104,18 +104,20 @@ module.exports = { if (block) { block.forEach('declaration', function (dec) { - var prop = dec.first('property'), - name = prop.first('ident'); - - if (name) { - if (parser.options['ignore-custom-properties']) { - if (propertyCheckList.indexOf(name.content) !== -1) { + var prop = dec.first('property') || dec.first('customProperty'); + if (prop) { + var name = prop.first('ident'); + + if (name) { + if (parser.options['ignore-custom-properties']) { + if (propertyCheckList.indexOf(name.content) !== -1) { + properties[name.content] = prop; + } + } + else { properties[name.content] = prop; } } - else { - properties[name.content] = prop; - } } });