need eslint rule to mark top-level head.js definitions as used

RESOLVED WONTFIX

Status

defect
RESOLVED WONTFIX
4 years ago
4 years ago

People

(Reporter: tromey, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Reporter

Description

4 years ago
While trying to make a devtools directory eslint-clean, I noticed
many warnings coming from a test directory's head.js file.
In particular, many top-level definitions in this file trigger the
no-unused-var warning.

I think it would be good to have a special rule for head.js (and similar,
see bug 1240163) that marks the top-level definitions as used.
While it would be possible to disable the no-unused-var warning in these files,
it would be nicer to have a custom rule to minimize the damage.
Reporter

Updated

4 years ago
Blocks: 1240183
Reporter

Comment 1

4 years ago
One workaround is to use /* exports ... */ for each exported definition.
Maybe this is sufficient.
Reporter

Comment 2

4 years ago
We discussed on irc and agreed that head.js files should just have:

/* eslint no-unused-vars: [2, {"vars": "local"}] */

So I think this bug is obsolete.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.