{"id":15405188,"url":"https://github.com/fnando/vscode-codefmt","last_synced_at":"2026-05-16T13:02:51.205Z","repository":{"id":66031481,"uuid":"377637756","full_name":"fnando/vscode-codefmt","owner":"fnando","description":"A plugin that allows applying code formatting with minimum configuration.","archived":false,"fork":false,"pushed_at":"2023-01-04T10:00:00.000Z","size":169,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-29T22:41:51.333Z","etag":null,"topics":["code-formatter","codefmt","vscode","vscode-extension"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=fnando.codefmt","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/fnando.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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-06-16T21:58:29.000Z","updated_at":"2022-12-20T01:05:11.000Z","dependencies_parsed_at":"2023-04-04T08:17:27.809Z","dependency_job_id":null,"html_url":"https://github.com/fnando/vscode-codefmt","commit_stats":{"total_commits":21,"total_committers":1,"mean_commits":21.0,"dds":0.0,"last_synced_commit":"84fdeb26a2c7bfb81bdc3869cfb4ab144b2ee015"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/fnando/vscode-codefmt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnando%2Fvscode-codefmt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnando%2Fvscode-codefmt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnando%2Fvscode-codefmt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnando%2Fvscode-codefmt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fnando","download_url":"https://codeload.github.com/fnando/vscode-codefmt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnando%2Fvscode-codefmt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33103970,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["code-formatter","codefmt","vscode","vscode-extension"],"created_at":"2024-10-01T16:15:22.491Z","updated_at":"2026-05-16T13:02:51.178Z","avatar_url":"https://github.com/fnando.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Code Formatter for VSCode\n\nA plugin that allows applying code formatting with minimum configuration.\n\nIncludes support for running the following formatters:\n\n- [Ruby’s RuboCop](https://rubocop.org)\n- [Ruby’s rubyfmt](https://github.com/penelopezone/rubyfmt)\n- [ESLint](https://eslint.org)\n- [Prettier](https://prettier.io)\n- [Golang’s gofmt](https://pkg.go.dev/cmd/gofmt)\n- [Golang’s goimports](https://pkg.go.dev/golang.org/x/tools/cmd/goimports)\n- [Golang’s gofumpt](https://pkg.go.dev/mvdan.cc/gofumpt)\n- [Python’s autopep8](https://pypi.org/project/autopep8/)\n- [Python’s yapf](https://pypi.org/project/yapf/)\n- [Postgres’s pg_formatter](https://github.com/darold/pgFormatter)\n- [PHP Code Standards Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer)\n- [Rust’s rustfmt](https://github.com/rust-lang/rustfmt)\n- [SVGO](https://github.com/svg/svgo)\n- [Flutter](https://flutter.dev/)\n- [Dart’s dartfmt](https://dart.dev/tools/dartfmt)\n- [jq](https://stedolan.github.io/jq/)\n\n## Usage\n\nBy default, files are formatted on save. You can disable this behavior by going\nto VSCode settings and searching for \"Codefmt\". There your can disable on save\nformatting, as well as enabling the debug mode.\n\nTo format files individually, you can use the Command Pallette and search for\n\"Codefmt\".\n\nBy default, the following formatters will be used:\n\n```json\n[\n  \"gofumpt\",\n  \"rubocop\",\n  \"jq\",\n  \"prettier\",\n  \"eslint\",\n  \"php-cs-fixer\",\n  \"rustfmt\",\n  \"svgo\",\n  \"swiftformat\",\n  \"flutter\",\n  \"pg_format\",\n  \"yapf\"\n]\n```\n\nYou can change the default formatters by changing the setting\n`codefmt.preferredFormatters`. It's a array of strings. You must set the whole\nlist if you want to change any of the items.\n\nThe following example uses `rubyfmt` instead of `rubocop`.\n\n```json\n{\n  \"codefmt.preferredFormatters\": [\n    \"gofumpt\",\n    \"rubyfmt\",\n    \"jq\",\n    \"prettier\",\n    \"eslint\",\n    \"php-cs-fixer\",\n    \"rustfmt\",\n    \"svgo\",\n    \"swiftformat\",\n    \"flutter\",\n    \"pg_format\",\n    \"yapf\"\n  ]\n}\n```\n\n**Attention:**: The preferred formatters list order is important: formatters run\nfrom top to down.\n\nTo add new formatters, or change the arguments used by an existing format, use\nthe `codefmt.formatters` setting. You can set only the commands you want; no\nneed to retype every single command that's used by default. If this is a new\nformatter, then remember to also add it to `codefmt.preferredFormatters`.\n\nThe following example replaces the existing `rubocop` formatter to use\n`--auto-correct` instead of `--auto-correct-all`:\n\n```json\n{\n  \"codefmt.formatters\": {\n    \"rubocop\": {\n      \"command\": [\n        \"rubocop\",\n        \"$debug\",\n        \"--auto-correct\",\n        \"--config\",\n        \"$config\",\n        \"$file\"\n      ],\n      \"languages\": [\"ruby\"],\n      \"debug\": [\"--debug\", \"--extra-details\"],\n      \"defaultConfig\": null,\n      \"configFiles\": [\".rubocop.yml\"],\n      \"useStdout\": false\n    }\n  }\n}\n```\n\nNotice that a formatter command may use any of this placeholders:\n\n- `$debug`: the position where the arguments for debugging will be inserted.\n- `$config`: the position where the config file must be inserted.\n- `$file`: the position where the file path must be inserted.\n\nFor commands that output the formatted file to stdout, you can use `useStdout`.\nThe requirement is that commands must exit(0). This is the default\n[jq](https://stedolan.github.io/jq/) formatter for JSON files, which sorts keys.\n\n```json\n{\n  \"jq\": {\n    \"command\": [\"jq\", \"--sort-keys\", \".\", \"$file\"],\n    \"languages\": [\"json\"],\n    \"debug\": [],\n    \"configFiles\": [],\n    \"useStdout\": true\n  }\n}\n```\n\n## License\n\nCopyright (c) 2021 Nando Vieira\n\nMIT License\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffnando%2Fvscode-codefmt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffnando%2Fvscode-codefmt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffnando%2Fvscode-codefmt/lists"}