diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..7771772 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,7 @@ +# Ignore artifacts: +dist +coverage + +*.yaml +*.yml +.pnpm-store diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..db5b63f --- /dev/null +++ b/.prettierrc @@ -0,0 +1,6 @@ +{ + "printWidth": 80, + "tabWidth": 2, + "trailingComma": "all", + "useTabs": false +} diff --git a/package.json b/package.json index 2f9d8ed..4f8a14e 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,9 @@ "main": "dist/main.js", "scripts": { "build": "tsc", - "start": "pnpm run build && node dist/main.js" + "start": "pnpm run build && node dist/main.js", + "lint": "prettier --check .", + "format": "prettier --write ." }, "dependencies": { "dotenv": "^16.4.5", @@ -13,6 +15,7 @@ }, "devDependencies": { "@types/express": "^5.0.0", + "prettier": "^3.3.3", "typescript": "^5.6.3" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e02a668..4698365 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,6 +18,9 @@ importers: '@types/express': specifier: ^5.0.0 version: 5.0.0 + prettier: + specifier: ^3.3.3 + version: 3.3.3 typescript: specifier: ^5.6.3 version: 5.6.3 @@ -246,6 +249,11 @@ packages: path-to-regexp@0.1.10: resolution: {integrity: sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==} + prettier@3.3.3: + resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==} + engines: {node: '>=14'} + hasBin: true + proxy-addr@2.0.7: resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} engines: {node: '>= 0.10'} @@ -567,6 +575,8 @@ snapshots: path-to-regexp@0.1.10: {} + prettier@3.3.3: {} + proxy-addr@2.0.7: dependencies: forwarded: 0.2.0