Helping Mozilla firefox with enabling ESLint

It was an amazing experience contributing to Mozilla Firefox.
The bug that I worked on: here.
For new developers to help with enabling ESLint with FireFox here are the steps that I took (Window user) assuming you already have a bug assigned to you:
  1. Follow Mozilla Build to download and get the "Required tools" and stop at "Getting the source"
  2. Download Mercurial.
  3. Continue with Getting the Source and stop at "Build FireFox!" it's not really needed when fixing ESLint bugs and saves some time.
  4. Remove your <directory path> from `.eslintignore`.
  5. Run `./mach eslint --fix <directory path>` this will run ESLint only for the specific directory you are fixing.
Note: I was told to commit 2 versions: An automatic change version and a manual change version.
     6.  So at this point I did `hg commit -m "Enable ESLint for <directory path> (automatic changes)"`

Since I was told I needed 2 commits I wanted to push my automatic changes before doing the manual changes so I tried hg push and I got an error apparently we should be using moz-phab to push changes.

     7. Some more setup. Download moz-phab zip. You will also need arcanist.
Note: Another part that I got stuck on was in arcanist, for step 3 it says "Copy php.ini-development to php.ini in that same directory" this just mean rename the "php.ini-development" file to "php.ini"
     
     8. Before you get into "Configuring arcanist" step 12 of arcanist. Test arc command by typing `arc help` in prompt to see if arc is in your environment.

Note: You will need "arc" and "moz-phab" and "PHP" in your system environment variable.
Note: After you copy the bin path in your computer environment variable you will need to restart your computer for it to work.

Luckily for me, Julia told me when I do moz-phab submit it will push all my commits at once.

    9. At this point just put the arcanist and moz-phab on hold and start fixing the ESLint errors. You will thank me for this.

   10. Once you finish fixing ESLint errors with ./mach eslint <directory path>. Do another commit for manual changes: `hg commit -m "Enable ESLint for <directory path> (manual changes)"`
   
   11. Now you can get back to Configuring arcanist. You will need an authenticator connected to Bugzilla.

  12. Lastly run: python <Your path/moz-phab>. This will ask if you want to submit and if you type "yes" it will automatically push for you.

This is the final result I got at the end: 


Special thanks to David for connecting me to other members that were working on this, and Mark Banner, Julia, Shreena and Adam for helping me with ESLint errors.

Comments

Popular posts from this blog

My third Hacktoberfest 2018 Journey

Contributing to 2048 Repo cont'd