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:
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:
- Follow Mozilla Build to download and get the "Required tools" and stop at "Getting the source"
- Download Mercurial.
- Continue with Getting the Source and stop at "Build FireFox!" it's not really needed when fixing ESLint bugs and saves some time.
Remove your <directory path> from `.eslintignore`.- 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.
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
Post a Comment