Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update JSLint to 2014-07-08 #10

Merged
merged 3 commits into from
Jul 10, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
14 changes: 12 additions & 2 deletions lib/jslint.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// jslint.js
// 2014-04-21
// 2014-07-08

// Copyright (c) 2002 Douglas Crockford (www.JSLint.com)

Expand Down Expand Up @@ -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') {
Expand Down Expand Up @@ -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');
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -4272,7 +4282,7 @@ klass: do {

itself.jslint = itself;

itself.edition = '2014-04-08';
itself.edition = '2014-07-08';

return itself;
}());
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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"
Expand All @@ -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"
Expand Down