You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Erik de Bruin <er...@ixsoftware.nl> on 2013/04/30 14:54:49 UTC

[FlexJS] coding style

>From my little house on the beach - I will be back behind a PC to do the
'goog.events' integration on Friday - I want to start this discussion: what
coding conventions do we want to use for FlexJS?

I used the strictest combination of the Closure Linter and JSLint to fix
the framework in the 'goog.events' commit. But I can imagine we want a
little more freedom in our commits than that. We need to decide how we want
to format the code that is committed so we don't get tons of white space
and similar changes in the diffs.

I suggest we use a reasonable strict set of JSLint rules (anyone can use
JSLint online) and we run the Closure Linter every once in a while to clear
out any JSDoc and similar Closure related errors.

Thoughts?

EdB




-- 
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl

Re: [FlexJS] coding style

Posted by Alex Harui <ah...@adobe.com>.


On 4/30/13 5:54 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:

> From my little house on the beach - I will be back behind a PC to do the
> 'goog.events' integration on Friday - I want to start this discussion: what
> coding conventions do we want to use for FlexJS?
> 
> I used the strictest combination of the Closure Linter and JSLint to fix
> the framework in the 'goog.events' commit. But I can imagine we want a
> little more freedom in our commits than that. We need to decide how we want
> to format the code that is committed so we don't get tons of white space
> and similar changes in the diffs.
> 
> I suggest we use a reasonable strict set of JSLint rules (anyone can use
> JSLint online) and we run the Closure Linter every once in a while to clear
> out any JSDoc and similar Closure related errors.
> 
> Thoughts?
I don't care too much about what coding style you want to use.  To me, the
main question is whether there can be exceptions.  Especially for
line-length restrictions.

In looking at the goog.events branch, the only thing that I think I saw that
stood out was 2-space indentation.  I can see how that might be useful when
trying to hit the 80-character limit, but all of my editors are set up for
4.

I have a slight preference for open-curly on its own line just because that
was the Flex standard for AS.

But otherwise, I don't think I saw anything else in the cleanup I didn't
like.

-- 
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui