{"id":15573505,"url":"https://github.com/lgkonline/lgk-prettier","last_synced_at":"2026-01-11T02:23:04.790Z","repository":{"id":243353957,"uuid":"812218305","full_name":"lgkonline/lgk-prettier","owner":"lgkonline","description":"Command that adds LGK's preferred Prettier config","archived":false,"fork":false,"pushed_at":"2024-06-08T21:34:55.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-10T07:19:05.027Z","etag":null,"topics":["command","command-line-tool","config","format","formatting","prettier","prettier-config","tool"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/lgkonline.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":"2024-06-08T09:15:05.000Z","updated_at":"2024-06-08T21:34:58.000Z","dependencies_parsed_at":"2024-06-08T09:35:19.343Z","dependency_job_id":"7db597a9-8847-4496-905f-0e3c95a1dcbc","html_url":"https://github.com/lgkonline/lgk-prettier","commit_stats":null,"previous_names":["lgkonline/lgk-prettier"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lgkonline%2Flgk-prettier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lgkonline%2Flgk-prettier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lgkonline%2Flgk-prettier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lgkonline%2Flgk-prettier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lgkonline","download_url":"https://codeload.github.com/lgkonline/lgk-prettier/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246408100,"owners_count":20772228,"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":["command","command-line-tool","config","format","formatting","prettier","prettier-config","tool"],"created_at":"2024-10-02T18:13:01.785Z","updated_at":"2026-01-11T02:23:04.783Z","avatar_url":"https://github.com/lgkonline.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LGK's Prettier config\n\nRun\n\n```\nnpx -y lgk-prettier\n```\n\nadd the root of a project to add a [`.prettierrc`](https://prettier.io) file to it.\n\n## Add VS Code settings and extension\n\nAdding the parameter `--vscode` or `-c` will also add this to the workspace:\n\n-   `.vscode/settings.json` with `\"editor.formatOnSave\": true`\n-   `.vscode/settings.json` with `\"recommendations\": [\"esbenp.prettier-vscode\"]`\n\n## Add settings for Tailwind CSS\n\nIn a project with Tailwind CSS you can add the parameter `--tailwindcss` or `-t`. This will also add the Tailwind CSS plugin to the `.prettierrc` file and also sets `\"tailwindStylesheet\": \"./src/style.css\"`, which is required by the plugin. Make sure to update this, if your CSS file is somewhere else. This script also doesn't install the plugin, you have to run `npm install -D prettier prettier-plugin-tailwindcss` yourself.\n\nWhen you also add parameter `--vscode` or `-c`, the official Tailwind CSS IntelliSense extension will also be added to the workspace's extension recommendations.\n\n## Status\n\n[![npm version](https://img.shields.io/npm/v/lgk-prettier?logo=npm\u0026logoColor=fff)](https://www.npmjs.com/package/lgk-prettier)\n\n## Why does this exist?\n\nI like to use Prettier in all my projects to make code formatted in a consistent way. I configured my VS Code to format automatically with the Prettier extension.\n\n[I also wrote an article about this.](https://site.lgk.io/blog/mach-deinen-code-prettier/) It's in German though.\n\n![Graphic visualizing pretty formatting a code](https://site.lgk.io/img/oOzfprwcvr-300.jpeg)\n\nUnfortunately I don't like the default formatting, so I always have my own `.prettierc` in each project, since you can't have a global Prettier config.\n\nThis script should help adding this config to a new project.\n\nMy preferred config looks like this:\n\n```json\n{\n    \"tabWidth\": 4,\n    \"useTabs\": false,\n    \"semi\": false,\n    \"singleQuote\": false,\n    \"trailingComma\": \"none\",\n    \"bracketSpacing\": true,\n    \"bracketSameLine\": false,\n    \"fluid\": false\n}\n```\n\nIf you like this as well, feel free to use my command tool. Or fork this repo and change it to your own.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flgkonline%2Flgk-prettier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flgkonline%2Flgk-prettier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flgkonline%2Flgk-prettier/lists"}