Open Bug 1699234 Opened 3 years ago Updated 2 years ago

Evaluate adding a new webextension-api-script environment to eslint-plugin-mozilla

Categories

(Developer Infrastructure :: Lint and Formatting, task)

Tracking

(Not tracked)

People

(Reporter: rpl, Unassigned, NeedInfo)

References

Details

This issue is a followup task related to Bug 1698158 (see Bug 1698158 comment 8 and comment 9) aiming to help "webextensions api scripts" developers to avoid (or at least reduce the chances) to trigger issues like Bug 1697404.

There are some caveats to consider:

  • the list of globals may change between Firefox versions (e.g. In Firefox >= 88 we will now provide Services as a global already available, but that isn't the case for Firefox <= 88) and so privileged extensions with an experimental API developer out of the tree would become incompatible with older versions if the linting error suggest them to just remove the re-defined global without warning them about which is the first Firefox release to provide that global by default to all the webextensions API scripts

  • the full list of the globals available is different based on which process the API script is running into and which build the API script is meant to be build for (e.g. desktop vs mobile), as now described in a bit more detail at https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/basics.html#globals-available-in-the-api-scripts-global (one option may be to have separate environments that covers the different cases and inherits from the a common base environment the common ones, e.g. webextension-api-script-common, webextension-api-script-toolkit-child/webextension-api-script-toolkit-parent, webextension-api-script-desktop and webextension-api-script-android)

Needinfo-ing myself to look into this in a bit more detail and describe a more concrete plan for the new proposed environments.

Flags: needinfo?(lgreco)
See Also: → 1698158, 1697404
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.