Linter-csslint not working


#1

Hello,

I’m new to Atom, so sorry if this is something obvious, but I did some searching and couldn’t find anything. I just installed Atom, and the only other packages I’ve installed are linter, linter-javac, linter-jshint, and linter-csslint. The other linter packages work fine, but the csslint is unresponsive. I’m not sure if I need to do any more configuration, but I installed it like the rest of the packages. I went into command line and typed “apm install linter-csslint”, and then opened Atom, and I could see the packaged installed.

I then went to CSS Lint, to find a an example and created a new file “testcss.css” and entered the following:

.foo h1 {
font-size: 110%
}

.test {

}

When I move the cursor around the lines, I don’t get any kind of error message from the csslint. I’m using a Windows 7 machine. Any help would be appreciated.

Thanks.


#2

Shouldn’t you write invalid css for the linter messages to pop up ;)?


#3

Invalid CSS only? Nope. Linters are a superset of code style checkers, static analysis tools and syntax validators. So linters don’t necessarily detect code that is not even parsable (although it’d better do at least that), but also detect more subtle flaws like useless code, inconsistent indentation and incorrect use of certain language features.

That behavior is weird though. Did you install linter alongside? linter-csslint is just a provider for that one. It does work for me when both are installed:


#4

D_side, yes I have linter installed, I also have linter-javac and linter-jshint installed and they work fine. Do you mind if I ask you what your config.cson looks like? Do I need to do any extra configuration for csslint? Do I need to install a css autocomplete or snippet, or syntax for Atom to understand css correctly?


#5

Quick update, I was searching around the packages and found CSSLint, and thought I would try it. I used the same example as above, this package works. So question is do I use CSSLint or linter-csslint? Would still like to know why linter-csslint isn’t working for me.


#6

Uhm… no, I literally just installed linter and then linter-csslint, then restarted Atom (no idea why I had to do it) and it just worked. May be related to the fact that I’m on Linux (Xubuntu 14.04), but I can’t confirm that’s the case.

Package-related settings in config.cson are, well, empty:

"linter-csslint": {}

I’ll check if the issue persists on Windows Server 2012 R2 (and please don’t look at me like that!).


#7

Yep, it appears to be broken on all Windows versions I could get my hands on:

  • Windows 7
  • Windows Server 2012 R2 (sorta 8.1)

Latest Atom (v0.184), latest linter and linter-csslint.


#8

Same – it is inactive for me on Windows 7.


#9

I confirm: still quietly does nothing on windows 10. I’m using linter-csslint version 1.3.3.


#10

Have you reported an Issue to the maintainers of the package? The Atom FAQ has information on how to contact the maintainers of any Atom community package or theme.


#11

Yes, I can confirm that it still does not work on Windows 10. There is an issue on the repo that suggests using stylelint / linter-stylelint instead because it “is a much better CSS (and more!) linter”.

Just thought I’d post this for anyone that encounters the same problem.