Background: I'm the only front-end developer in my team, but of course not the only one writing front-end code :) Currently I have Grunt.js tasks that compile & lint CoffeeScript->JS and SCSS->CSS. I have pretty "strict" settings on both and if certain rules aren't met Grunt throws an error, which is nice so that I can make sure the whole team writes front-end code the certain way and within certain rules.
We have multiple scss files which will be compiled down to two css files we use in the project, but one of them is the "main.css" used throughout the site. For example, there are few selectors that need to have !important used within them so we can be always sure they have an effect once applied. Also with SASS we include couple plugin related scss which also go into the final main.css, these styles won't pass csslint either and we'd really don't want to start forking their styles.
Currently if I were to allow these few CSSLint errors (!important + few others from the plugin stylesheets) to pass, I'd have to allow using !important etc everywhere in the main.css file, then it'd be easy for other team members to break these CSSLint best practises as well since they do not get any errors now.
What I'd wish is to be able to set per-section based CSSLint rules, or rather "exceptions" to per-file rules. So I could have something like this inside one css file:
/*csslint empty-rules: true, important: true*/
.foo { color: red !important; } // throws an error
.empty-one {} // throws an error
/*csslint exceptions important: false*/
.bar { color: blue !important; } // doesn't throw an error
.empty-two {} // throws an error
/*csslint /exceptions*/
.baz { color: green !important; } // throws an error
.empty-three {} // throws an error
I think this kind of convention would do good for use of CSSLint: Since those CSSLint rules are really good practises, but many times one needs to make couple exceptions meaning they have to turn of the whole rule from CSSLint. This "exception syntax" I propose would allow making of thoughtful exception(s) to a rule.