<div dir="ltr"><div>Hello</div><div><br></div>Already in my plans to review the JavaScript files, especially in the coding style part.<br><br>I already had a good idea of the code when I was preparing the webpack pull request, it just didn't work because I bit off more than I could chew. My intention is to work on JavaScript as well, however this time in baby steps and setting a style guide is one of those steps.<div><br></div><div>I recommend using the javascript style guide from Airbnb.</div><div><a href="https://github.com/airbnb/javascript">https://github.com/airbnb/javascript</a></div><div><br></div><div>This guide is very popular and very well done. We can use it as a base in ESlint and go overwriting the rules as needed. And since it is very popular, it would help new contributors who already develop in JavaScript.</div><div><br></div><div>What do you think about using this style guide?<br><div><br></div></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Maurício Meneghini Fauth</div></div></div>
<br><div class="gmail_quote">On Sat, Aug 12, 2017 at 12:03 PM, Isaac Bennetch <span dir="ltr"><<a href="mailto:bennetch@gmail.com" target="_blank">bennetch@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Fri, Aug 11, 2017 at 9:43 AM, Michal Čihař <<a href="mailto:michal@cihar.com">michal@cihar.com</a>> wrote:<br>
><br>
> I'm not really sure what are best practices in the JS world, but we<br>
> should rather try to hold to that instead of using PHP style things in<br>
> JS. We can then configure Codacy (or other tool) to do such checks.<br>
<br>
</span>Indeed, I agree. I quickly was able to find the jQuery style guide[1] or the<br>
Google one[2]. I immediately preferred the Google one because it looks<br>
more comprehensive. On closer inspection, jQuery uses tabs for indentation<br>
and Google uses spaces. I didn't notice any other differences in the areas<br>
that matter to me; they seem pretty similar with style of braces and naming<br>
conventions. So I prefer the Google one. That also happens (by coincidence)<br>
to be the same guide referenced by Manish in his reply.<br>
<br>
1 - <a href="https://contribute.jquery.org/style-guide/js/" rel="noreferrer" target="_blank">https://contribute.jquery.org/<wbr>style-guide/js/</a><br>
2 - <a href="https://google.github.io/styleguide/jsguide.html" rel="noreferrer" target="_blank">https://google.github.io/<wbr>styleguide/jsguide.html</a><br>
<span class=""><br>
<br>
On Fri, Aug 11, 2017 at 10:29 AM, Himanshu Agrawal<br>
<<a href="mailto:himanshuagrawal1998@gmail.com">himanshuagrawal1998@gmail.com</a><wbr>> wrote:<br>
><br>
> The comments are also not formatted in a similar way throughout. We can<br>
> also set some guidelines to use /*...*/ or // and whether to give spacing after //. The<br>
> /* should be followed by line break, etc. Is it required or comments would work fine?<br>
<br>
</span>I think we should pick a style to follow, then fix up the existing<br>
files based on<br>
the guide presented there, but realistically the code works and any fix ups<br>
are going to result in code that still works, so it's not a very glamorous task.<br>
Even more so with comments that just aren't in a modern format. The whole<br>
section of code may need a refactoring more than it needs to be adjusted<br>
to match the style guide. It's an interesting project management puzzle to<br>
think about whether it should be refactored outright, made to match the<br>
style guide, or just left how it is.<br>
<div class="HOEnZb"><div class="h5"><br>
______________________________<wbr>_________________<br>
Developers mailing list<br>
<a href="mailto:Developers@phpmyadmin.net">Developers@phpmyadmin.net</a><br>
<a href="https://lists.phpmyadmin.net/mailman/listinfo/developers" rel="noreferrer" target="_blank">https://lists.phpmyadmin.net/<wbr>mailman/listinfo/developers</a><br>
</div></div></blockquote></div><br></div>