{"id":22432548,"url":"https://github.com/culur/prettier-config","last_synced_at":"2025-03-27T07:42:37.679Z","repository":{"id":37921076,"uuid":"337153437","full_name":"culur/prettier-config","owner":"culur","description":"Sharing Prettier configurations","archived":false,"fork":false,"pushed_at":"2024-05-22T17:10:51.000Z","size":4394,"stargazers_count":1,"open_issues_count":11,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-22T19:48:25.314Z","etag":null,"topics":["config","prettier"],"latest_commit_sha":null,"homepage":"https://npm.im/@culur/prettier-config","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/culur.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2021-02-08T17:23:50.000Z","updated_at":"2024-05-31T20:56:08.352Z","dependencies_parsed_at":"2023-09-25T13:33:14.235Z","dependency_job_id":"72690b68-865b-4ba1-91bf-90b8cf4d350d","html_url":"https://github.com/culur/prettier-config","commit_stats":{"total_commits":112,"total_committers":5,"mean_commits":22.4,"dds":0.5357142857142857,"last_synced_commit":"c692a1f6d63c051d307b34397f7af3085cb42afe"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/culur%2Fprettier-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/culur%2Fprettier-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/culur%2Fprettier-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/culur%2Fprettier-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/culur","download_url":"https://codeload.github.com/culur/prettier-config/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245806030,"owners_count":20675291,"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":["config","prettier"],"created_at":"2024-12-05T22:12:09.567Z","updated_at":"2025-03-27T07:42:37.646Z","avatar_url":"https://github.com/culur.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `@culur/prettier-config`\n\n\u003e Sharing [Prettier](https://prettier.io) configurations.\n\n## Install\n\nAdd `@culur/prettier-config` dependency to your project.\n\n```bash\n# Using npm\nnpm install @culur/prettier-config --save-dev\n\n# Using yarn\nyarn add @culur/prettier-config --dev\n```\n\n## Usage\n\nThere are three approaches to extend this shared config.\n\n### 1. Reference it in your `package.json`\n\n```jsonc\n{\n  // ...\n  \"prettier\": \"@culur/prettier-config\"\n}\n```\n\n### 2. Use any of the supported extensions to export a string\n\nExample: `.prettierrc.json`.\n\n```jsonc\n\"@culur/prettier-config\"\n```\n\n### 3. Overwrite some properties from the shared configuration\n\n```js\n// .prettierrc.js\nmodule.exports = {\n  ...require('@culur/prettier-config'),\n  semi: false,\n};\n```\n\n## Ignoring Code\n\n`Prettier` does not provide a full solution to share the `.prettierignore` file. But we can still share the file between projects using one of two approaches below.\n\n### 1. Using `--ignore-path` CLI option\n\nThe simplest way to do this is using `--ignore-path` CLI option.\n\n```bash\nprettier ** --write --ignore-path node_modules/@culur/prettier-config/.prettierignore\n```\n\nBy this way, there's no need to create a new file in your project folder. But you also can't extend the `.prettierignore` file.\n\n### 2. Copy the ignore file to your project folder\n\nIf you want to extend the ignore file, run the following command in the root of your project folder:\n\n```bash\n# unix\ncp \"node_modules\\@culur\\prettier-config\\.prettierignore\" \".prettierignore\"\n\n# windows\ncopy \"node_modules\\@culur\\prettier-config\\.prettierignore\" \".prettierignore\"\n```\n\nIt will copy the `.prettierignore` from `@culur/prettier-config` to your project root folder.\n\n### Scripts\n\nSome commonly used scripts in `package.json`.\n\n```json\n{\n  \"scripts\": {\n    \"fix:prettier\": \"prettier ** --write\",\n    \"test:prettier\": \"prettier ** --list-different\"\n  }\n}\n```\n\n## Related\n\n- [Prettier](https://github.com/prettier/prettier) - an opinionated code formatter.\n- [Prettier - Sharing configurations](https://prettier.io/docs/en/configuration.html#sharing-configurations) - Document on sharing prettier configurations.\n- [Prettier - Ignore Code](https://prettier.io/docs/en/ignore.html) - Use `.prettierignore` to ignore certain files and folders completely.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fculur%2Fprettier-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fculur%2Fprettier-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fculur%2Fprettier-config/lists"}