use mozilla/reject-some-requires rule in devtools/client/sourceeditor/

RESOLVED FIXED in Firefox 51

Status

enhancement
P1
normal
RESOLVED FIXED
3 years ago
Last year

People

(Reporter: tromey, Assigned: tromey)

Tracking

unspecified
Firefox 51
Dependency tree / graph
Bug Flags:
qe-verify -

Firefox Tracking Flags

(firefox51 fixed)

Details

(Whiteboard: [reserve-html])

Attachments

(1 attachment)

Assignee

Description

3 years ago
We should use the mozilla/reject-some-requires eslint rule in
devtools/client/sourceeditor/ in order to ensure its continuing
"content-ready" cleanliness.
Iteration: --- → 51.1 - Aug 15
Flags: qe-verify-
Priority: -- → P1
Whiteboard: [devtools-html] → [reserve-html]
Comment on attachment 8778300 [details]
Bug 1292591 - use reject-some-requires eslint rule in sourceeditor;

https://reviewboard.mozilla.org/r/69612/#review66764

Thanks for doing this!

::: devtools/client/sourceeditor/css-autocompleter.js:61
(Diff revision 1)
>  
>  // Autocompletion types.
>  
>  const CSS_STATES = {
>    "null": "null",
> -  property: "property",    // foo { bar|: … }
> +  // foo { bar|: … }

Can we disable the inline comment for the STATES? This really hurts readability. I'd prefer to disable the rule and have more readable code.

::: devtools/client/sourceeditor/debugger.js:336
(Diff revision 1)
>    setBreakpointCondition, removeBreakpointCondition, getBreakpoints, removeBreakpoints,
>    setDebugLocation, getDebugLocation, clearDebugLocation, find, findNext,
>    findPrev
> -].forEach(func => module.exports[func.name] = func);
> +].forEach(func => {
> +  module.exports[func.name] = func;
> +  return func;

Array.prototype.forEach won't do anything with returned values, so the return should probably be removed.
Attachment #8778300 - Flags: review?(gtatum) → review+
Assignee

Comment 3

3 years ago
Comment on attachment 8778300 [details]
Bug 1292591 - use reject-some-requires eslint rule in sourceeditor;

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/69612/diff/1-2/

Comment 4

3 years ago
Pushed by ttromey@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2a23e8874154
use reject-some-requires eslint rule in sourceeditor; r=gregtatum

Comment 5

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/2a23e8874154
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 51

Updated

Last year
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.