Closed Bug 1465476 Opened 6 years ago Closed 6 years ago

Support binary expressions for globals evaluation in ESLint

Categories

(Developer Infrastructure :: Lint and Formatting, enhancement)

3 Branch
enhancement
Not set
normal

Tracking

(firefox62 fixed)

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: standard8, Assigned: standard8)

Details

Attachments

(1 file)

I've just had a report that this doesn't work for defining globals:

XPCOMUtils.defineLazyPreferenceGetter(this, "resetStatus", BROWSER_SEARCH_PREF + "reset.status", "");

The third argument is a binary expression, and our manual handling AST source-reconstruction doesn't cope with that yet. So I'll add a patch for it.

Ideally we should handle template literals as well, but reconstructing those seems a lot harder...
Comment on attachment 8981903 [details]
Bug 1465476 - Support binary expressions for globals evaluation in ESLint.

https://reviewboard.mozilla.org/r/247928/#review255182
Attachment #8981903 - Flags: review?(dtownsend) → review+
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/721c4f5f0fe7
Support binary expressions for globals evaluation in ESLint. r=mossop
https://hg.mozilla.org/mozilla-central/rev/721c4f5f0fe7
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
Version: Version 3 → 3 Branch
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: