beCoditive / Becoditive-API

The official API of beCoditive with many endpoints like memes, animals, image manipulation, url shortner, etc.
https://api.becoditive.xyz
MIT License
15 stars 7 forks source link

Why two Ecmascript standards and indentation style are being mixed? #13

Closed ghost closed 3 years ago

ghost commented 3 years ago

Hi.

Sorry for addressing this, but I think it's better for it to be now than down the road later. :cry:

  1. I've seen plenty of async() over async function f() and in other part of the code, function() vs () => {.. } being used. Is there any particular reason why the codebase is using both ES5 and ES6 syntax? I understand, they are valid to use in the same codebase, it's just, I don't see any reasonable benefits to include both style. By the way, if the codebase sticks with ES6, I'm sure it can be compiled to ES5 through babel or similar to ensure backward compatibility with old browsers, if that is the primary reason with the mix.

  2. Indentation styling, as far as I can see, is not practiced consistently either. Sometimes, there are uses of semicolon, sometimes not. Plenty of incosistent function(){ vs function() {, etc. I see that the code style aligns closely with https://standardjs.com/rules.html, is that correct? If yes, standard package can be used to automatically format the whole codebase format style to follow that standardjs' standard.

Thanks for reading. :3

Max2408 commented 3 years ago

I understand the the 2 problem and it will be fixed soon.

As for the first issue the ES5 syntax is only used for local functions which are not to be exported to the client side and ES6 is used for the all controllers, so i don't see the point in making it also in ES6.

Thanks for opening the issue all the points which are nectary will be fixed soon..

ghost commented 3 years ago

Also, is there any reason why some files are named using Uppercase.js and others with lowercase.js?

Max2408 commented 3 years ago

NO that is a mistake I will fix it with camel casing. soon.

ghost commented 3 years ago

Ah. Gotcha.