-
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added configuration option to choose between metric and imperial units. #143
base: main
Are you sure you want to change the base?
Conversation
… of metric when locale is set to en-US
…e map popups to use the chosen unit types.
Fixes #103 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Please run npm run format:js
and npm run format:md
after making these changes :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still not formatted
I don't usually work with node so I didn't have npm set up on my machine. I was using the docker compose --build option to build to avoid needing npm. I did just try installing npm but that added 290 packages to my machine... it then expected eslint and a command called "prettier" to also be installed. I installed eslint but then it complains it cannot find my eslint config file: Looks like there's one in the root folder but the npm run format:js expects to find it under src? I could run eslint directly and add the -c flag maybe, but then why did I need to install all those npm packages? However: I have never heard of "prettier" and it doesn't seem to be available in standard apt repos:
So i googled it and apparently I need to install this through npm itself according to https://prettier.io/docs/en/install.html - But then it complains:
Seems the version of npm that ships with my version of Ubuntu (22.04) is only 8.5.1. Bottom line: It's very unlikely that I'm going to have a working npm environment anytime soon so hopefully running these npm format commands is not critical... |
You need this:
It is, I won't merge the PR without it (and should set up CI that fails in that case). |
It still doesn't work after doing npm install -
This is an awful lot of trouble for a linter. What formatting is off? Can't I just fix it by hand? I did make a conscious effort to try to match the formatting of the rest of the code, copying other blocks and using them as templates, etc. |
Sounds like your Node.js is older than v16 (which is quite old) where |
Right, because like I said: I'm not a Node.js dev. I didn't have Node.js installed at all prior to you asking me to run those format commands. I literally just ran After a ton of googling and trying different install methods I finally managed to get Node and npm working. I just pushed the changes after running the format commands. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this work so far, I'll test this locally later today and tomorrow and make tweaks if necessary :)
Added configuration option to choose between metric and imperial units. Added section to config.md documenting this new flag as well.