# This rule is taken from https://github.com/stubbornella/csslint/tree/master/src/rules # # # Copyright (c) 2011 Nicole Sullivan and Nicholas C. Zakas. All rights reserved. # TODO: Paste the CSSLint LICENSE here. # # # /* # * Rule: Style rules without any properties defined should be removed. # */ # /*global CSSLint*/ # CSSLint.addRule({ # # //rule information # id: "empty-rules", # name: "Disallow empty rules", # desc: "Rules without any properties specified should be removed.", # browsers: "All", # # //initialization # init: function(parser, reporter){ # var rule = this, # count = 0; # # parser.addListener("startrule", function(){ # count=0; # }); # # parser.addListener("property", function(){ # count++; # }); # # parser.addListener("endrule", function(event){ # var selectors = event.selectors; # if (count === 0){ # reporter.report("Rule is empty.", selectors[0].line, selectors[0].col, rule); # } # }); # } # # });