Closed Bug 1501621 Opened 2 years ago Closed 2 years ago

Enable ESLint for netwerk/dns/ and netwerk/protocol/

Categories

(Core :: Networking, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: standard8, Assigned: mkohler, Mentored)

References

Details

(Keywords: good-first-bug, Whiteboard: [lang=js][necko-triaged])

Attachments

(2 files, 1 obsolete file)

As part of rolling out ESLint across the tree, we should enable it for the netwerk/dns/ and netwerk/protocol/ directories.

I'm happy to mentor this bug. There's background on our eslint setups here:

https://developer.mozilla.org/docs/ESLint

Please note: We want to end up with two separate commits. One with the automatic changes, the second with the manual changes. It helps with reviewing if these appear as a commit series in phabricator.

Here's some approximate steps:

- In .eslintignore, remove the `netwerk/dns/**` and `netwerk/protocol/**` lines.

- Run eslint:

./mach eslint --fix netwerk

This should fix most/all of the issues.

- Inspect the diff to make sure that the indentation of the lines surrounding the changes look ok.

- Create a commit of the work so far, e.g.

$ hg commit -m "Bug nnn - Enable ESLint for netwerk/dns/ and netwerk/protocol/ (automatic changes)" netwerk/

- For the remaining issues, you'll need to fix them by hand. Most of those should be reasonably easy to understand, but there's more information on some specific bits (especially no-undef) here:

https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/ESLint#Common_issues_and_how_to_solve_them
http://eslint.org/docs/rules/

(you can just run `./mach eslint netwerk` to check you've fixed them).

- Create a second commit of the manual changes, e.g.

$ hg commit -m "Bug nnn - Enable ESLint for netwerk/dns/ and netwerk/protocol/ (manual changes)"

- Post the two commits via phabricator: https://moz-conduit.readthedocs.io/en/latest/phabricator-user.html
When you post, please request initial review from myself (`standard8`), I'll then redirect to the owners of the code if the changes look good.
I'm down to one error, will finish that tomorrow evening and push a review.
Assignee: nobody → me
Status: NEW → ASSIGNED
Priority: -- → P3
Whiteboard: [lang=js] → [lang=js][necko-triaged]
Bug 1501621 - Enable ESLint for netwerk/dns/ and netwerk/protocol/ (manual changes)
Attachment #9020091 - Attachment is obsolete: true
Attachment #9021901 - Attachment description: Bug 1501621 - Enable ESLint for netwerk/dns/ and netwerk/protocol/ (manual changes) Depends on D10590 → Bug 1501621 - Enable ESLint for netwerk/dns/ and netwerk/protocol/ (manual changes)
Attachment #9020091 - Attachment is obsolete: false
Attachment #9020091 - Attachment is obsolete: true
Attachment #9021896 - Attachment description: Bug 1501621 - Enable ESLint for netwerk/dns/ and netwerk/protocol/ (automatic changes) → Bug 1501621 - Enable ESLint for netwerk/dns/ and netwerk/protocol/ (automatic changes) r=Standard8,dragana
Attachment #9021901 - Attachment description: Bug 1501621 - Enable ESLint for netwerk/dns/ and netwerk/protocol/ (manual changes) → Bug 1501621 - Enable ESLint for netwerk/dns/ and netwerk/protocol/ (manual changes) r=Standard8,dragana
Keywords: checkin-needed
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e9f6807ef4a0
Enable ESLint for netwerk/dns/ and netwerk/protocol/ (automatic changes) r=dragana,Standard8
https://hg.mozilla.org/integration/autoland/rev/a140c44db41d
Enable ESLint for netwerk/dns/ and netwerk/protocol/ (manual changes) r=dragana,Standard8
Keywords: checkin-needed
Michael: Just so you know, you don't need to re-title the attachments, Lando adds the r= for us if it isn't already specified (and makes sure it is correct - in this case it actually changed the order!).
Thank you for working on this, great to get these enabled.
https://hg.mozilla.org/mozilla-central/rev/e9f6807ef4a0
https://hg.mozilla.org/mozilla-central/rev/a140c44db41d
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in before you can comment on or make changes to this bug.