diff --git a/README.md b/README.md index cdb8129..b2a102e 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ How is this package different from other JSLint runners? -- Contains a copy of the latest (2014-04-21) [JSLint](https://github.com/douglascrockford/JSLint/blob/master/jslint.js) by [Douglas Crockford](http://www.crockford.com/) +- Contains a copy of the latest (2014-07-08) [JSLint](https://github.com/douglascrockford/JSLint/blob/master/jslint.js) by [Douglas Crockford](http://www.crockford.com/) - Compatible with [JSHint reporters](https://www.npmjs.org/search?q=jshint%20reporter) diff --git a/lib/jslint.js b/lib/jslint.js index 7eb0cba..0c6a943 100644 --- a/lib/jslint.js +++ b/lib/jslint.js @@ -1,5 +1,5 @@ // jslint.js -// 2014-04-21 +// 2014-07-08 // Copyright (c) 2002 Douglas Crockford (www.JSLint.com) @@ -2183,6 +2183,8 @@ klass: do { if (s === '=') { master.init = true; } + } else if (that.reserved) { + that.warn('expected_identifier_a_reserved'); } } else if (that.id === '.' || that.id === '[') { if (!that.first || that.first.string === 'arguments') { @@ -3008,6 +3010,8 @@ klass: do { left.warn('write_is_wrong'); } else if (!option.stupid && syx.test(name)) { token.warn('sync_a'); + } else if (left && left.id === '{') { + that.warn('unexpected_a'); } if (!option.evil && (name === 'eval' || name === 'execScript')) { next_token.warn('evil'); @@ -3041,6 +3045,9 @@ klass: do { tally_property(e.string); break; } + if (left && (left.id === '{' || (left.id === '[' && left.arity === 'prefix'))) { + that.warn('unexpected_a'); + } step_out(']', that); no_space(prev_token, token); that.first = left; @@ -3118,6 +3125,9 @@ klass: do { for (;;) { edge(); id = identifier(); + if (token.reserved) { + token.warn('expected_identifier_a_reserved'); + } define('parameter', token); parameters.push(id); token.init = true; @@ -4272,7 +4282,7 @@ klass: do { itself.jslint = itself; - itself.edition = '2014-04-08'; + itself.edition = '2014-07-08'; return itself; }()); diff --git a/package.json b/package.json index 188e69c..beccde9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gulp-jslint-simple", - "version": "0.2.0", + "version": "0.2.1", "description": "Run JSLint analysis", "license": "MIT", "main": "index.js", @@ -25,6 +25,7 @@ "node": ">=0.8.0" }, "scripts": { + "clobber": "rimraf node_modules npm-debug.log", "lint": "gulp lint", "start": "gulp watch", "test": "gulp test" @@ -35,7 +36,7 @@ "homepage": "https://github.com/pandell/gulp-jslint-simple", "readmeFilename": "README.md", "dependencies": { - "chalk": "^0.4", + "chalk": "^0.5", "gulp-util": "^2.2", "through2": "^0.5", "xtend": "^3.0"