From 41b70cb468f888f0faeaf8073883a4dda2b92a6a Mon Sep 17 00:00:00 2001 From: Yongmin Hong Date: Fri, 14 Jun 2024 19:41:11 +0900 Subject: [PATCH] npm(prettier-config): add README/author data, make prettier `peerDependency` Summary: Bump to 0.0.2. For easier browsing... Signed-off-by: Yongmin Hong Test Plan: `arc land`, and `npm publish` Reviewers: O1 revi & automations, revi Reviewed By: O1 revi & automations, revi Differential Revision: https://issuetracker.revi.xyz/D310 --- npm/prettier-config/README.md | 37 ++++++++++++++++++++++++++ npm/prettier-config/package.json | 20 +++++++++----- npm/prettier-config/prettier.config.js | 1 + 3 files changed, 51 insertions(+), 7 deletions(-) create mode 100644 npm/prettier-config/README.md diff --git a/npm/prettier-config/README.md b/npm/prettier-config/README.md new file mode 100644 index 0000000..c03bb48 --- /dev/null +++ b/npm/prettier-config/README.md @@ -0,0 +1,37 @@ +# @revi/prettier-config + +This is [@revi](https://revi.xyz/)'s personal [prettier](https://prettier.io/docs/en/) config. + +## Config + +```js +const config = { + bracketSpacing: false, + bracketSameLine: true, + proseWrap: 'preserve', + singleQuote: true, + trailingComma: 'all', + overrides: [ + { + files: '.arcconfig', + options: {parser: 'json'}, + }, + { + files: '.arclint', + options: {parser: 'json'}, + }, + { + files: '.arcunit', + options: {parser: 'json'}, + }, + { + files: '.imgbotconfig', + options: {parser: 'json'}, + }, + { + files: '.yamllint', + options: {parser: 'yaml'}, + }, + ], +}; +``` diff --git a/npm/prettier-config/package.json b/npm/prettier-config/package.json index 124ca61..f1c188c 100644 --- a/npm/prettier-config/package.json +++ b/npm/prettier-config/package.json @@ -1,15 +1,24 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "@revi/prettier-config", - "version": "0.0.1", + "version": "0.0.2", + "author": { + "name": "revi", + "email": "revi@omglol.email", + "url": "https://revi.xyz" + }, "description": "@revi's prettier configs", "main": "prettier.config.js", - "dependencies": { + "peerDependencies": { "prettier": "^3.3.2" }, + "scripts": { + "p:c": "prettier --check" + }, "repository": { "type": "git", - "url": "git+https://github.com/revi/sandbox/blob/master/npm-prettier-config" + "url": "https://github.com/revi/sandbox.git", + "directory": "npm/prettier-config" }, "bugs": { "url": "https://revi.xyz/new" @@ -18,9 +27,6 @@ "prettier" ], "type": "module", - "scripts": { - "p:c": "prettier --check" - }, - "author": "revi", + "funding": "https://github.com/sponsors/revi", "license": "Apache-2.0" } diff --git a/npm/prettier-config/prettier.config.js b/npm/prettier-config/prettier.config.js index 8fa7554..ac62646 100644 --- a/npm/prettier-config/prettier.config.js +++ b/npm/prettier-config/prettier.config.js @@ -7,6 +7,7 @@ * @license Apache-2.0 */ +// Update README.md when you update the config. const config = { bracketSpacing: false, bracketSameLine: true,