Anybody using linter-jscs package?


#1

Hi,

I am currently at the beginning of a rather large project and looking for good JS code checkers. I just found linter-jscs, an atom implementation of jscs. So I installed Linter and linter-jscs - but it doesn’t seem to do anything.

The dev console says “activate linter-jscs”, but no messages whatsoever appear.

Does anybody use this package and can point me to my mistake? I hope this forum is the right place for these kinds of things.

thanks, regards


#2

JSCS requires a config file (.jscsrc or .jscs.json) with rules defined otherwise it doesn’t do anything. Linter will start looking for this file in the project root, and keep going up until it finds one.

If you want to follow google’s style, create a .jscsrc with this:

{ "preset": "google" }

It should then start outputting some errors. See https://github.com/mdevils/node-jscs for the full list of options.


#3

Thanks… I actually had a .jscsrc in place, but replacing that with your minimal example worked.
I then manually started jscs in the terminal with my config and got some errors:

  1. the atom package uses an old version of jscs that does not support all the options listed on their git page
  2. you cannot have a comma after the last entry of the config file

After fixing those, it started working. Seems like if the config file contains anything unusual jscs will just silently throw an exception and stop.

Thank you!