diff --git a/.eslintrc.js b/.eslintrc.js index f453c42be0..82b418fbb8 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -7,7 +7,7 @@ module.exports = { extends: [ "eslint:recommended", "plugin:@typescript-eslint/recommended", - "plugin:@typescript-eslint/recommended-requiring-type-checking", + // "plugin:@typescript-eslint/recommended-requiring-type-checking", ], parser: "@typescript-eslint/parser", parserOptions: { diff --git a/src/Netscript/APIWrapper.ts b/src/Netscript/APIWrapper.ts index ee7fd9d75a..c2c3cd6fb1 100644 --- a/src/Netscript/APIWrapper.ts +++ b/src/Netscript/APIWrapper.ts @@ -104,7 +104,10 @@ function wrapFunction( helpers.updateDynamicRam(ctx.function, getRamCost(Player, ...tree, ctx.function)); if (safetyEnabled) { const now = performance.now(); - if (now - workerScript.infiniteLoopSafety > CONSTANTS.InfiniteLoopLimit) { + if ( + now - workerScript.infiniteLoopSafety > CONSTANTS.InfiniteLoopLimit && + workerScript.scriptRef.filename.endsWith(".js") + ) { throw new Error( `Potential infinite loop without sleep detected. The game spent ${CONSTANTS.InfiniteLoopLimit}ms stuck in this script. (Are you using 'asleep' by mistake?)`, );