Permalink
Browse files

Fix lint errors, add .jsl.conf

  • Loading branch information...
1 parent 6467a89 commit ea0e051e49e01ed4f25d65c5756474ab8f2ad212 @agnoster committed Oct 5, 2012
Showing with 8 additions and 4 deletions.
  1. +4 −0 .jsl.conf
  2. +1 −1 bin/literapi
  3. +2 −2 lib/compilers/vows.js
  4. +1 −1 test/server.js
View
@@ -0,0 +1,4 @@
+-missing_semicolon # missing semicolon
+-missing_break_for_last_case # missing break statement for last case in switch
+-ambiguous_newline # unexpected end of line; it is ambiguous whether these lines are part of the same statement
+-ambiguous_nested_stmt # block statements containing block statements should use curly braces to resolve ambiguity
View
@@ -48,7 +48,7 @@ while (params[0] && params[0][0] && params[0][0] == '-') { // option flag
options.delay = options.delay || 25
-if (options.serial == false) {
+if (!options.serial) {
console.log("Unfortunately, due to the ways vows work, tests *must* be run serially for now.")
options.serial = true
}
@@ -50,7 +50,7 @@ vowsCompiler.prototype.substitute = function(string, json) {
}
if (json) {
var match;
- if (match = captureRE.exec(string)) {
+ if ((match = captureRE.exec(string))) {
console.log("WARNING: Possible unrecognized capture: " + match[0])
console.log(" -> " + string)
}
@@ -100,7 +100,7 @@ vowsCompiler.prototype.matchers = function (batch, params) {
batch[key + ": " + headers[key]] = function(key) {
return function(error, result) {
var pattern, header = self.substitute(headers[key])
- if (pattern = self.headerCapture(header)) {
+ if ((pattern = self.headerCapture(header))) {
assert.ok(result.headers[key], "Header should exist, but doesn't")
var match = pattern.regex.exec(result.headers[key])
assert.ok(match, "Header did not match pattern")
View
@@ -60,7 +60,7 @@ router.get(/\/tasks\/(.+)/, function (req, res) {
router.post('/tasks/', function (req, res) {
var task = req.body
if (!task.name) return res.json(422, { message: "Task must contain a name" })
- res.json(201, tasks.insert(task))
+ return res.json(201, tasks.insert(task))
})
router.put(/\/tasks\/(\w+)/, function (req, res) {
var id = req.params[0]

0 comments on commit ea0e051

Please sign in to comment.