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