I am working on improving the tooling around our js development (no GWT), all the modern tools are running in strict mode and reporting failures when I try to import even the basic SC dependencies.
Would be great to have typescript with SC components, but I end up with this error:
It would also be beneficial to import the ISC_* dependencies so webpack can optimize them along with the rest of the application, but instead:
(those are the first two, but the idea
Would be great to have typescript with SC components, but I end up with this error:
Code:
Failed to compile. ./src/smartclient.d.ts SyntaxError: C:\Users\lpolvani\Desktop\smarclient-cra\src\smartclient.d.ts: Binding 'eval' in strict mode (1125:9) 1123 | * @param {string} Expression to evaluate 1124 | */ > 1125 | function eval(expression:string):any; | ^ 1126 | /** 1127 | * Shorthand for new Date().getTime();, this returns a timeStamp - a large number 1128 | * which is incremented by 1 every millisecond. Can be used to generate unique identifiers,
(those are the first two, but the idea
Code:
Failed to compile. ./src/modules-debug/ISC_Core.js Line 6343:17: Parsing error: 'with' in strict mode 6341 | 6342 | if (evalArgs) { > 6343 | with (evalArgs) { | ^ 6344 | if (globalScope) returnVal = window.eval(expression) 6345 | else returnVal = eval(expression); 6346 | }
Code:
./src/modules-debug/ISC_Core.js Line 119148:62: Parsing error: Legacy octal literals are not allowed in strict mode 119146 | var callerFunc = isc.Class.getPrototype().setLogFailureText.caller || arguments.callee.caller, 119147 | callerName = callerFunc.name || isc.Func.getName(callerFunc, true), > 119148 | logSlot = callerName.replace(/^.*[_]+([^_]+)/, "\137$1" ) + "Log"; | ^ 119149 | if (isc.AutoTest[logSlot]) return; // initial reporter has primacy 119150 | isc.AutoTest[logSlot] = this._getLogFailureText(locator, start, finish); 119151 | },
Code:
Failed to compile. ./src/modules-debug/ISC_Core.js Line 221:5: 'OpenAjax' is not defined no-undef Line 229:5: 'OpenAjax' is not defined no-undef Line 1984:17: Unexpected use of 'location' no-restricted-globals Line 2046:17: Unexpected use of 'location' no-restricted-globals Line 2319:88: Unexpected use of 'screen' no-restricted-globals Line 2319:108: Unexpected use of 'screen' no-restricted-globals Line 6553:32: Unexpected use of 'location' no-restricted-globals Line 12469:1: Expected an assignment or function call and instead saw an expression no-unused-expressions Line 25484:1: Expected an assignment or function call and instead saw an expression no-unused-expressions Line 27020:13: Expected an assignment or function call and instead saw an expression no-unused-expressions Line 30593:17: Unexpected use of 'confirm' no-restricted-globals Line 35483:9: Expected an assignment or function call and instead saw an expression no-unused-expressions Line 44485:89: Unexpected use of 'location' no-restricted-globals Line 46264:39: Unexpected use of 'screen' no-restricted-globals Line 46270:40: Unexpected use of 'screen' no-restricted-globals Line 46307:9: Unexpected use of 'history' no-restricted-globals Line 46310:9: Unexpected use of 'history' no-restricted-globals Line 46627:27: Unexpected use of 'confirm' no-restricted-globals Line 47155:38: 'ActiveXObject' is not defined no-undef Line 47164:30: 'ActiveXObject' is not defined no-undef Line 47344:13: Expected an assignment or function call and instead saw an expression no-unused-expressions Line 47494:25: Expected an assignment or function call and instead saw an expression no-unused-expressions Line 47820:37: 'ActiveXObject' is not defined no-undef Line 47898:13: 'CollectGarbage' is not defined no-undef Line 47915:36: Unexpected use of 'location' no-restricted-globals Line 54093:9: Expected an assignment or function call and instead saw an expression no-unused-expressions Line 60169:13: Expected an assignment or function call and instead saw an expression no-unused-expressions Line 61307:17: Expected an assignment or function call and instead saw an expression no-unused-expressions Line 61586:13: Expected an assignment or function call and instead saw an expression no-unused-expressions Line 61657:13: Expected an assignment or function call and instead saw an expression no-unused-expressions Line 62148:29: Unexpected use of 'location' no-restricted-globals Line 62152:70: Unexpected use of 'location' no-restricted-globals Line 62181:14: Unexpected use of 'location' no-restricted-globals Line 78981:9: Expected an assignment or function call and instead saw an expression no-unused-expressions Line 80992:13: Expected an assignment or function call and instead saw an expression no-unused-expressions Line 81162:13: Expected an assignment or function call and instead saw an expression no-unused-expressions Line 81387:13: Expected an assignment or function call and instead saw an expression no-unused-expressions Line 81651:13: Expected an assignment or function call and instead saw an expression no-unused-expressions Line 81666:13: Expected an assignment or function call and instead saw an expression no-unused-expressions Line 94878:21: Expected an assignment or function call and instead saw an expression no-unused-expressions Line 97521:9: Expected an assignment or function call and instead saw an expression no-unused-expressions Line 97534:9: Expected an assignment or function call and instead saw an expression no-unused-expressions Line 100038:9: Expected an assignment or function call and instead saw an expression no-unused-expressions Line 100039:9: Expected an assignment or function call and instead saw an expression no-unused-expressions Line 100053:9: Expected an assignment or function call and instead saw an expression no-unused-expressions Line 104880:13: Expected an assignment or function call and instead saw an expression no-unused-expressions Line 119442:21: Expected an assignment or function call and instead saw an expression no-unused-expressions
Comment