I've additionally filed
https://bugzilla.mozilla.org/show_bug.cgi?id=1229106 to get an
ESLint-powered mozreviewbot[1] written.

[1]: An automated reviewing bot that bug 1196263 added infrastructure for.

On 30/11/2015 2:13 PM, Dave Townsend wrote:
> Over in https://bugzilla.mozilla.org/show_bug.cgi?id=1229097 I'm
> proposing a default set of rules that browser and toolkit code should
> aspire to. It's based on flagging obvious mistakes and things that
> will confuse and then following what I've seen to be the rough
> consensus coding style we use.
> 
> It's not intended to be fixed rules that all code must follow, just
> general guides that can be overridden on a per-module basis as it
> makes sense. To that end I'd like to keep bike-shedding in there to a
> minimum so please only make comments if you think there is an obvious
> mistake compared with how we want our code to look.
> 
> It's likely we'll land with all these rules disabled anyway and then
> back-off/amend them as we try to get existing code to pass.
> 
> On Fri, Nov 27, 2015 at 2:53 PM, Dave Townsend <dtowns...@mozilla.com> wrote:
>> Thanks to some speedy work by Mark Banner and help from Mike Conley,
>> Felipe Gomes and Gijs Kruitbosch we've now landed the changes to make
>> it possible to run "mach eslint" on any directory in the tree.
>>
>> The default rules for the tree are almost non-existent so this is
>> mostly checking for syntax errors right now. It is also disabled for
>> most directories.
>>
>> Going forwards we'd like to enable it in more directories and turn on
>> more rules. You can help! If there is a directory you work in a lot
>> try removing it from the top-level .eslintignore file and see what
>> fails, then fix it. Mostly it will be simple fixes.
>>
>> For now "mach eslint" at the top level doesn't pass. Both devtools and
>> android have some failures so we'll be wanting to get those fixed. We
>> also know that some of our JS syntax isn't supported by ESLint. Array
>> generators look like they might not be standardized anyway so please
>> switch them to Array.map. For conditional catch expressions we may
>> want to add support to eslint somehow but for now any of those cases
>> will just have to be ignored.
>>
>> We don't really have automation testing this right now but hopefully
>> we will soon. For now you can add support to editors like Sublime to
>> tell you when you're making mistakes:
>> https://blog.mozilla.org/standard8/2015/05/13/using-eslint-alongside-the-firefox-hello-code-base-to-help-productivity/
>>
>> Thanks to everyone who jumped to make this happen today!
> _______________________________________________
> firefox-dev mailing list
> firefox-...@mozilla.org
> https://mail.mozilla.org/listinfo/firefox-dev
> 
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to