Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert LuCI JS code to ES6 standard #6597

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Convert LuCI JS code to ES6 standard #6597

wants to merge 2 commits into from

Conversation

jow-
Copy link
Contributor

@jow- jow- commented Sep 26, 2023

This PR contains commits dropping polyfills not needed anymore on modern browsers and refactoring code to utilize ES6 syntax elements and features.

Subsequent commits will modernize LuCI JavaScript code to use ES6 features,
so drop the Promise polyfill as we're dropping support for non-ES6 browsers.

Signed-off-by: Jo-Philipp Wich <[email protected]>
Convert existing JavaScript code in LuCI base to utilize ES6 standard
features such as spread arguments, arrow functions, object method
declarations etc.

This makes the code somewhat easier to follow and slightly smaller.

Signed-off-by: Jo-Philipp Wich <[email protected]>
@systemcrash
Copy link
Contributor

With this PR, is it your opinion that we can start implementing ES6 for future JS code?

@systemcrash systemcrash added WIP pull request the author is still working on RFC issue to Request for Comments labels Dec 6, 2023
@stokito
Copy link
Contributor

stokito commented Dec 6, 2023

The luci already have many places where the ES6 syntax is used.
Keep sources simple and small is complicated so we better to move to ES6.
Also please consider to use the JavaScript Standard Style e.g indent with spaces and no semicolons.

I can convert to ES6 other apps.

@jow-
Copy link
Contributor Author

jow- commented Dec 7, 2023

I dislike semicolon omission and space indentation, so personally I am opposed to standard style.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFC issue to Request for Comments WIP pull request the author is still working on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants