Remove various JSHint-related cruft

We use ESLint now, which is smarter about some things.
redux
David Majda 9 years ago
parent 75cedcb7d8
commit 1f7efd57c0

@ -12,12 +12,13 @@ var js = {
* may appear in the form of an escape sequence. * may appear in the form of an escape sequence.
* *
* For portability, we also escape all control and non-ASCII characters. * For portability, we also escape all control and non-ASCII characters.
* Note that "\0" and "\v" escape sequences are not used because JSHint does * Note that the "\v" escape sequence is not used because IE does not like
* not like the first and IE the second. * it.
*/ */
return s return s
.replace(/\\/g, '\\\\') // backslash .replace(/\\/g, '\\\\') // backslash
.replace(/"/g, '\\"') // closing double quote .replace(/"/g, '\\"') // closing double quote
.replace(/\0/g, '\\0') // null
.replace(/\x08/g, '\\b') // backspace .replace(/\x08/g, '\\b') // backspace
.replace(/\t/g, '\\t') // horizontal tab .replace(/\t/g, '\\t') // horizontal tab
.replace(/\n/g, '\\n') // line feed .replace(/\n/g, '\\n') // line feed

@ -71,7 +71,7 @@ describe("generated parser behavior", function() {
toFailToParse: function(input, details, options) { toFailToParse: function(input, details, options) {
options = options !== undefined ? options : {}; options = options !== undefined ? options : {};
var result; var result, key;
try { try {
result = this.actual.parse(input, options); result = this.actual.parse(input, options);
@ -86,12 +86,6 @@ describe("generated parser behavior", function() {
return false; return false;
} catch (e) { } catch (e) {
/*
* Should be at the top level but then JSHint complains about bad for
* in variable.
*/
var key;
if (this.isNot) { if (this.isNot) {
this.message = function() { this.message = function() {
return "Expected " + jasmine.pp(input) return "Expected " + jasmine.pp(input)

@ -61,7 +61,8 @@ beforeEach(function() {
}, },
toReportError: function(grammar, details) { toReportError: function(grammar, details) {
var ast = peg.parser.parse(grammar); var ast = peg.parser.parse(grammar),
key;
try { try {
this.actual(ast); this.actual(ast);
@ -75,12 +76,6 @@ beforeEach(function() {
return false; return false;
} catch (e) { } catch (e) {
/*
* Should be at the top level but then JSHint complains about bad for
* in variable.
*/
var key;
if (this.isNot) { if (this.isNot) {
this.message = function() { this.message = function() {
return "Expected the pass not to report an error " return "Expected the pass not to report an error "

@ -204,7 +204,7 @@ describe("PEG.js grammar parser", function() {
}, },
toFailToParse: function(details) { toFailToParse: function(details) {
var result; var result, key;
try { try {
result = peg.parser.parse(this.actual); result = peg.parser.parse(this.actual);
@ -219,12 +219,6 @@ describe("PEG.js grammar parser", function() {
return false; return false;
} catch (e) { } catch (e) {
/*
* Should be at the top level but then JSHint complains about bad for
* in variable.
*/
var key;
if (this.isNot) { if (this.isNot) {
this.message = function() { this.message = function() {
return "Expected " + jasmine.pp(this.actual) + " to parse, " return "Expected " + jasmine.pp(this.actual) + " to parse, "

Loading…
Cancel
Save