Removed remaining jshint config comments
This commit is contained in:
@@ -1102,8 +1102,6 @@ getJasmineRequireObj().Spec = function(j$) {
|
|||||||
return Spec;
|
return Spec;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*jshint bitwise: false*/
|
|
||||||
|
|
||||||
getJasmineRequireObj().Order = function() {
|
getJasmineRequireObj().Order = function() {
|
||||||
function Order(options) {
|
function Order(options) {
|
||||||
this.random = 'random' in options ? options.random : true;
|
this.random = 'random' in options ? options.random : true;
|
||||||
@@ -2709,12 +2707,9 @@ getJasmineRequireObj().Any = function(j$) {
|
|||||||
return typeof other == 'boolean';
|
return typeof other == 'boolean';
|
||||||
}
|
}
|
||||||
|
|
||||||
/* jshint -W122 */
|
|
||||||
/* global Symbol */
|
|
||||||
if (typeof Symbol != 'undefined' && this.expectedObject == Symbol) {
|
if (typeof Symbol != 'undefined' && this.expectedObject == Symbol) {
|
||||||
return typeof other == 'symbol';
|
return typeof other == 'symbol';
|
||||||
}
|
}
|
||||||
/* jshint +W122 */
|
|
||||||
|
|
||||||
return other instanceof this.expectedObject;
|
return other instanceof this.expectedObject;
|
||||||
};
|
};
|
||||||
@@ -3717,11 +3712,10 @@ getJasmineRequireObj().DelayedFunctionScheduler = function(j$) {
|
|||||||
) {
|
) {
|
||||||
var f;
|
var f;
|
||||||
if (typeof funcToCall === 'string') {
|
if (typeof funcToCall === 'string') {
|
||||||
/* jshint evil: true */
|
|
||||||
f = function() {
|
f = function() {
|
||||||
|
// eslint-disable-next-line no-eval
|
||||||
return eval(funcToCall);
|
return eval(funcToCall);
|
||||||
};
|
};
|
||||||
/* jshint evil: false */
|
|
||||||
} else {
|
} else {
|
||||||
f = funcToCall;
|
f = funcToCall;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -95,7 +95,8 @@
|
|||||||
"error",
|
"error",
|
||||||
"always"
|
"always"
|
||||||
],
|
],
|
||||||
"space-before-blocks": "error"
|
"space-before-blocks": "error",
|
||||||
|
"no-eval": "error"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
|
|||||||
@@ -632,7 +632,8 @@ describe('QueueRunner', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('issues a more specific error if the function is `async`', function() {
|
it('issues a more specific error if the function is `async`', function() {
|
||||||
eval('var fn = async function(done){};');
|
// eslint-disable-next-line no-unused-vars
|
||||||
|
async function fn(done) {}
|
||||||
const onException = jasmine.createSpy('onException'),
|
const onException = jasmine.createSpy('onException'),
|
||||||
queueRunner = new jasmineUnderTest.QueueRunner({
|
queueRunner = new jasmineUnderTest.QueueRunner({
|
||||||
queueableFns: [{ fn: fn }],
|
queueableFns: [{ fn: fn }],
|
||||||
|
|||||||
@@ -106,9 +106,9 @@ describe('SpyStrategy', function() {
|
|||||||
|
|
||||||
it('allows a fake async function to be called instead', function(done) {
|
it('allows a fake async function to be called instead', function(done) {
|
||||||
const originalFn = jasmine.createSpy('original'),
|
const originalFn = jasmine.createSpy('original'),
|
||||||
fakeFn = jasmine
|
fakeFn = jasmine.createSpy('fake').and.callFake(async () => {
|
||||||
.createSpy('fake')
|
return 67;
|
||||||
.and.callFake(eval('async () => { return 67; }')),
|
}),
|
||||||
spyStrategy = new jasmineUnderTest.SpyStrategy({ fn: originalFn });
|
spyStrategy = new jasmineUnderTest.SpyStrategy({ fn: originalFn });
|
||||||
|
|
||||||
spyStrategy.callFake(fakeFn);
|
spyStrategy.callFake(fakeFn);
|
||||||
|
|||||||
@@ -104,7 +104,9 @@ describe('toBeInstanceOf', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('passes for an async function', function() {
|
it('passes for an async function', function() {
|
||||||
const fn = eval("(async function fn() { return 'foo'; })");
|
async function fn() {
|
||||||
|
return 'foo';
|
||||||
|
}
|
||||||
|
|
||||||
const matcher = jasmineUnderTest.matchers.toBeInstanceOf();
|
const matcher = jasmineUnderTest.matchers.toBeInstanceOf();
|
||||||
const result = matcher.compare(fn, Function);
|
const result = matcher.compare(fn, Function);
|
||||||
|
|||||||
@@ -24,11 +24,10 @@ getJasmineRequireObj().DelayedFunctionScheduler = function(j$) {
|
|||||||
) {
|
) {
|
||||||
var f;
|
var f;
|
||||||
if (typeof funcToCall === 'string') {
|
if (typeof funcToCall === 'string') {
|
||||||
/* jshint evil: true */
|
|
||||||
f = function() {
|
f = function() {
|
||||||
|
// eslint-disable-next-line no-eval
|
||||||
return eval(funcToCall);
|
return eval(funcToCall);
|
||||||
};
|
};
|
||||||
/* jshint evil: false */
|
|
||||||
} else {
|
} else {
|
||||||
f = funcToCall;
|
f = funcToCall;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
/*jshint bitwise: false*/
|
|
||||||
|
|
||||||
getJasmineRequireObj().Order = function() {
|
getJasmineRequireObj().Order = function() {
|
||||||
function Order(options) {
|
function Order(options) {
|
||||||
this.random = 'random' in options ? options.random : true;
|
this.random = 'random' in options ? options.random : true;
|
||||||
|
|||||||
@@ -30,12 +30,9 @@ getJasmineRequireObj().Any = function(j$) {
|
|||||||
return typeof other == 'boolean';
|
return typeof other == 'boolean';
|
||||||
}
|
}
|
||||||
|
|
||||||
/* jshint -W122 */
|
|
||||||
/* global Symbol */
|
|
||||||
if (typeof Symbol != 'undefined' && this.expectedObject == Symbol) {
|
if (typeof Symbol != 'undefined' && this.expectedObject == Symbol) {
|
||||||
return typeof other == 'symbol';
|
return typeof other == 'symbol';
|
||||||
}
|
}
|
||||||
/* jshint +W122 */
|
|
||||||
|
|
||||||
return other instanceof this.expectedObject;
|
return other instanceof this.expectedObject;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user