build: add JS formatting commands

This commit is contained in:
Ben Goldsworthy 2021-04-15 03:20:58 +01:00
parent 2cff59f28c
commit d7a372ae2b
3 changed files with 14 additions and 0 deletions

View file

@ -1,5 +1,9 @@
{
"scripts": {
"format": "npm run format:js",
"format:fix": "npm run format:js:fix",
"format:js": "prettier --config .prettierrc './js/*.js'",
"format:js:fix": "npm run format:js -- --write",
"lint": "npm run lint:js && npm run lint:css",
"lint:fix": "npm run lint:js:fix && npm run lint:css:fix",
"lint:js": "eslint \"./js/*.js\"",