Closed Bug 1228986 Opened 9 years ago Closed 9 years ago

Investigate enabling eslint for toolkit/components/telemetry/

Categories

(Toolkit :: Telemetry, defect, P3)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1229519
Tracking Status
firefox45 --- affected

People

(Reporter: gfritzsche, Unassigned)

Details

(Whiteboard: [measurement:client])

We have accessible eslint mach support now:
https://mail.mozilla.org/pipermail/firefox-dev/2015-November/003594.html

We should investigate enabling eslint for the Telemetry JSMs.

Probable pain-points:
* Array generators would have to be switched to array.map() or so
* Conditional catch expressions are unsupported
* We'd need to remove any remaining preprocessor usage
* Any additional unsupported features (const, ...?)

This would enable us to:
* run |mach eslint| on our code
* integrate eslint checkers into our editors etc.:
  https://blog.mozilla.org/standard8/2015/05/13/using-eslint-alongside-the-firefox-hello-code-base-to-help-productivity/
* potentially have CI eslinting in the future
(In reply to Georg Fritzsche [:gfritzsche] from comment #0)
> * We'd need to remove any remaining preprocessor usage

This is moot, we are not preprocessing any Telemetry JS files now:
https://dxr.mozilla.org/mozilla-central/source/toolkit/components/telemetry/moz.build
(In reply to Georg Fritzsche [:gfritzsche] from comment #0)
> * Any additional unsupported features (const, ...?)

const and destructuring seem to be fine via language options here:
http://eslint.org/docs/user-guide/configuring#specifying-language-options

I think this leaves us with only generator expression and conditional catch expressions blocking this.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.