Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Version 2.4.4

  • Loading branch information...
commit 693dd40a25165a596f79bcec187b40c6a2beaa0b 1 parent 121be49
@valueof valueof authored
Showing with 58 additions and 58 deletions.
  1. +33 −32 dist/jshint-rhino.js
  2. +24 −25 dist/jshint.js
  3. +1 −1  package.json
View
65 dist/jshint-rhino.js
@@ -1,6 +1,6 @@
#!/usr/bin/env rhino
var window = {};
-// 2.4.3
+// 2.4.4
var JSHINT;
if (typeof window === 'undefined') window = {};
(function () {
@@ -52734,9 +52734,7 @@ function assert(expression) {
}).call(this);
-},{}],"jshint":[function(require,module,exports){
-module.exports=require('nr+AlQ');
-},{}],"nr+AlQ":[function(require,module,exports){
+},{}],"lGT9nC":[function(require,module,exports){
/*!
* JSHint, by JSHint Community.
*
@@ -54316,13 +54314,6 @@ var JSHINT = (function () {
return val;
}
- // Display an info message about reserved words as properties
- // and ES5 but do it only once.
- if (prop && !api.getCache("displayed:I002")) {
- api.setCache("displayed:I002", true);
- warning("I002");
- }
-
warning("W024", state.tokens.curr, state.tokens.curr.id);
return val;
}
@@ -55324,7 +55315,6 @@ var JSHINT = (function () {
i += 1;
pn1 = peek(i);
- i += 1;
} while (!(parens === 0 && pn.value === ")") &&
pn1.value !== "=>" && pn1.value !== ";" && pn1.type !== "(end)");
@@ -55546,15 +55536,7 @@ var JSHINT = (function () {
if (Array.isArray(parsed)) {
for (var i in parsed) {
curr = parsed[i];
- if (_.contains(["{", "["], curr.id)) {
- for (t in curr.left) {
- t = tokens[t];
- if (t && t.id) {
- params.push(t.id);
- addlabel(t.id, { type: "unused", token: t.token });
- }
- }
- } else if (curr.value === "...") {
+ if (curr.value === "...") {
if (!state.option.inESNext()) {
warning("W104", curr, "spread/rest operator");
}
@@ -56955,12 +56937,20 @@ var JSHINT = (function () {
warning("W119", state.tokens.curr, "import");
}
+ if (state.tokens.next.type === "(string)") {
+ advance("(string)");
+ return this;
+ }
if (state.tokens.next.identifier) {
this.name = identifier();
addlabel(this.name, { type: "unused", token: state.tokens.curr });
} else {
advance("{");
for (;;) {
+ if (state.tokens.next.value === "}") {
+ advance("}");
+ break;
+ }
var importName;
if (state.tokens.next.type === "default") {
importName = "default";
@@ -57009,7 +56999,7 @@ var JSHINT = (function () {
if (state.tokens.next.value === "{") {
advance("{");
for (;;) {
- identifier();
+ exported[identifier()] = true;
if (state.tokens.next.value === ",") {
advance(",");
@@ -57026,20 +57016,25 @@ var JSHINT = (function () {
if (state.tokens.next.id === "var") {
advance("var");
+ exported[state.tokens.next.value] = true;
state.syntax["var"].fud.call(state.syntax["var"].fud);
} else if (state.tokens.next.id === "let") {
advance("let");
+ exported[state.tokens.next.value] = true;
state.syntax["let"].fud.call(state.syntax["let"].fud);
} else if (state.tokens.next.id === "const") {
advance("const");
+ exported[state.tokens.next.value] = true;
state.syntax["const"].fud.call(state.syntax["const"].fud);
} else if (state.tokens.next.id === "function") {
this.block = true;
advance("function");
+ exported[state.tokens.next.value] = true;
state.syntax["function"].fud();
} else if (state.tokens.next.id === "class") {
this.block = true;
advance("class");
+ exported[state.tokens.next.value] = true;
state.syntax["class"].fud();
} else {
error("E024", state.tokens.next, state.tokens.next.value);
@@ -57888,7 +57883,9 @@ if (typeof exports === "object" && exports) {
exports.JSHINT = JSHINT;
}
-},{"./lex.js":14,"./messages.js":15,"./reg.js":16,"./state.js":17,"./style.js":18,"./vars.js":19,"console-browserify":10,"events":5,"underscore":11}],14:[function(require,module,exports){
+},{"./lex.js":14,"./messages.js":15,"./reg.js":16,"./state.js":17,"./style.js":18,"./vars.js":19,"console-browserify":10,"events":5,"underscore":11}],"jshint":[function(require,module,exports){
+module.exports=require('lGT9nC');
+},{}],14:[function(require,module,exports){
/*
* Lexical analysis and token construction.
*/
@@ -59708,7 +59705,7 @@ var warnings = {
var info = {
I001: "Comma warnings can be turned off with 'laxcomma'.",
- I002: "Reserved words as properties can be used under the 'es5' option.",
+ I002: null,
I003: "ES5 option is now set per default"
};
@@ -60382,10 +60379,12 @@ exports.rhino = {
deserialize : false,
gc : false,
help : false,
+ importClass : false,
importPackage: false,
"java" : false,
load : false,
loadClass : false,
+ Packages : false,
print : false,
quit : false,
readFile : false,
@@ -60567,23 +60566,25 @@ exports.yui = {
};
-},{}]},{},["nr+AlQ"])
+},{}]},{},["lGT9nC"])
JSHINT = require('jshint').JSHINT;
if (typeof exports === 'object' && exports) exports.JSHINT = JSHINT;
}());
/*jshint boss: true, rhino: true, unused: true, undef: true, white: true, quotmark: double */
-/*global JSHINT */
+/*global JSHINT, readFully */
(function (args) {
"use strict";
var filenames = [];
- var flags = {};
+ var flags = {};
+ var opts = {};
+ var globals = {};
+ var retval = 0;
+ var readf = (typeof readFully === "function" ? readFully : readFile);
+
var optstr; // arg1=val1,arg2=val2,...
var predef; // global1=true,global2,global3,...
- var opts = {};
- var globals = {};
- var retval = 0;
args.forEach(function (arg) {
if (arg.indexOf("--") === 0) {
@@ -60625,7 +60626,7 @@ if (typeof exports === 'object' && exports) exports.JSHINT = JSHINT;
if ("config" in flags) {
var cfgFileContent;
try {
- cfgFileContent = readFile(flags.config);
+ cfgFileContent = readf(flags.config);
} catch (e) {
print("Could not read config file " + flags.config);
quit(1);
@@ -60665,7 +60666,7 @@ if (typeof exports === 'object' && exports) exports.JSHINT = JSHINT;
}
filenames.forEach(function (name) {
- var input = readFile(name);
+ var input = readf(name);
if (!input) {
print("jshint: Couldn't open file " + name);
View
49 dist/jshint.js
@@ -1,4 +1,4 @@
-// 2.4.3
+// 2.4.4
var JSHINT;
if (typeof window === 'undefined') window = {};
(function () {
@@ -52732,9 +52732,7 @@ function assert(expression) {
}).call(this);
-},{}],"jshint":[function(require,module,exports){
-module.exports=require('nr+AlQ');
-},{}],"nr+AlQ":[function(require,module,exports){
+},{}],"lGT9nC":[function(require,module,exports){
/*!
* JSHint, by JSHint Community.
*
@@ -54314,13 +54312,6 @@ var JSHINT = (function () {
return val;
}
- // Display an info message about reserved words as properties
- // and ES5 but do it only once.
- if (prop && !api.getCache("displayed:I002")) {
- api.setCache("displayed:I002", true);
- warning("I002");
- }
-
warning("W024", state.tokens.curr, state.tokens.curr.id);
return val;
}
@@ -55322,7 +55313,6 @@ var JSHINT = (function () {
i += 1;
pn1 = peek(i);
- i += 1;
} while (!(parens === 0 && pn.value === ")") &&
pn1.value !== "=>" && pn1.value !== ";" && pn1.type !== "(end)");
@@ -55544,15 +55534,7 @@ var JSHINT = (function () {
if (Array.isArray(parsed)) {
for (var i in parsed) {
curr = parsed[i];
- if (_.contains(["{", "["], curr.id)) {
- for (t in curr.left) {
- t = tokens[t];
- if (t && t.id) {
- params.push(t.id);
- addlabel(t.id, { type: "unused", token: t.token });
- }
- }
- } else if (curr.value === "...") {
+ if (curr.value === "...") {
if (!state.option.inESNext()) {
warning("W104", curr, "spread/rest operator");
}
@@ -56953,12 +56935,20 @@ var JSHINT = (function () {
warning("W119", state.tokens.curr, "import");
}
+ if (state.tokens.next.type === "(string)") {
+ advance("(string)");
+ return this;
+ }
if (state.tokens.next.identifier) {
this.name = identifier();
addlabel(this.name, { type: "unused", token: state.tokens.curr });
} else {
advance("{");
for (;;) {
+ if (state.tokens.next.value === "}") {
+ advance("}");
+ break;
+ }
var importName;
if (state.tokens.next.type === "default") {
importName = "default";
@@ -57007,7 +56997,7 @@ var JSHINT = (function () {
if (state.tokens.next.value === "{") {
advance("{");
for (;;) {
- identifier();
+ exported[identifier()] = true;
if (state.tokens.next.value === ",") {
advance(",");
@@ -57024,20 +57014,25 @@ var JSHINT = (function () {
if (state.tokens.next.id === "var") {
advance("var");
+ exported[state.tokens.next.value] = true;
state.syntax["var"].fud.call(state.syntax["var"].fud);
} else if (state.tokens.next.id === "let") {
advance("let");
+ exported[state.tokens.next.value] = true;
state.syntax["let"].fud.call(state.syntax["let"].fud);
} else if (state.tokens.next.id === "const") {
advance("const");
+ exported[state.tokens.next.value] = true;
state.syntax["const"].fud.call(state.syntax["const"].fud);
} else if (state.tokens.next.id === "function") {
this.block = true;
advance("function");
+ exported[state.tokens.next.value] = true;
state.syntax["function"].fud();
} else if (state.tokens.next.id === "class") {
this.block = true;
advance("class");
+ exported[state.tokens.next.value] = true;
state.syntax["class"].fud();
} else {
error("E024", state.tokens.next, state.tokens.next.value);
@@ -57886,7 +57881,9 @@ if (typeof exports === "object" && exports) {
exports.JSHINT = JSHINT;
}
-},{"./lex.js":14,"./messages.js":15,"./reg.js":16,"./state.js":17,"./style.js":18,"./vars.js":19,"console-browserify":10,"events":5,"underscore":11}],14:[function(require,module,exports){
+},{"./lex.js":14,"./messages.js":15,"./reg.js":16,"./state.js":17,"./style.js":18,"./vars.js":19,"console-browserify":10,"events":5,"underscore":11}],"jshint":[function(require,module,exports){
+module.exports=require('lGT9nC');
+},{}],14:[function(require,module,exports){
/*
* Lexical analysis and token construction.
*/
@@ -59706,7 +59703,7 @@ var warnings = {
var info = {
I001: "Comma warnings can be turned off with 'laxcomma'.",
- I002: "Reserved words as properties can be used under the 'es5' option.",
+ I002: null,
I003: "ES5 option is now set per default"
};
@@ -60380,10 +60377,12 @@ exports.rhino = {
deserialize : false,
gc : false,
help : false,
+ importClass : false,
importPackage: false,
"java" : false,
load : false,
loadClass : false,
+ Packages : false,
print : false,
quit : false,
readFile : false,
@@ -60565,7 +60564,7 @@ exports.yui = {
};
-},{}]},{},["nr+AlQ"])
+},{}]},{},["lGT9nC"])
JSHINT = require('jshint').JSHINT;
if (typeof exports === 'object' && exports) exports.JSHINT = JSHINT;
}());
View
2  package.json
@@ -1,6 +1,6 @@
{
"name": "jshint",
- "version": "2.4.3",
+ "version": "2.4.4",
"homepage": "http://jshint.com/",
"description": "Static analysis tool for JavaScript",
Please sign in to comment.
Something went wrong with that request. Please try again.