1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Ignore top-level await errs in monaco

Fixes #3138
This commit is contained in:
Nick O'Leary 2021-09-29 17:19:12 +01:00
parent d4fc6feeba
commit da210e2ae4
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -653,6 +653,8 @@ RED.editor.codeEditor.monaco = (function() {
noSyntaxValidation: false, noSyntaxValidation: false,
diagnosticCodesToIgnore: [ diagnosticCodesToIgnore: [
1108, //return not inside function 1108, //return not inside function
1375, //'await' expressions are only allowed at the top level of a file when that file is a module
1378, //Top-level 'await' expressions are only allowed when the 'module' option is set to 'esnext' or 'system', and the 'target' option is set to 'es2017' or higher
//2304, //Cannot find name - this one is heavy handed and prevents user seeing stupid errors. Would provide better ACE feature parity (i.e. no need for declaration of vars) but misses lots of errors. Lets be bold & leave it out! //2304, //Cannot find name - this one is heavy handed and prevents user seeing stupid errors. Would provide better ACE feature parity (i.e. no need for declaration of vars) but misses lots of errors. Lets be bold & leave it out!
2307, //Cannot find module 'xxx' or its corresponding type declarations 2307, //Cannot find module 'xxx' or its corresponding type declarations
2322, //Type 'unknown' is not assignable to type 'string' 2322, //Type 'unknown' is not assignable to type 'string'