SimenB / csslint-stylish

Stylish reporter for CSSLint
MIT License
1 stars 3 forks source link

v0.0.2 grunt usage issue #1

Open fcaraujo opened 9 years ago

fcaraujo commented 9 years ago

I just tried to use with the following version:

$ grunt --version
grunt-cli v0.1.13
grunt v0.4.5
$ node --version
v0.10.36

My grunt config (with or without dest comment):

csslint: {
    options: {
        csslintrc: '.csslintrc'
        , formatters: [
            {
                id: require('csslint-stylish')
                //, dest: 'deploy/report/csslint_stylish.xml'
            }
        ]
    }
    , all: {
        src: watchFiles.clientCSS
    }
}

But nothing seems to happen, the output (in terminal) is the same. Thanks!

SimenB commented 9 years ago

Hmm, I didn't really think that one through. The grunt-plugin only supports writing to file...

Could you add this to node_modules/grunt-contrib-csslint/tasks/csslint.js to check if it works? I currently have no projects using Grunt on my machine...

https://github.com/SimenB/grunt-contrib-csslint/commit/25544eecab5f5676c95a6c3a4385980a3c00f54a

You can also set the option useOnlyBuiltInFormatter to true to skip the normal printing

fcaraujo commented 9 years ago

Ok, first of all the project was using v0.3, I updated (v0.5) and put the diff.

No formatters (or no dest in csslint-stylish): screenshot 2015-09-18 11 00 43

With csslint-stylish and no dest: screenshot 2015-09-18 11 01 07

And using useOnlyBuiltInFormatter: true: screenshot 2015-09-18 11 01 52


A suggestion: I guess the expected behaviour is, if you set a formatter, it's replaces the first one (with or without dest), independently another param, like useOnlyBuiltInFormatter (inspired by jshint-stylish).

Ps.: wasn't strange using useOnlyBuiltInFormatter: true results No violations?

fcaraujo commented 9 years ago

And here a success case:

No formatter (or dest): screenshot 2015-09-18 11 09 46

With stylish (no dest): screenshot 2015-09-18 11 10 14

And with useOnlyBuiltInFormatter: true: screenshot 2015-09-18 11 17 29


Ps.: I've got some "undefined" with no reason, some idea?

And another suggestion: Inspired on jshint-stylish, it'd be nice results a green check with "no problems" and without ">> x files lint free."?

Thanks!