I'm on Windows and use NotePad++ with a JSLint/JSHint plug-in. I find JSHint more useful, though I think we're stuck w/ the
Use the function form of "use strict"
message. You can DL the plug-in here:
https://sourceforge.net/projects/jslintnpp/
unzip and copy the .dll file into C:\Program Files (x86)\Notepad++\plugins\
In the JSHint options, I've got this:
Code: Select all
addFrameCallback, checkScanner, clock, console, consoleMessage, defaultFont, displayNameForCommodity, EquipmentInfo,
expandDescription, expandMissionText, formatCredits, formatInteger, galaxyNumber, global, guiScreen, isValidFrameCallback,
log, manifest, mission, missionVariables, oolite, player, randomInhabitantsDescription, randomName, removeFrameCallback,
setScreenBackground, setScreenOverlay, Sound, SoundSource, System, system, takeSnapShot, timeAccelerationFactor, Timer,
Vector3D,worldScriptNames, worldScripts
in the "Predefined" options box (there may be more oolite specific ones, I just add them as they come up) and this:
Code: Select all
elision:true, shadow:false, esnext: true, validthis: true, curly: false, maxerr: 1000, asi: true, laxbreak: true, undef: true, unused:true
in the "Additional Options" box. Don't ask me what these do (it was a hit or miss procedure). The only message I get once all the errors are fixed is the one about "use strict". I don't think our version of JS (whatever that is) has it and this message can be ignored.
Given how long it takes to rebuild the cache and launch, this can be a real time-saver in the dev cycle. And if you're loading newly edited functions into the debug console, this is a must, as the console cannot give you line numbers for any errors.
"Better to be thought a fool, boy, than to open your trap and remove all doubt." - Grandma [over time, just "Shut your trap... fool"]
"The only stupid questions are the ones you fail to ask." - Dad
How do I...? Nevermind.