{"id":21414876,"url":"https://github.com/magic/format","last_synced_at":"2025-07-14T04:31:16.375Z","repository":{"id":52295858,"uuid":"232048957","full_name":"magic/format","owner":"magic","description":"format ecmascript modules using prettier.","archived":false,"fork":false,"pushed_at":"2025-07-06T20:38:42.000Z","size":1091,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-06T20:53:20.145Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/magic.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2020-01-06T07:37:34.000Z","updated_at":"2025-07-06T20:38:44.000Z","dependencies_parsed_at":"2024-06-21T07:32:54.707Z","dependency_job_id":"d4013932-df37-42bc-9ea9-3fd16b8f294b","html_url":"https://github.com/magic/format","commit_stats":null,"previous_names":[],"tags_count":54,"template":false,"template_full_name":null,"purl":"pkg:github/magic/format","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magic%2Fformat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magic%2Fformat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magic%2Fformat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magic%2Fformat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magic","download_url":"https://codeload.github.com/magic/format/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magic%2Fformat/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265240086,"owners_count":23732935,"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":[],"created_at":"2024-11-22T18:34:22.894Z","updated_at":"2025-07-14T04:31:16.363Z","avatar_url":"https://github.com/magic.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @magic/format\n\nrun prettier and format your code.\n\n[html docs](https://magic.github.io/format)\n\n[![NPM version][npm-image]][npm-url]\n[![Linux Build Status][travis-image]][travis-url]\n[![Windows Build Status][appveyor-image]][appveyor-url]\n[![Coverage Status][coveralls-image]][coveralls-url]\n[![Greenkeeper badge][greenkeeper-image]][greenkeeper-url]\n[![Known Vulnerabilities][snyk-image]][snyk-url]\n\n[npm-image]: https://img.shields.io/npm/v/@magic/format.svg\n[npm-url]: https://www.npmjs.com/package/@magic/format\n[travis-image]: https://img.shields.io/travis/com/magic/format/master\n[travis-url]: https://travis-ci.com/magic/format\n[appveyor-image]: https://img.shields.io/appveyor/ci/magic/format/master.svg\n[appveyor-url]: https://ci.appveyor.com/project/magic/format/branch/master\n[coveralls-image]: https://coveralls.io/repos/github/magic/format/badge.svg\n[coveralls-url]: https://coveralls.io/github/magic/format\n[greenkeeper-image]: https://badges.greenkeeper.io/magic/format.svg\n[greenkeeper-url]: https://badges.greenkeeper.io/magic/format.svg\n[snyk-image]: https://snyk.io/test/github/magic/format/badge.svg\n[snyk-url]: https://snyk.io/test/github/magic/format\n\n- [install](#install)\n- [usage](#usage)\n  - [npm scripts](#npm-scripts)\n  - [cli](#usage-cli)\n\n#### \u003ca name=\"install\"\u003e\u003c/a\u003egetting started\n\nbe in a nodejs project.\n\n```bash\nnpm i --save-dev @magic/format\n```\n\n#### \u003ca name=\"npm-scripts\"\u003e\u003c/a\u003enpm run scripts\n\nedit package.json:\n\n```json\n{\n  \"scripts\": {\n    \"format\": \"f -w\",\n    \"format:check\": \"f\"\n  }\n}\n```\n\n`npm run format` will format and overwrite your source files,\n\n`npm run format:check` will list the files that would be changed.\n\n##### \u003ca name=\"usage-cli\"\u003e\u003c/a\u003ecli\n\nyou can install this library globally,\nbut the recommendation is to add the dependency and scripts to the package.json file.\n\nthis both explains to everyone that your app has this dependencies\nas well as keeping your bash free of clutter\n\n```bash\nnpm i -g @magic/format\n\n// check formatting using prettier but do not write\nf\n\n// format and overwrite files using prettier\nf -w\n```\n\n##### \u003ca name=\"usage-plugins\"\u003e\u003c/a\u003eprettier plugins\n\n@magic/format supports a number of prettier plugins out of the box as optional peerDependencies.\nJust install any of the following and prettier will start checking the appropriate files:\n\n- ##### ext: plugin\n- haml: @prettier/plugin-haml\n- lua: @prettier/plugin-lua\n- php: @prettier/plugin-php\n- pug: @prettier/plugin-pug\n- py: @prettier/plugin-python\n- rb: @prettier/plugin-ruby\n- gemspec: @prettier/plugin-ruby\n- xml: @prettier/plugin-xml\n- toml: @voltiso/prettier-plugin-toml\n- astro: prettier-plugin-astro\n- java: prettier-plugin-java\n- svelte: prettier-plugin-svelte\n\n#### Changelog\n\n##### 0.0.1\n\nfirst commit\n\n##### 0.0.2\n\n- change error output\n- node version is strict\n\n##### 0.0.3\n\nupdate deps\n\n##### 0.0.4\n\nupdate info messages\n\n##### 0.0.5\n\nupdate dependencies\n\n##### 0.0.6\n\nmessages now being logged from bin.mjs, making src/index.mjs return a list of changedFiles instead.\n\n##### 0.0.7\n\n- cli script awaits format before displaying information\n- add --silent option to suppress info if nothing got changed\n\n##### 0.0.8\n\nupdate dependencies\n\n##### 0.0.9\n\nupdate prettier\n\n##### 0.0.10\n\nupdate dependencies\n\n##### 0.0.11\n\nbump required node version to 14.2.0\n\n##### 0.0.12\n\n- do not error if .gitignore does not exist\n\n##### 0.0.13\n\n- npm i -g @magic/format now is actually usable.\n\n##### 0.0.14\n\nupdate dependencies\n\n##### 0.0.15\n\nupdate dependencies\n\n##### 0.0.16\n\nupdate dependencies\n\n##### 0.0.17\n\nupdate dependencies\n\n##### 0.0.18\n\nupdate dependencies\n\n##### 0.0.19\n\nupdate dependencies\n\n##### 0.0.20\n\nupdate dependencies\n\n##### 0.0.21\n\n- bump required node version to 14.15.4\n- update dependencies\n\n##### 0.0.22\n\nupdate dependencies (@magic/fs)\n\n##### 0.0.23\n\nupdate dependencies\n\n##### 0.0.24\n\nupdate dependencies\n\n##### 0.0.25\n\n- update dependencies (@magic/fs)\n- ** broken npm cache **\n\n##### 0.0.26\n\nrelease to refresh npm cache\n\n##### 0.0.27\n\nupdate @magic/types and intermediate deps to avoid circular dependency\n\n##### 0.0.28\n\nupdate depdendencies\n\n##### 0.0.29\n\nupdate dependencies\n\n##### 0.0.30\n\nupdate dependencies\n\n##### 0.0.31\n\nupdate dependencies\n\n##### 0.0.32\n\n- format .js files by default\n- update dependencies\n\n##### 0.0.33\n\n- update dependencies\n\n##### 0.0.34\n\n- less runtime errors\n- more tests\n- update dependencies\n\n##### 0.0.35\n\nupdate dependencies\n\n##### 0.0.36\n\nupdate dependencies\n\n##### 0.0.37\n\nupdate dependencies\n\n##### 0.0.38\n\nupdate dependencies\n\n##### 0.0.39\n\n- update dependencies\n- make sure errors happening whilst formatting files\n  do not lead to data loss in other files\n  that are being written at that same point in time\n\n##### 0.0.40\n\nupdate dependencies\n\n##### 0.0.41\n\nupdate dependencies\n\n##### 0.0.42\n\nupdate dependencies\n\n##### 0.0.43\n\nupdate dependencies\n\n##### 0.0.44\n\n- add svelte and astro support (prettier-plugin-svelte and prettier-plugin-astro)\n- support more filetypes as default:\n  `mjs, js, ts, json, jsx, tsx, svelte, astro, markdown, md`\n\n##### 0.0.45\n\nadd `css, scss, sass` filetypes\n\n##### 0.0.46\n\ncatch SIGINT and wait for files to write before executing process.exit()\n\n##### 0.0.47\n\n- add pug and gltf to default --file-types\n- update dependencies\n\n##### 0.0.48\n\nactually distribute @prettier/plugin-pug\n\n##### 0.0.49\n\n- update dependencies\n- move all prettier plugins to optionalDependencies, we can install them where needed\n\n##### 0.0.50\n\n- update dependencies\n- add various prettier plugins as optional peerDependencies, and check for them in the cli. if they exist, add their extensions to the prettier fileTypes\n- catch SIGTERM in addition to SIGINT. SIGKILL is uncatchable.\n\n##### 0.0.51\n\nupdate dependencies\n\n##### 0.0.52\n\nupdate dependencies\n\n##### 0.0.53\n\n- manually import preinstalled optional prettier plugins\n- update dependencies\n\n##### 0.0.54\n\n- expose format and formatString as javascript api\n- update dependencies\n\n##### 0.0.55\n\n- peerDependencies allow newer versions\n\n##### 0.0.56\n\n- peerDependencies allow any version\n\n##### 0.0.57\n\n- fix peerDependency resolution\n\n##### 0.0.58\n\n- readd plugins: [] to defaultConfig,\n  allowing us to expand them with installed peerDependencies\n\n##### 0.0.59\n\n- update dependencies\n- add glsl shader support (plugin-prettier-glsl)\n\n##### 0.0.60\n\n- update deps\n\n##### 0.0.61\n\n- add htmlWhitespaceSensitivity: ignore\n- update deps\n\n##### 0.0.62\n\n- add prettier-plugin-tailwindcss\n- update prettier dependency\n\n##### 0.0.63\n\n- use prettier-plugin-tailwindcss for svelte files\n\n##### 0.0.64\n\n- prettier-plugin-tailwindcss: add to svelte and astro apps\n\n##### 0.0.65\n\n- remove prettier-plugin-tailwindcss, it breaks a lot of svelte code\n\n##### 0.0.66\n\n- update dependencies\n\n##### 0.0.67\n\n- findFiles uses fs.getFiles\n- findFiles also finds dotfile dirs and files\n- add --verbose flag to echo files that get checked\n- update dependencies\n\n##### 0.0.68 - unreleased\n\n...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagic%2Fformat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagic%2Fformat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagic%2Fformat/lists"}