From 02b692f1cf751336ee5a0123b90c72968725d77e Mon Sep 17 00:00:00 2001 From: Jiahao Guo Date: Fri, 10 Nov 2023 11:41:29 +0800 Subject: [PATCH] chore: configure Prettier for project part 1/2 of #17 --- .prettierignore | 1 + package.json | 6 +++++- pnpm-lock.yaml | 21 +++++++++++++++++++++ prettier.config.cjs | 1 + 4 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 .prettierignore create mode 100644 prettier.config.cjs diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..eeeb7be --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +pnpm-lock.yaml \ No newline at end of file diff --git a/package.json b/package.json index 78c93cd..7aa5754 100644 --- a/package.json +++ b/package.json @@ -18,12 +18,16 @@ "url": "https://github.com/RightCapitalHQ/renovate-config/issues" }, "scripts": { + "lint": "prettier -c .", + "fix": "prettier -w .", "validate": "renovate-config-validator default.json", "test": "pnpm run validate", "prepare": "pnpm run test" }, "devDependencies": { + "@rightcapital/prettier-config": "6.0.4", + "prettier": "3.0.3", "renovate": "latest" }, "packageManager": "pnpm@8.10.2" -} \ No newline at end of file +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c6bea9a..6207e9a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,6 +5,12 @@ settings: excludeLinksFromLockfile: false devDependencies: + '@rightcapital/prettier-config': + specifier: 6.0.4 + version: 6.0.4(prettier@3.0.3) + prettier: + specifier: 3.0.3 + version: 3.0.3 renovate: specifier: latest version: 37.42.0(typanion@3.14.0) @@ -1553,6 +1559,15 @@ packages: engines: {node: ^18.12.0 || >= 20.0.0, pnpm: ^8.6.11} dev: true + /@rightcapital/prettier-config@6.0.4(prettier@3.0.3): + resolution: {integrity: sha512-1EFZMH71nZM6bb6zOz8SzLalVZl/8iKOYNuuIr4uy26ZJKsQDhEuwUePvmH7dIp4AS124uHlYOKW2Zf+x/sGsw==} + engines: {node: '>=16.0.0'} + peerDependencies: + prettier: ^3.0.0 + dependencies: + prettier: 3.0.3 + dev: true + /@seald-io/binary-search-tree@1.0.3: resolution: {integrity: sha512-qv3jnwoakeax2razYaMsGI/luWdliBLHTdC6jU55hQt1hcFqzauH/HsBollQ7IR4ySTtYhT+xyHoijpA16C+tA==} dev: true @@ -4562,6 +4577,12 @@ packages: hasBin: true dev: true + /prettier@3.0.3: + resolution: {integrity: sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==} + engines: {node: '>=14'} + hasBin: true + dev: true + /pretty-bytes@5.6.0: resolution: {integrity: sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==} engines: {node: '>=6'} diff --git a/prettier.config.cjs b/prettier.config.cjs new file mode 100644 index 0000000..fa5f7c7 --- /dev/null +++ b/prettier.config.cjs @@ -0,0 +1 @@ +module.exports = require('@rightcapital/prettier-config');