Closed
Bug 1230095
Opened 10 years ago
Closed 10 years ago
The import-headjs-globals eslint custom rule doesn't work when ran with ./mach eslint
Categories
(Testing :: General, defect)
Testing
General
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1229859
People
(Reporter: pbro, Unassigned)
Details
(note that bug 1230093 first needs to be fixed).
If you integrate eslint in, say, sublime text [1], then the rule works fine in the editor.
But if you then try to run eslint from mach: ./mach eslint devtools/client/inspector/test/browser_inspector_navigation.js
it will report errors because of the way this custom rule gets paths for the head.js file.
If however you cd into the directory first it will work fine:
cd devtools/client/inspector/test/
../../../../mach eslint browser_inspector_navigation.js
[1] https://wiki.mozilla.org/DevTools/CodingStandards
| Reporter | ||
Comment 1•10 years ago
|
||
The difference is:
- when running eslint from mach, then process.cwd() is /path/to/repo/
- while, when running from inside an editor, process.cwd() is /path/to/repo/devtools/client/inspector/test/
| Reporter | ||
Comment 2•10 years ago
|
||
Turns out I'm fixing this with a new rule I'm introducing in bu 1229859.
You need to log in
before you can comment on or make changes to this bug.
Description
•