csslint icon indicating copy to clipboard operation
csslint copied to clipboard

Add formatter option to add custom formatters using the CLI

Open SimenB opened this issue 9 years ago • 5 comments

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: image

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

SimenB avatar Apr 28 '15 22:04 SimenB

I like this feature. Would be nice to have this merged :)

ideadapt avatar Feb 12 '16 14:02 ideadapt

@frvge @XhmikosR Thoughts on this?

SimenB avatar Mar 01 '16 06:03 SimenB

I guess it's OK having such a feature, but we need more people to help with the development.

XhmikosR avatar Apr 08 '16 20:04 XhmikosR

@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)

SimenB avatar Jul 28 '16 08:07 SimenB

+1

mbejda avatar Sep 21 '16 00:09 mbejda