It is based on these instructions for vim, combined with this method to allow piping text into JSLint from the standard input.
2. Download JSLint SpiderMonkey Hack Edition
Get this version of JSLint which has been modified to allow piping code from the standard input. Save it somewhere in your home directory, say
/home/username/bin/js/jslinthack.js. You'll also need to make it executable by typing
chmod +x /home/username/bin/js/jslinthack.js
3. Enable the External Tools plugin in gedit Open gedit and click the Edit menu, then choose Preferences. Click the Plugins tab and tick to enable the Extenal Tools plugin.
4. Set up the JSLint External Tool
/home/username/bin/js/jslinthack.js. Set Input to Current Document and set Output to Insert in Output Panel (you'll need to have the Bottom Panel enabled in gedit's View menu).