devtools eslintrc says `require` is available everywhere but that isn't true for tests under that config which confuses eslint
Categories
(Developer Infrastructure :: Lint and Formatting, defect, P5)
Tracking
(Not tracked)
People
(Reporter: Gijs, Unassigned)
References
(Depends on 1 open bug)
Details
I noticed this in working on https://phabricator.services.mozilla.com/D166177 and Mark correctly asked me to file a followup bug to fix it "properly". I'm not quite sure what that'd look like because I don't fully understand which devtools files will have require
available and which won't.
Comment 1•2 years ago
|
||
Can you please detail a little bit the specificity of the issue here?
Comment 2•2 years ago
|
||
devtools' ESLint configuration indicates that loader
and require
are available everywhere in devtools, when they are not.
The no-redeclare-with-import-autofix
rule that Gijs added in bug 1795255 had to have exclusions so that it would not complain about loader
and require
.
I think ideally, we would scope those variables to only the files where they are definitely globals, however that looks a little complex as there's a lot of files. Use of import-globals-from
instead might be possible, but again, there's a lot of files here to be concerned about.
It might also be easier to wait until bug 1525652 is completed, and then clean this up at that time.
At the moment, I don't think this is a high priority. The current situation is not too bad, though we should tidy it up when we can.
Description
•