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!
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to