Removed remaining jshint config comments

This commit is contained in:
Steve Gravrock
2022-06-02 18:16:16 -07:00
parent 18a00822c5
commit a5f79fac81
8 changed files with 12 additions and 20 deletions

View File

@@ -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;
}

View File

@@ -95,7 +95,8 @@
"error",
"always"
],
"space-before-blocks": "error"
"space-before-blocks": "error",
"no-eval": "error"
}
},
"browserslist": [

View File

@@ -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 }],

View File

@@ -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);

View File

@@ -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);

View File

@@ -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;
}

View File

@@ -1,5 +1,3 @@
/*jshint bitwise: false*/
getJasmineRequireObj().Order = function() {
function Order(options) {
this.random = 'random' in options ? options.random : true;

View File

@@ -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;
};