{"id":17000648,"url":"https://github.com/bokub/prettier-config","last_synced_at":"2025-03-23T17:31:14.637Z","repository":{"id":37844613,"uuid":"293035252","full_name":"bokub/prettier-config","owner":"bokub","description":"💜 My personal Prettier config \u0026 workflow","archived":false,"fork":false,"pushed_at":"2024-09-20T10:58:39.000Z","size":17,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T20:49:50.953Z","etag":null,"topics":["prettier","prettier-config","workflow"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bokub.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-05T08:30:51.000Z","updated_at":"2024-09-20T10:58:42.000Z","dependencies_parsed_at":"2024-01-15T11:08:31.232Z","dependency_job_id":"2faec35b-99cb-4d9c-838b-b0ee7e32c368","html_url":"https://github.com/bokub/prettier-config","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bokub%2Fprettier-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bokub%2Fprettier-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bokub%2Fprettier-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bokub%2Fprettier-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bokub","download_url":"https://codeload.github.com/bokub/prettier-config/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245140946,"owners_count":20567478,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["prettier","prettier-config","workflow"],"created_at":"2024-10-14T04:12:36.933Z","updated_at":"2025-03-23T17:31:14.156Z","avatar_url":"https://github.com/bokub.png","language":null,"funding_links":[],"categories":["Others"],"sub_categories":[],"readme":"![@bokub/prettier-config](https://user-images.githubusercontent.com/17952318/155517136-be39b194-d0ef-4fd6-8c47-dfef2de50a3e.png)\n\n\u003ch2\u003e\n\u003cp align=\"center\"\u003e\n  My personal \u003ca href=\"https://prettier.io\"\u003ePrettier\u003c/a\u003e config \u0026 workflow\n\u003c/p\u003e\n  \u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/prettier/prettier\"\u003e\u003cimg src=\"https://flat.badgen.net/badge/code%20style/prettier/ff69b4\" alt=\"Code style\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@bokub/prettier-config\"\u003e\u003cimg src=\"https://flat.badgen.net/npm/dt/@bokub/prettier-config\" alt=\"Downloads\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@bokub/prettier-config\"\u003e\u003cimg src=\"https://gradgen.bokub.workers.dev/npm/v/@bokub/prettier-config?gradient=b65cff,11cbfa\u0026style=flat\u0026label=version\" alt=\"Version\"\u003e\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/h2\u003e\n\n#### Base setup\n\nInstall required packages:\n\n```bash\n# With npm\nnpm i -D prettier @bokub/prettier-config\n\n# With yarn\nyarn add -D prettier @bokub/prettier-config\n```\n\nAdd the config to your `package.json`:\n\n```bash\nnpm pkg set prettier=\"@bokub/prettier-config\"\n```\n\n#### _Optional:_ Setup pre-commit hook with husky \u0026 lint-staged\n\nInstall husky \u0026 lint-staged:\n\n```bash\n# With npm\nnpm i -D husky lint-staged\n\n# With yarn\nyarn add -D husky lint-staged\n```\n\nSetup git hook:\n\n```bash\nnpx husky init\necho \"npx lint-staged --concurrent false\" \u003e .husky/pre-commit\nnpm pkg set \"lint-staged.*\"=\"prettier --write --ignore-unknown\"\n```\n\n#### _Optional:_ Run prettier on existing code\n\n```bash\nnpx prettier --write .\n```\n\n#### _Optional:_ Setup with ESLint\n\n```bash\n# With npm\nnpm i -D eslint-config-prettier eslint-plugin-prettier eslint\n\n# With yarn\nyarn add -D eslint-config-prettier eslint-plugin-prettier eslint\n```\n\nThen, edit your ESLint configuration file:\n\n```jsonc\n{\n  \"plugins\": [\"prettier\"],\n  \"extends\": [\"\u003csome-config\u003e\", \"plugin:prettier/recommended\"], // Add to the end of the array\n  \"rules\": {\n    \"prettier/prettier\": \"warn\", // Optionally, you can set the error level to warn\n  },\n}\n```\n\nIf you have a `lint-staged` configuration, add an ESLint task :\n\n```bash\nnpm pkg set \"lint-staged[*.{js,ts,vue}]\"=\"eslint --fix\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbokub%2Fprettier-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbokub%2Fprettier-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbokub%2Fprettier-config/lists"}