This is an Easy Hack.
Potential mentors: @mrkara
eslint
is an npm
package for identifying and reporting on patterns found in ECMAScript/JavaScript code and the version we have (3.0.0
, specified in loleaflet/package.json) is a bit outdated. So let's update it to 4.0.0
at least for now.
Follow the instructions on the forum to send your first pull request. And consider the instructions below fits into the Do you changes, rebuild & test etc.
step.
You need to first, find this line in loleaflet/package.json
:
and change it to look like this:
Then issue this command so that the new version of the package will be downloaded, along with its dependencies, and a new check on the source code is trigerred:
make clean && make -j `nproc`
The command above might take a few minutes or more depending on the power of your PC. In the meantime, read through the
guide: Migrating to v4.0.0
The command above should end with something similar to this:
![eslint-errors](https://user-images.githubusercontent.com/9937631/95518500-da468d80-09cb-11eb-8c1d-15141ce35f27.png)
As you see, most (or all?) are indentation errors, which can be easily fixable by running eslint with the --fix
option. So run it on the listed files, one by one (I'll take file AdminSocketAnalytics.js
as an example. Change it to fit the file you would like to fix.):
./loleaflet/node_modules/eslint/bin/eslint.js --fix loleaflet/admin/src/AdminSocketAnalytics.js
After fixing each file, check the diff to make sure it looks all okay:
When you are done with all of the listed files, make sure the code builds without errors now:
make clean && make -j `nproc`
Even better, run it, and connect to it via your browser to verify all looks okay:
If you are satisfied with the results. Then commit your changes, push the commit to your forked repo, and create a pull request via web interface. :)