Re: Proposal: document and enforce style of all files (including JS, CSS, HTML)

2014-04-17 Thread Carl Meyer
On 04/16/2014 07:08 PM, Russell Keith-Magee wrote:

> Sounds like a reasonable proposal to me. Our JavaScript code has…
> evolved, shall we say… over the years. We've recently started enforcing
> Flake8 compliance on our Python codebase; adopting similar rigour for
> our JavaScript code would seem appropriate.
> 
> The only open question I can see is the choice of linter -- I don't have
> any firm opinions; I'd be interested if others agree with jshint as a
> good choice.

Yes, jshint is the right choice I think.

Thanks Trey for working on this!

Carl

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/53500B21.6060006%40oddbird.net.
For more options, visit https://groups.google.com/d/optout.


Re: Proposal: document and enforce style of all files (including JS, CSS, HTML)

2014-04-16 Thread Russell Keith-Magee
Hi Trey,

Sounds like a reasonable proposal to me. Our JavaScript code has… evolved,
shall we say… over the years. We've recently started enforcing Flake8
compliance on our Python codebase; adopting similar rigour for our
JavaScript code would seem appropriate.

The only open question I can see is the choice of linter -- I don't have
any firm opinions; I'd be interested if others agree with jshint as a good
choice.

Yours,
Russ Magee %-)



On Thu, Apr 17, 2014 at 5:37 AM, Trey Hunner  wrote:

> The JavaScript files use 4 spaces, 2 spaces, or tabs (depending on the
> file).  The CSS files use mostly 4 spaces, and the HTML files use mostly 2
> spaces and sometimes 4 spaces.
>
> The JavaScript code is unlinted and the general code style is neither
> documented nor enforced.  I think jshint should be used for JavaScript
> linting and to help clean up the JavaScript code.  It should also be built
> into the test process (via running "jshint .").  Optionally, it could also
> be run automatically through tox or a fabric/invoke/grunt configuration.
>
> I opened a ticket and pull request related to this issue:
> https://code.djangoproject.com/ticket/22463#comment:2
>
> Based on the errors I've seen in the JavaScript code so far, I think a
> code review may be sufficient for ensuring that the changed files continue
> to work as expected.
>
> --
> Trey Hunner
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to django-developers@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/CACuWcAwrCq_q4%2BFkKOVU5nqokSSgM7wqzXPbo%2BKJh0U%3DY1ecVA%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAJxq849rG_D6vVkbCW2ntbSosw-yB_c2L%3DJPdQQD8HjgJ9Y0CQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Proposal: document and enforce style of all files (including JS, CSS, HTML)

2014-04-16 Thread Trey Hunner
The JavaScript files use 4 spaces, 2 spaces, or tabs (depending on the
file).  The CSS files use mostly 4 spaces, and the HTML files use mostly 2
spaces and sometimes 4 spaces.

The JavaScript code is unlinted and the general code style is neither
documented nor enforced.  I think jshint should be used for JavaScript
linting and to help clean up the JavaScript code.  It should also be built
into the test process (via running "jshint .").  Optionally, it could also
be run automatically through tox or a fabric/invoke/grunt configuration.

I opened a ticket and pull request related to this issue:
https://code.djangoproject.com/ticket/22463#comment:2

Based on the errors I've seen in the JavaScript code so far, I think a code
review may be sufficient for ensuring that the changed files continue to
work as expected.

-- 
Trey Hunner

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CACuWcAwrCq_q4%2BFkKOVU5nqokSSgM7wqzXPbo%2BKJh0U%3DY1ecVA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.