You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Chris Brody <ch...@gmail.com> on 2020/03/13 00:22:06 UTC

[Cordova dev] formal coding styles?

I noticed a question on the PMC Slack channel if there were any kind of
formal coding styles?

It seems like we don't have much of any, beyond starting to use a new
@cordova/eslint-config which seems to be based on semistandard (with indent
spacing of 4) and almost the same as how we have linted for a few years.

I think this is a nice starting point, definitely wouldn't mind something
more fancy, such as an adaptation of prettier-standard, someday in the
future. (Fair disclosure that prettier-standard uses a Prettier fork that I
have been maintaining.)

Re: [Cordova dev] formal coding styles?

Posted by ra...@gmail.com.
My suggestion would be to let @cordova/eslint-config be the single source
of truth regarding JS code style. I do not like the idea of an additional
document that duplicates this code style in prose. Instead, people should
use the configured linting tools to check if their contribution matches our
code style.

Side note: Yes, it's only a starting point. IMO we should strive to make
these rules stricter in the long run (e.g disallow anti-patterns we find in
the code, require modern features, ...). But evolving the style is
relatively low priority, compared to other tasks we are facing.

Am Fr., 13. März 2020 um 13:46 Uhr schrieb Norman Breau <
norman@normanbreau.com>:

> I was the one who asked the question. My main intent was a document
> something that I could point a non-PMC committer to, if I notice
> something in a review (and if there was any pushback).
>
> On 2020-03-12 9:22 p.m., Chris Brody wrote:
> > I noticed a question on the PMC Slack channel if there were any kind of
> > formal coding styles?
> >
> > It seems like we don't have much of any, beyond starting to use a new
> > @cordova/eslint-config which seems to be based on semistandard (with
> indent
> > spacing of 4) and almost the same as how we have linted for a few years.
> >
> > I think this is a nice starting point, definitely wouldn't mind something
> > more fancy, such as an adaptation of prettier-standard, someday in the
> > future. (Fair disclosure that prettier-standard uses a Prettier fork
> that I
> > have been maintaining.)
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
> For additional commands, e-mail: dev-help@cordova.apache.org
>
>

Re: [Cordova dev] formal coding styles?

Posted by Norman Breau <no...@normanbreau.com>.
I was the one who asked the question. My main intent was a document 
something that I could point a non-PMC committer to, if I notice 
something in a review (and if there was any pushback).

On 2020-03-12 9:22 p.m., Chris Brody wrote:
> I noticed a question on the PMC Slack channel if there were any kind of
> formal coding styles?
>
> It seems like we don't have much of any, beyond starting to use a new
> @cordova/eslint-config which seems to be based on semistandard (with indent
> spacing of 4) and almost the same as how we have linted for a few years.
>
> I think this is a nice starting point, definitely wouldn't mind something
> more fancy, such as an adaptation of prettier-standard, someday in the
> future. (Fair disclosure that prettier-standard uses a Prettier fork that I
> have been maintaining.)
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org