Add linting, formatting and pre-commit (#53)

* Add dev-dependancies

* Security update npm packages

* Force audit fix

* Add linting, formatting and precommit

* Format files
This commit is contained in:
E
2024-04-29 13:21:31 +01:00
committed by GitHub
parent 80813d48e3
commit 8449b30401
18 changed files with 4064 additions and 2039 deletions

View File

@@ -12,14 +12,19 @@
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "npx nodemon ./bin/www -e js,pug,sass",
"dev": "npx nodemon ./bin/www -e js,pug,sass",
"start": "npx ./bin/www -e js,pug,sass",
"watch-tailwind": "npx npm-watch",
"build-tailwind": "npx postcss src/tailwind.css -o public/stylesheets/style.css"
"build-tailwind": "npx postcss src/tailwind.css -o public/stylesheets/style.css",
"lint": "prettier --check . && eslint .",
"format": "prettier --write --ignore-path .gitignore .",
"prepare": "husky install"
},
"dependencies": {
"@sendgrid/mail": "^7.4.4",
"@sendgrid/mail": "^8.1.3",
"app-root-path": "^3.0.0",
"axios": "^0.21.3",
"autoprefixer": "^10.3.4",
"axios": "^1.6.8",
"cookie-parser": "^1.4.5",
"express": "^4.17.1",
"express-rate-limit": "^5.2.6",
@@ -28,12 +33,25 @@
"http-errors": "^1.8.0",
"morgan": "^1.10.0",
"nodemailer": "^6.6.1",
"pug": "^3.0.2",
"tailwind-hamburgers": "^1.1.1",
"winston": "^3.3.3",
"autoprefixer": "^10.3.4",
"npm-watch": "^0.11.0",
"postcss-cli": "^8.3.1",
"tailwindcss": "^2.2.15"
"pug": "^3.0.2",
"tailwind-hamburgers": "^1.1.1",
"tailwindcss": "^2.2.15",
"winston": "^3.3.3"
},
"devDependencies": {
"@eslint/js": "^9.1.1",
"eslint": "^9.1.1",
"eslint-config-prettier": "^9.1.0",
"globals": "^15.1.0",
"husky": "^9.0.11",
"lint-staged": "^15.2.2",
"prettier": "^3.2.5",
"prettier-plugin-tailwindcss": "^0.5.14"
},
"lint-staged": {
"*.js": "eslint --cache --fix",
"*.{js,css,md,pug}": "prettier --write"
}
}