Enable more ESLint rules for netwerk/
Categories
(Core :: Networking, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox77 | --- | fixed |
People
(Reporter: standard8, Assigned: mbansal, Mentored)
References
(Blocks 1 open bug)
Details
(Keywords: good-first-bug, Whiteboard: [lang=js][necko-triaged])
Attachments
(1 file)
When we first enabled ESLint on netwerk/
, we disabled various rules. This bug is for enabling some more of them, specifically:
- mozilla/consistent-if-bracing
- mozilla/reject-importGlobalProperties
- mozilla/use-default-preference-values
- no-array-constructor
- no-new-wrappers
- no-return-await
- no-sequences
- no-unreachable
- no-useless-return
(although this is a lot of rules, there's only a few failures of each one at most).
To help Mozilla out with this bug, here's the steps:
- Comment here on the bug that you want to volunteer to help. I (or someone else) will assign it to you.
- Download and build the Firefox source code, see the docs for details. An artifact build is all you need.
- If you have any problems, please ask on IRC in the #introduction channel. They're there to help you get started.
- You can also read the Developer Guide, which has answers to most development questions.
- Start working on this bug
- Here's what to do:
- Remove the rules in .eslintrc.js that we want to enable. See the link for details.
- Run eslint
./mach eslint netwerk/
- Fix the issues raised.
- Most of the rules should be reasonably easy to understand, but there's more information on specific bits here and details of the rules here.
- If you're not sure how to fix an issue, feel free to ask here or in #introduction on IRC
- Create a commit of the manual changes:
$ hg commit -m "Bug nnn - Enable more ESLint rules for netwerk/. r?Standard8"
- Post the commits via phabricator. Please use moz-phab to submit them.
- Here's what to do:
- Once the patches are submitted, I'll take a look. If there's any changes necessary I'll comment in Phabricator, so be prepared to update the patches. If there's no changes, I'll request review from a devtools peer, so there may still be more to go.
- If you do need to update the commit, please amend the existing commit, rather than creating new ones. This helps with tracking of review comments.
- Once we're happy with the changes, I'll push it to autoland - our integration branch. Your code will then soon be shipping to Firefox users worldwide!
- Now you get to think about what kind of bug you'd like to work on next. Let me know what you're interested in and I can help you find your next contribution.
Updated•5 years ago
|
Reporter | ||
Comment 2•5 years ago
|
||
Hi Ryan, thank you for offering, I've assigned it to you. Please start working on it, and ask questions if you need to.
Thanks Mark, I've gotten started on it. I've built Firefox so I'm working through step 3 now.
Reporter | ||
Comment 4•5 years ago
|
||
Hi Ryan, how are you getting on, do you need any help?
Hi Mark, my sincere apologies for the delay. I have made some progress and I do intend to finish this, but I've been swamped with schoolwork in the past month. I'm hoping to get this done by the end of next week.
Reporter | ||
Comment 6•5 years ago
|
||
(In reply to Ryan Apilado from comment #5)
Hi Mark, my sincere apologies for the delay. I have made some progress and I do intend to finish this, but I've been swamped with schoolwork in the past month. I'm hoping to get this done by the end of next week.
No problem, schoolwork is important. I was just checking in.
heya!!
Mark, I would love to work on this!!
Can I take this up ?
Thanks
Mahak :)
Reporter | ||
Comment 8•5 years ago
|
||
Ok, I attempted to contact Ryan last week, but haven't had a response, so I can pass it to you Mahak.
@Thanks for assigning this to me .
I'll submit the patch as soon as possible :)
Thanks
Comment 10•5 years ago
|
||
Note that if we're doing this, it would be nice to include "use strict";
at the top of the JS test files.
There are still a bunch of them that don't have it.
Assignee | ||
Comment 11•5 years ago
|
||
@valentin I think you are talking about these files https://searchfox.org/mozilla-central/rev/fa2df28a49883612bd7af4dacd80cdfedcccd2f6/.eslintrc.js#158-161
Right?
or some other files ?
Assignee | ||
Comment 12•5 years ago
|
||
Comment 13•5 years ago
|
||
Comment 14•5 years ago
|
||
bugherder |
Description
•