[phpMyAdmin Developers] JavaScript function names

Himanshu Agrawal himanshuagrawal1998 at gmail.com
Fri Aug 11 16:29:46 CEST 2017


The comments are also not formatted in a similar way throughout. We can
also set some guidelines to use /*...*/ or // and whether to give spacing
after //. The /* should be followed by line break, etc. Is it required or
comments would work fine?

On Fri, Aug 11, 2017 at 7:27 PM, Manish Bisht <manish.bisht490 at gmail.com>
wrote:

> I just checked the file "js/pmd/move.js" We can use the following
> coding standards.
>
> 1. Function Names in Camel Case
> (https://google.github.io/styleguide/jsguide.html#
> naming-camel-case-defined)
> 2. Function braces should start after the function name instead of
> after line break
> (https://google.github.io/styleguide/jsguide.html#formatting-braces)
>
> Thanks,
>
> Manish Bisht
> Email : hi at manishbisht.me
> Website : https://manishbisht.me
>
>
>
> On Fri, Aug 11, 2017 at 7:13 PM, Michal Čihař <michal at cihar.com> wrote:
> > Hi
> >
> > Isaac Bennetch píše v Pá 11. 08. 2017 v 09:28 -0400:
> >> I was looking at some of the JavaScript function names, in particular
> >> in js/pma/move.js and the names are a mess;
> >
> > Well actually whole designer code is a bit messy - it's only piece of
> > our code which doesn't use jQuery and other modern features (except
> > some new pieces which have been added later). Most of this file is
> > actually 10 years old :-).
> >
> >> we have many different
> >> variations of naming technique. That led me to look for any coding
> >> style guides; I know we have one for PHP files[1] but it's not clear
> >> if we use the same standards for JavaScript files. We can improve our
> >> documentation about this (unless I just missed some documentation
> >> that
> >> already exists). Any input about what we should use here? Most of the
> >> rest of the JS files seem to use PEAR-standard function names, at
> >> least based on a quick look I just did. If we all agree on that, we
> >> can just add a bit to the wiki telling people to use those same
> >> standards for JS files.
> >
> > I'm not really sure what are best practices in the JS world, but we
> > should rather try to hold to that instead of using PHP style things in
> > JS. We can then configure Codacy (or other tool) to do such checks.
> >
> > --
> >         Michal Čihař | https://cihar.com/ | https://weblate.org/
> >
> > _______________________________________________
> > Developers mailing list
> > Developers at phpmyadmin.net
> > https://lists.phpmyadmin.net/mailman/listinfo/developers
> >
>
> _______________________________________________
> Developers mailing list
> Developers at phpmyadmin.net
> https://lists.phpmyadmin.net/mailman/listinfo/developers
>



-- 
Thanks & Regards
Himanshu Agrawal
himanshuagrawal1998 at gmail.com
Student Developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.phpmyadmin.net/pipermail/developers/attachments/20170811/cf896af3/attachment.html>


More information about the Developers mailing list