zabsalahid / serialport-gsm

SerialPort-GSM is a simplified plugin for communicating with gsm modems. (Primarily for sms) (Focused in PDU mode)
MIT License
90 stars 47 forks source link

Discussion: Codeing conventions & guidelines #21

Closed Apollon77 closed 5 years ago

Apollon77 commented 5 years ago

Own "thread" to disacuss about codeing style and guidelines :-) My two topics/questions would be:

What's your opinions?

Apollon77 commented 5 years ago

Me personally terminate lines with ; and I mainly use === wherever possible.

karianpour commented 5 years ago

As the project is under production , changing == to === might cause break. So I suggest to use === when we add a new functionality or when we change and test a function. About the ;, it is programmer preference, as @zabsalahid started the project without it, I respected the convention.

zabsalahid commented 5 years ago

Hello @karianpour and @Apollon77 !

Yep, I started the project without it. I find it more clean and neat. Since javascript automatically adds semicolon if it needs to. Thanks.

Apollon77 commented 5 years ago

Ok to both from my point of view.

In my first PR I have unified the used quotes BTW

Apollon77 commented 5 years ago

PS: I would change "===" whereever possible without breaking thing

Apollon77 commented 5 years ago

Happy review :-) https://github.com/zabsalahid/serialport-gsm/pull/23/

zabsalahid commented 5 years ago

@Apollon77 reviewing.

Apollon77 commented 5 years ago

From my point of view we could also close here ... "===" was adopten where easiely possible and the seicolons are "defined code style" same as the "two space indent" :-)