Dev - Use "npm run validate" to validate javascript with prettier and eslint.

This commit is contained in:
Reformed Hamster 2023-02-13 06:22:48 +00:00 committed by Nvlbl Nm
parent f569deb365
commit 3c32c3c375
4 changed files with 22 additions and 0 deletions

14
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,14 @@
## Developing for Planner
In order to develop for planner ensure you have node version 18 installed as a prerequisite. https://nodejs.org/en/
1. Open up a terminal/cmd and go to the root of the project
2. Run `npm install` to install the necessary packages to validate js.
3. Now you can simply run `npm run validate`
4. Output should look similar to below for both.
<img src="/assets/developer_output.png"></img>
Once you've committed you changes, open a Merge Request! Please include a description of what your change does, and as applicable, a screenshot of what your changes look like.
## I clicked "Request Access", why don't I have it yet?
How about you start by opening some Merge Requests? You don't need any access you don't already have to either use this plugin or contribute to its development!

View File

@ -120,3 +120,8 @@ I suggested to provide patches to the original version in order to fix some issu
5. Allow to remove candidates from the map.
6. Layout improvements to the edit dialog.
7. Anything that comes after renaming it to "Wayfarer planner." https://gitlab.com/NvlblNm/wayfarer/commits/master
## I want to help!
Awesome, check out [CONTRIBUTING](CONTRIBUTING.md) to get started!

BIN
assets/developer_output.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

View File

@ -1,4 +1,7 @@
{
"scripts" : {
"validate": "npx eslint --format gitlab --fix *.js && npx prettier --write *.js && npx prettier --check *.js"
},
"dependencies": {
"eslint-config-standard": "^17.0.0",
"prettier": "^2.8.3"