nav
nav copied to clipboard
Use at least ES9/ES10 edition of Javascript
Todays solution:
Ecmascript used today in NAV is of edition lower than ES6. All standards lower than ES6 are considered old, and are not necessarily guaranteed to be supported by all browsers nowadays. Furthermore, transition from ES5 to ES6 looks like a whole new programming language. This leads to younger developers not being familiar with syntax and workflow of the NAV frontend code-base.
Suggested solution:
Set Javascript standard to be at least ES9 or ES10.
Drawbacks: It is likely that lifting the standard to ES9/ES10 will break existing code-base, lead to warnings and errors that will have to be refactored manually. The extent of the refactoring will depend on amount and severity of those warning and errors. But each refactoring instance is going to be related to syntax, so should not be too demanding and time consuming to fix.
Credit: The issue was pointed out, and extensively described by @emilhf in Forslag til ny frontend-tilnærming I NAV [May 2017]
Are there linters available that can tell us whether a given JS source file is compatible? It would be very useful if we can have a metric to look at here, so that we know when this goal has finally been reached.