poush / H2

Supporting light weight extensions for heavy task lifting
MIT License
16 stars 32 forks source link

Inconsistent code style #65

Closed Benjamin-Davies closed 5 years ago

Benjamin-Davies commented 5 years ago

The javascript code for H2 has varying code styles. This can make the code hard to read and discourage new contributors.

There is inconsistent semicolon usage, mixed let and const for importing variables, and mixed function declarations and expressions. I have also come across ternary conditional operators being used as statements instead of ifs.

These differences are most notable in the main.js createWindow and createMenuTray functions.

I propose that a linter should be added, probably ESLint.

poush commented 5 years ago

Agree, We should also modularize the createWindow function.

Benjamin-Davies commented 5 years ago

Are these rules what you are looking for? https://standardjs.com/#standardjs--the-rules

poush commented 5 years ago

Yes, the standard rules are good to go.