Remove all but 2 eslint-disable pragmas (#1335)

Turns off:
 - no-explicit-any (we need to handle any return values from runPython)
 - no-unsafe-assignment (noisy and pointless)

And resolves all but two remaining ones. The last two lints regard access to private Pyodide variables and so:
 - they are not easy to work around without an upstream Pyodide patch
 - they should trigger linter and require explicit override
This commit is contained in:
Hood Chatham
2023-03-30 10:51:36 -07:00
committed by GitHub
parent 854e9d1378
commit 146afb6532
13 changed files with 42 additions and 61 deletions

View File

@@ -133,14 +133,13 @@ export function make_PyRepl(interpreter: InterpreterClient, app: PyScriptApp) {
// execute the python code
await app.plugins.beforePyReplExec({ interpreter: interpreter, src: pySrc, outEl: outEl, pyReplTag: this });
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const { result } = await pyExec(interpreter, pySrc, outEl);
await app.plugins.afterPyReplExec({
interpreter: interpreter,
src: pySrc,
outEl: outEl,
pyReplTag: this,
result, // eslint-disable-line @typescript-eslint/no-unsafe-assignment
result,
});
this.autogenerateMaybe();