{"id":27215746,"url":"https://github.com/mihai-vlc/sublime-jsfmt","last_synced_at":"2025-12-17T22:50:54.771Z","repository":{"id":21171197,"uuid":"24475026","full_name":"mihai-vlc/sublime-jsfmt","owner":"mihai-vlc","description":"jsfmt plugin for Sublime Text","archived":false,"fork":false,"pushed_at":"2017-02-19T20:48:13.000Z","size":5830,"stargazers_count":477,"open_issues_count":5,"forks_count":21,"subscribers_count":17,"default_branch":"master","last_synced_at":"2024-04-14T20:30:07.813Z","etag":null,"topics":["formatter","jsfmt","sublime-text"],"latest_commit_sha":null,"homepage":null,"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/mihai-vlc.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}},"created_at":"2014-09-25T20:58:44.000Z","updated_at":"2023-11-29T12:25:32.000Z","dependencies_parsed_at":"2022-08-22T18:30:34.784Z","dependency_job_id":null,"html_url":"https://github.com/mihai-vlc/sublime-jsfmt","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mihai-vlc%2Fsublime-jsfmt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mihai-vlc%2Fsublime-jsfmt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mihai-vlc%2Fsublime-jsfmt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mihai-vlc%2Fsublime-jsfmt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mihai-vlc","download_url":"https://codeload.github.com/mihai-vlc/sublime-jsfmt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248161233,"owners_count":21057552,"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":["formatter","jsfmt","sublime-text"],"created_at":"2025-04-10T04:43:26.147Z","updated_at":"2025-12-17T22:50:49.725Z","avatar_url":"https://github.com/mihai-vlc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[jsfmt](https://github.com/rdio/jsfmt) for Sublime Text 2/3\n=================\n\n[![](https://david-dm.org/ionutvmi/sublime-jsfmt.svg)](https://david-dm.org/ionutvmi/sublime-jsfmt)\n\nIf you want your javascript automatically formatted to abide a particular style, \nthen jsfmt is for you.  No need to read warnings and fix things yourself. \nJust keep it all auto. Boom boom [jsfmt](https://github.com/rdio/jsfmt) is pretty tight. \nAnd yeah, if you want it in Sublime Text this is your homeboy.\n\n![](http://i.imgur.com/zkBvQ6X.gif)\n\nEnable `autoformat` then save the file and it gets formatted.\n\n### Installation\n\n**Via package control**  \nOpen your command palette -\u003e Package Control: Install Package -\u003e jsfmt\n\n**Manual**\n```bash\n\n## go to your ST packages folder. maybe something like …\ncd ~/Library/\"Application Support/Sublime Text 2\"/Packages\n\n# clone this repo\ngit clone https://github.com/ionutvmi/sublime-jsfmt jsfmt\n```\n\nOn windows open cmd and:\n```\ncd %APPDATA%\\\"Sublime Text 3\"\\Packages\ngit clone https://github.com/ionutvmi/sublime-jsfmt jsfmt\n```\n\n### Plugins included\n- [esformatter-braces](https://github.com/pgilad/esformatter-braces)\n- [esformatter-semicolons](https://github.com/bulyshko/esformatter-semicolons)\n- [esformatter-dot-notation](https://github.com/pgilad/esformatter-dot-notation)\n- [esformatter-quotes](https://github.com/millermedeiros/esformatter-quotes)\n\n\n### Settings\n```javascript\n{\n    // autoformat on save\n    \"autoformat\": false,\n\n    // array of extensions for autoformat\n    \"extensions\": [\"js\", \"sublime-settings\"],\n\n    // options for jsfmt\n    \"options\": {\n        \"preset\": \"jquery\",\n        \"indent\": {\n            \"value\": \"    \"\n        },\n        // plugins included\n        \"plugins\": [\n            // \"esformatter-quotes\",\n            // \"esformatter-semicolons\",\n            // \"esformatter-braces\",\n            // \"esformatter-dot-notation\"\n        ]\n    },\n    \"options-JSON\": {\n        \"plugins\": [\n            \"esformatter-quotes\"\n        ],\n        \"quotes\": {\n            \"type\": \"double\"\n        }\n    },\n    \"alert-errors\": true,\n    // path to nodejs\n    \"node-path\": \"node\",\n    // if true it will format the whole file even if you have a selection active\n    \"ignore-selection\": false\n}\n\n```\n\n### Commands\n**Command palette:**  \n\n- JSFMT: Format the current file\n- JSFMT: Toggle autoformat\n- JSFMT: Settings - Default\n- JSFMT: Settings - User\n\n**Menu:**  \nPreferences -\u003e Package Settings -\u003e Sublime JSFMT\n\n**Keyboard shortcut**  \nIf you want to trigger the formatting on a keyboard shortcut you will need to:\n- Go to Preferences -\u003e Key Bindings - User\n- Insert the configuration to call the `format_javascript` command\n```js\n{ \"keys\": [\"ctrl+q\"], \"command\": \"format_javascript\" },\n```\n\n### Formatting rules\n\nYou can set global rules via a `.jsfmtrc`. Be crazy and establish one for all your \nprojects in `~/.jsfmtrc`. (like in [dotfiles](https://github.com/paulirish/dotfiles/blob/master/.jsfmtrc))\n\nOtherwise you're probably pretty levelheaded and will probably provide one in your \nproject root. It'll be read and applied.\n\nRules you can intuit from these [esformatter preset files](https://github.com/millermedeiros/esformatter/tree/master/lib/preset).\n\nThere's a `.jsfmtrc-sample` in this repo. It's a good start. Rename it and toss it \nsomewhere. Try it out. \n\n### Installing plugins\nIf you want to use a plugin that is not installed by default you will need to follow the next steps:\n\n1. Go to the packages folder (Preferences -\u003e Browse Packages)  \n2. cd into the jsfmt folder.  \n3. Install the plugins you need.  \n4. Go to your jsfmt settings file and add the name of the plugin in the plugins array.  \n\n#### Compatibility \n\nShould work in both ST2 and ST3.\n\n\n### Contributing\n\nIf you find any bugs feel free to report them [here](https://github.com/ionutvmi/sublime-jsfmt/issues)  \nPull requests are also encouraged.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmihai-vlc%2Fsublime-jsfmt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmihai-vlc%2Fsublime-jsfmt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmihai-vlc%2Fsublime-jsfmt/lists"}