Alias: android-linting → android-jshint
Depends on: 939344
Depends on: 939347
Depends on: 939350
I think the devtools folks use jshint with their code, it might be worth talking to them about how they've incorporated that, if you haven't already.
(In reply to :Margaret Leibovic from comment #1) > I think the devtools folks use jshint with their code, it might be worth > talking to them about how they've incorporated that, if you haven't already. Oh, I just saw you reference that in bug 939347 :D
I asked a few other teams how they use linters: * devtools uses jshint but does not enforce its usage (see comment 0 ). They would be interested in a system like we're building * gaia uses both gjshint and jshint and strictly enforces its usage via their continuous integration system . They also have a pre-commit hook  which prevents violating code from being committed in the first place. They manage the jshint dependency through npm and gjshint seems to be installed by hand (looking at the source of ). I examined the pdfjs repo  who also appear to use jshint (it's a dependency in their package.json). I imagine their setup is similar to gaia's. : https://travis-ci.org/mozilla-b2g/gaia/builds : https://github.com/mozilla-b2g/gaia/blob/master/tools/pre-commit : https://github.com/mozilla/pdf.js
(In reply to Michael Comella (:mcomella) from comment #0) > JSHint looks like a good choice of linter as it already supports Mozilla > specific extensions via the "moz" configuration variable . > > : http://jshint.org/docs/options/#moz I've been playing with JSHint with some /toolkit/ and /browser/ code too. Turns out we don't actually want the 'moz' option - as you can't have both that and the 'esnext' option (for ES6) enabled at the same time. From my experience, the ES6 support is far more useful - there's a small number of classes of edge-cases that aren't handled by not having 'moz', but they should be evaporating as SpiderMonkey gets better support for ES6 and we can port our code over to that.
You might look as eslint, since it has great es6 support, and it allows you to write plugins to enforce local conventions.
Alias: android-jshint → android-jslint
Depends on: 1170804
Depends on: 1177774
Depends on: 1177901
Depends on: 1177904
Depends on: 1177933
Depends on: 1180343
Depends on: 1185578
Depends on: 1229433
Depends on: 1229434
Depends on: 1178739
You need to log in before you can comment on or make changes to this bug.