csslint
csslint copied to clipboard
Add formatter option to add custom formatters using the CLI
I haven't written any tests in case you are not interested in this.
The use case is to provide formatters over npm, instead of maintaining them within CSSLint core.
Usage:
I'm currently trying to throw together a custom reporter (based on jshint-stylish), which is the one used in the SS. If I could publish it to npm, it's release-cycle is not dependent on this.
The format of the formatter
-options is just a path (relative to where csslint
is called) than can be required, and resolves into a formatter.
EDIT: I published the formatter on npm. https://www.npmjs.com/package/csslint-stylish
npm i csslint-stylish
, and then the command in the Screenshot should work to use the formatter from npm. npm link
would make the node call cleaner, but meh
I like this feature. Would be nice to have this merged :)
@frvge @XhmikosR Thoughts on this?
I guess it's OK having such a feature, but we need more people to help with the development.
@XhmikosR what do you mean, "more people"? This thing is really just exposing part of the programmatic API through the CLI. It's missing tests, I know, could probably write them if you want (unsure how you test the CLI itself)
+1