Remove various JSHint-related cruft

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

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

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

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

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

Loading…
Cancel
Save