<div dir="ltr">Sorry, wrong patch. That one added the style requirement to the project contribution guidelines. This is the one that added the .jscsrc config:<br><br><a href="https://review.openstack.org/#/c/185725/">https://review.openstack.org/#/c/185725/</a><br></div><br><div class="gmail_quote"><div dir="ltr">On Tue, 16 Jun 2015 at 14:21 Richard Jones <<a href="mailto:r1chardj0n3s@gmail.com">r1chardj0n3s@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>JSCS in Horizon has been extended with the John Papa style guidelines to enforce consistent angularjs code style*. It's no longer just a findbug tool. I don't have time to investigate - can ESLint perform the same role for Horizon?<br></div><div><br></div><div>Current Horizon activity involves a whole lot of bringing code into line with that style (and other JSCS check fails).</div><div><br></div><div><br></div><div>      Richard</div><div><br></div><div>* <a href="https://review.openstack.org/#/c/181311/" target="_blank">https://review.openstack.org/#/c/181311/</a></div></div><div dir="ltr"><div><br><div class="gmail_quote"><div dir="ltr">On Tue, 16 Jun 2015 at 09:40 Michael Krotscheck <<a href="mailto:krotscheck@gmail.com" target="_blank">krotscheck@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I'm restarting this thread with a different subject line to get a broader audience. Here's the original thread:<div><a href="http://lists.openstack.org/pipermail/openstack-dev/2015-June/066040.html" target="_blank">http://lists.openstack.org/pipermail/openstack-dev/2015-June/066040.html</a><br></div><div><br></div><div>The question at hand is "What will be OpenStack's javascript equivalent of flake8". I'm going to consider the need for common formatting rules to be self-evident. Here's the lay of the land so far:</div><div><ul><li>Horizon currently uses JSCS.</li><li>Refstack uses Eslint.</li><li>Merlin doesn't use anything.</li><li>StoryBoard (deprecated) uses eslint.</li><li>Nobody agrees on rules.</li></ul></div><div><b>JSCS</b><br></div><div>JSCS Stands for "JavaScript CodeStyle". Its mission is to enforce a style guide, yet it does not check for potential bugs, variable overrides, etc. For those tests, the team usually defers to (preferred) JSHint, or ESLint.</div><div><br></div><div><b>JSHint</b></div><div>Ever since JSCS was extracted from JSHint, it has actively removed rules that enforce code style, and focused on findbug style tests instead. JSHint still contains the "Do no evil" license, therefore is not an option for OpenStack, and has been disqualified.</div><div><br></div><div><b>ESLint</b></div><div>ESLint's original mission was to be an OSI compliant replacement for JSHint, before the JSCS split. It wants to be a one-tool solution.</div><div><br></div><div>My personal opinion/recommendation: Based on the above, I recommend we use ESLint. My reasoning: It's one tool, it's extensible, it does both codestyle things and bug finding things, and it has a good license. JSHint is disqualified because of the license. JSCS is disqualified because it is too focused, and only partially useful on its own.</div><div><br></div><div>I understand that this will mean some work by the Horizon team to bring their code in line with a new parser, however I personally consider this to be a good thing. If the code is good to begin with, it shouldn't be that difficult.</div><div><br></div><div>This thread is not there to argue about which rules to enforce. Right now I just want to nail down a tool, so that we can (afterwards) have a discussion about which rules to activate.</div><div><br></div><div>Michael</div></div>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</blockquote></div></div></div></blockquote></div>