Closed Bug 1240167 Opened 8 years ago Closed 8 years ago

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

Categories

(Testing :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: tromey, Unassigned)

References

Details

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.
Blocks: 1240183
One workaround is to use /* exports ... */ for each exported definition.
Maybe this is sufficient.
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: 8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.