[Lambdas] Revisit Lambda JS linting/compliance with ecma6 or 7 to spec
[Lambdas] Revisit Lambda JS linting/compliance with ecma6 or 7 to spec
Problem
You can't use let and maybe a few other nice ECMA magic in Lambda's right now. The linter, or however we are checking this, does not like it.
Solution
Maybe implement something like https://prettier.io and a button to even "prettify" the lambda code in browser.
Alternatives/workarounds
Living in the past, and using old JS lovely technologies
Additional context
People like newer ECMA script features.
Related
- https://github.com/FusionAuth/fusionauth-issues/issues/1790#issuecomment-1238336566
- https://github.com/FusionAuth/fusionauth-issues/issues/1828
Community guidelines
All issues filed in this repository must abide by the FusionAuth community guidelines.
How to vote
Please give us a thumbs up or thumbs down as a reaction to help us prioritize this feature. Feel free to comment if you have a particular need or comment on how this feature should work.
I think this only has to do with the editor we provide in the UI? If so, can you clarify the problem description to indicate this does not affect the API or runtime, but just the admin UI editor?
Assuming that is the case currently use CodeMirror (https://codemirror.net/), so we'd have to see if there is a a proper linter for ECMAScript >= 6.1 or build one.
Ideally we'd enable the linter according to the selected engine. Nashorn is stuck at ECMAScript 5.1.
According to their doc GrallJS supports the latest 2022 ECMAScript spec.
- https://github.com/oracle/graaljs
- https://262.ecma-international.org/13.0/
Why is this closed, @robotdan ? The editor still doesn't let you use let or other valid JavaScript. That is problematic for a major use case (people iterating on lambdas in the editor).
Would you prefer we create another issue?