causes/scss-lint — pull request #250 by davidtheclark (2014-10-06 04:04:45+00:00)
Title: Added VendorPrefixes linter

Addresses https://github.com/causes/scss-lint/issues/207

I added a linter named VendorPrefixes that will report a lint if a vendor prefix is used in one of the following:
- a property
- a pseudo-element (`::placeholder`)
- a directive (`@keyframes)

Basically, I think all that needs to be done is checking whether the node name starts with `-` or `_`. The [CSS spec](http://www.w3.org/TR/CSS2/syndata.html#vendor-keywords) says that "Keywords and property names beginning with -' or '_' are reserved for vendor-specific extensions. [...] An initial dash or underscore is guaranteed never to be used in a property or keyword by any current or future level of CSS." --- so I think this check, though very simple, should work consistently.

A couple of points that I think could benefit from other input:
- I don't like the wording of the error or the read me --- "Vendor prefixes should not be used." Can anybody think of a better way to phrase that?
- It might be worth adding a configuration option to ignore certain names, in case, say, Autoprefixer isn't working for a property and you feel you have to add the vendor prefixes yourself.

(Finally: This is pretty much the first Ruby I've written, so please point out if I've done it wrong. The program seems to me to be set up very clearly, so I was able to get this new linter working with the tests just by imitating existing code. )