Sayth wrote:
has anyone had much experience using JavaScript and jslint with geany? I was looking at the scintilla release notes and couldn't find much mention of JavaScript except for the may 27 release bug fix of JavaScript with nested php, and a note in the December 9 release that coffeescript support was added.
I can probably add jslint to the build commands.
SWMBO has gone off somewhere and my glass is sadly empty, so:
Yes, you can add it to the build commands. Here's what I did, but note that I'm using JavaScript Lint (jsl)[1] not jslint[2] so you'll need to adjust as necessary.
Just open Geany, and make sure that you have no project open. This will ensure that your build commands are common to the filetype, not specific to whatever project you are running.
Then set your build commands, per the manual[3], taking note of the possible substitutions. For jsl, I set the first command label as Lint and the command string as:
jsl -conf ~/jsl.conf -process %f
where ~/jsl.conf has my JavaScript Lint configuration (where I turn off the nagging I really don't need!)
While you're at it, you might as well add your favourite minifier, e.g. YUICompressor[4] or whatever.
What I end up with is the following lines in my ~/.config/geany/filedefs/filetypes.javascript file:
[build-menu] FT_00_LB=Lint FT_00_CM=jsl -conf ~/jsl.conf -process %f FT_00_WD=%d FT_01_LB=Minify FT_01_CM=yuimin %f -o %e.min.js FT_01_WD=%d
(yuimin is a simple bash wrapper around YUICompressor)
This means I can bang away at some JS, hit F8 to get a serious lint nagging, and F9 to minify to the_file_name.min.js
cheers and bleary xmas, Ross
PS: i checked out jsl and jslint, and for some reason jslint pissed me off so I settled on jsl instead (probably because I could tell it what not to nag me about); just my AUD0.02 for what little that's worth.
[1] http://www.javascriptlint.com/ [2] http://www.jslint.com/ [3] http://www.geany.org/manual/current/index.html#build-menu [4] http://developer.yahoo.com/yui/compressor/