Closed Bug 1292591 Opened 4 years ago Closed 4 years ago

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

Categories

(DevTools :: Framework, enhancement, P1)

enhancement

Tracking

(firefox51 fixed)

RESOLVED FIXED
Firefox 51
Iteration:
51.1 - Aug 15
Tracking Status
firefox51 --- fixed

People

(Reporter: tromey, Assigned: tromey)

References

Details

(Whiteboard: [reserve-html])

Attachments

(1 file)

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+
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/
Pushed by ttromey@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2a23e8874154
use reject-some-requires eslint rule in sourceeditor; r=gregtatum
https://hg.mozilla.org/mozilla-central/rev/2a23e8874154
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 51
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.