Running npm test from mc causes missing lint rule errors
Categories
(Firefox :: Messaging System, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox71 | --- | fixed |
People
(Reporter: k88hudson, Assigned: standard8)
References
Details
Attachments
(1 file)
Running npm test --prefix browser/components/newtab from the root of MC fails because it appears to be missing packages, even after npm installing. No lint errors show up from mach lint. Output looks like this:
...browser/components/newtab/test/xpcshell/test_AboutNewTabService.js
1:1 error Definition for rule 'mozilla/prefer-boolean-length-check' was not found mozilla/prefer-boolean-length-check
Comment 1•6 years ago
|
||
Bug 1578190 adding prefer-boolean-length-check landed without changing eslint-plugin-mozilla from 2.1.0, which is still the latest published package from 2 months ago.
Comment 2•6 years ago
|
||
I suppose more from bug 1578683 turning it on for browser/
Comment 3•6 years ago
|
||
Looks like we can add "mozilla/prefer-boolean-length-check": 0 to browser/components/newtab/.eslintrc and it'll ignore the rule from activity-stream and mozilla-central repositories (even though in the former, it doesn't even know about the rule).
Comment 4•6 years ago
|
||
(In reply to Ed Lee :Mardak from comment #1)
Bug 1578190 adding
prefer-boolean-length-checklanded without changing eslint-plugin-mozilla from 2.1.0, which is still the latest published package from 2 months ago.
I expect we should fix this either way - Mark?
| Assignee | ||
Comment 5•6 years ago
|
||
Ah yes, I'd forgotten about the possible effects on newtab code when we originally enabled it, and I thought adding to just the top-level we'd get away with it.
So I'm just about to attach a patch to set it as default in recommended.js, and disable the other directories where it fails. I'll also bump the versions at the same time so we can publish a new one.
It also reminds me to suggest to Monika that we can probably now enable it for more directories as well :-)
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Comment 6•6 years ago
|
||
Comment 8•6 years ago
|
||
| bugherder | ||
| Assignee | ||
Comment 9•6 years ago
|
||
I've just published 2.2.0.
Description
•