public
Created

JSHINT Node.js app and rules

  • Download Gist
JSHINT Node.js app
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
var express = require('express')
var app = express.createServer();
var JSHINT = require('jshint').JSHINT;
 
app.use(express.bodyParser());
 
app.get('/', function(req, res){
res.send('hello world');
});
 
app.post('/', function(req, res){
results = JSHINT(req.body.doc, {
eqeqeq: true,
forin: true,
immed: true,
newcap: true,
noempty: true,
undef: true,
strict: true,
white: true
});
res.send(JSHINT.data());
});
 
 
app.listen(8081);

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.