-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Improve and introduce measures for consistent code style #4094
base: 0_15
Are you sure you want to change the base?
Conversation
Also note that each style rule got introduced in its own commit so we could easily revert one of them if not wanted ;) |
@Mattstir interesting idea 😃 Two questions come to my mind:
|
@softhack007 Thanks for your interest :D
I selected these based on the desired style in the |
I'm highly passionate about clean code and a consistent code style, so I see this as a great opportunity to enhance WLED. 😉
By introducing ESLint, we can automatically enforce code style during each CI run (and hint at problems during a local
npm build
), ensuring that future changes adhere to the established guidelines. For now, I've aligned the rules with the suggestions in WLED'sCONTRIBUTING.md
and made them mandatory. This is now only a basic start, these rules can be easily expanded in the future to include more than just style.I've also corrected the existing style issues in the
.js
files and js snippets in html files.Note: This PR is purely stylistic with no logic changes. I hope you like it! 😄