KevinH
KevinH

Reputation: 1144

Grunt recess - how to check less

I want to check a less file for valid code. I used the grunt plugin "grunt-recess" and it works, but not as I want. This ist the part in Gruntfile.js:

recess: {
    dist: {
        src: [
            "less/base.less"
        ]
    }
}

If I write the following in my less file

.test {
    margin-left: 2px;
    margin-top: 2px


}

... it complains about the incorrect property order. But why it doesn't complain about the the missing ; and the blank lines? Maybe it's very easy, but not for me. It's the first time I'm using grunt and I'm not finding a solution (I used google a lot). I also tried "lesslint", but it didn't work either.

Thanks for your help!

Upvotes: 0

Views: 189

Answers (1)

KevinH
KevinH

Reputation: 1144

Correct answer but unfortunately no solution:

"Well, in short: recess does not really lints Less code but instead it actually checks the CSS compiled from it. Hence it doesn't complain of missing ; and blank lines simply because compiled CSS do not have those. (And answering your next question: No, there're no "real" Less linting tools, all existing tools declaring themselves as such actually lint compiled CSS result instead)." - seven-phases-max

Upvotes: 1

Related Questions