{"id":15498190,"url":"https://github.com/bcomnes/sublime-standard-format","last_synced_at":"2025-04-22T22:15:10.401Z","repository":{"id":28722975,"uuid":"32244073","full_name":"bcomnes/sublime-standard-format","owner":"bcomnes","description":":sparkles: Runs standard --fix against the javascript in your ST3 window on save or manually.","archived":false,"fork":false,"pushed_at":"2023-12-23T22:24:40.000Z","size":304,"stargazers_count":60,"open_issues_count":3,"forks_count":21,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-12-12T14:24:23.204Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://packagecontrol.io/packages/StandardFormat","language":"Python","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/bcomnes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/funding.yml","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},"funding":{"github":["bcomnes"],"custom":["https://bret.io"]}},"created_at":"2015-03-15T03:55:09.000Z","updated_at":"2024-01-03T14:12:06.000Z","dependencies_parsed_at":"2023-12-23T23:48:29.556Z","dependency_job_id":"c20ab936-31ed-4080-8bd0-26145665256e","html_url":"https://github.com/bcomnes/sublime-standard-format","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcomnes%2Fsublime-standard-format","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcomnes%2Fsublime-standard-format/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcomnes%2Fsublime-standard-format/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcomnes%2Fsublime-standard-format/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bcomnes","download_url":"https://codeload.github.com/bcomnes/sublime-standard-format/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231291346,"owners_count":18353717,"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-10-02T08:42:18.506Z","updated_at":"2024-12-27T17:50:57.543Z","avatar_url":"https://github.com/bcomnes.png","language":"Python","funding_links":["https://github.com/sponsors/bcomnes","https://bret.io"],"categories":[],"sub_categories":[],"readme":"# Standard Format\n[![tests](https://github.com/bcomnes/sublime-standard-format/actions/workflows/tests.yml/badge.svg)](https://github.com/bcomnes/sublime-standard-format/actions/workflows/tests.yml)\n\nA Sublime Text 3 plug-in that runs [standard --fix](https://github.com/feross/standard) against the javascript code in your ST3 window on save or manually.  Can be toggled on or off.  Includes a few settings that let you tweak your search path to favor local dependencies over global ones.\n\nSupports any tool that accepts a `stdin` and `stdout` formatting API.  The following tools are used by default:\n\n```\nstandard --fix\nsemistandard --fix\n```\n\n![action gif](https://cdn.rawgit.com/bcomnes/sublime-standard-format/master/format.gif)\n\n## Installation\n\nInstall Standard Format using [Package Control](https://packagecontrol.io/).\n\n```sh\n# In the command palate\n- package control install\n- standard format\n```\n\nStandard Format (the Sublime Text Plug-in) requires that you install [`standard`](https://github.com/feross/standard) either locally to your project or globally.  It is recomended to save it to your local project.\n\n```sh\n$ npm install standard@latest --save-dev\n```\n\n\n## Configuration\n\nYou can find Standard Format settings in the `StandardFormat.sublime-settings` file.\n\nStandard Format is agressive about finding your developer dependencies.  The search path that it uses by default are in the following order:\n\n- User added paths: you can add an array of paths in your settings file.  You shouldn't need to do this unless you are doing something weird.\n- Any `node_modules/.bin` paths found above the current file.  Disable with `use_view_path`\n- If your current view isn't saved to disk, any any folders in the project will be walked towards root searching for `node_modules/.bin` to add to the path here.  Disabled with `use_project_path_fallback`.\n- The global user path is then used if nothing else is found.  This is calculated by starting a bash instance and calculating the real user path, including `.nvm` shims.\n\n### Other settings:\n\n- `format_on_save`: Boolean.  Runs Standard Format on save when set to true.  Use the command pallet to quickly toggle this on or off.\n- `extensions`: String Array.  An array of file extensions that you want to be able to run Standard Format against.\n\n- `command`: **Optional** String Array.  Customize the command and flags that **Standard Format** runs against. Can expand certain pre-defined placeholders (such as `{FILENAME}`).\n\nDefault:\n\n```json\n{\n  \"commands\": [\n    [\"standard\", \"--stdin\", \"--fix\"],\n    [\"semistandard\", \"--stdin\", \"--fix\" ]\n    [\"ts-standard\", \"--stdin\", \"--fix\", \"--stdin-filename\", \"{FILENAME}\" ]\n  ]\n}\n```\n\n- `loud_error`: Boolean.  Specifies if you get a status bar message or error window if the subprocess encounters an error while formatting.\n\n- `log_errors`: Boolean. Lets you log out errors encountered by the formatter.  Mainly used to suppress noisy formatting errors.\n\n### Project local settings\n\nIf the default/user settings isn't fined grained enough, you can set project specific settings in `.sublime-project` project specific settings. See [sublime project docs](https://www.sublimetext.com/docs/3/projects.html) for more details.\n\n```json\n{\n  \"settings\": {\n    \"standard_format\": {\n      \"format_on_save\": true,\n      \"commands\": [\n        [\"eslint_d\", \"--stdin\", \"--fix-to-stdout\"]\n      ]\n    }\n  }\n}\n```\n\n## Hints\n\nWindows is now supported.  Please open any issues that you come across.\n\n## Linter\n\nStandard Format pairs nicely with the Sublime Text `standard` linter:\n\n- [Flet/SublimeLinter-contrib-standard](https://github.com/Flet/SublimeLinter-contrib-standard)\n\n## References\n\n- https://github.com/piuccio/sublime-esformatter\n- https://github.com/ionutvmi/sublime-jsfmt\n- https://github.com/enginespot/js-beautify-sublime\n- https://github.com/jdc0589/JsFormat/commits/master\n- https://github.com/akalongman/sublimetext-codeformatter\n- https://github.com/DisposaBoy/GoSublime\n- https://github.com/Flet/SublimeLinter-contrib-standard\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcomnes%2Fsublime-standard-format","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbcomnes%2Fsublime-standard-format","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcomnes%2Fsublime-standard-format/lists"}