1
0
Fork 0
firefox/docs/code-quality/lint/linters/eslint-plugin-mozilla/rules/import-content-task-globals.rst
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

14 lines
645 B
ReStructuredText

import-content-task-globals
===========================
For files containing ContentTask.spawn, SpecialPowers.spawn, and
SpecialPowers.spawnChrome calls, this will automatically declare
the frame script variables in the global scope. By default the configs only
specify it for the mochitest based configurations.
This saves setting the file as a mozilla/frame-script environment.
Note: due to the way ESLint works, it appears it is only easy to declare these
variables on a file global scope, rather than function global. This may mean that
they are incorrectly allowed, but given they are test files, this should be
detected during testing.