{"action":"created","issue":{"url":"https://api.github.com/repos/jonlabelle/SublimeJsPrettier/issues/136","repository_url":"https://api.github.com/repos/jonlabelle/SublimeJsPrettier","labels_url":"https://api.github.com/repos/jonlabelle/SublimeJsPrettier/issues/136/labels{/name}","comments_url":"https://api.github.com/repos/jonlabelle/SublimeJsPrettier/issues/136/comments","events_url":"https://api.github.com/repos/jonlabelle/SublimeJsPrettier/issues/136/events","html_url":"https://github.com/jonlabelle/SublimeJsPrettier/issues/136","id":357077048,"node_id":"MDU6SXNzdWUzNTcwNzcwNDg=","number":136,"title":"Missing Support for JSX Fragment Syntax","user":{"login":"kyleshevlin","id":4333144,"node_id":"MDQ6VXNlcjQzMzMxNDQ=","avatar_url":"https://avatars2.githubusercontent.com/u/4333144?v=4","gravatar_id":"","url":"https://api.github.com/users/kyleshevlin","html_url":"https://github.com/kyleshevlin","followers_url":"https://api.github.com/users/kyleshevlin/followers","following_url":"https://api.github.com/users/kyleshevlin/following{/other_user}","gists_url":"https://api.github.com/users/kyleshevlin/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleshevlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleshevlin/subscriptions","organizations_url":"https://api.github.com/users/kyleshevlin/orgs","repos_url":"https://api.github.com/users/kyleshevlin/repos","events_url":"https://api.github.com/users/kyleshevlin/events{/privacy}","received_events_url":"https://api.github.com/users/kyleshevlin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-05T06:01:49Z","updated_at":"2018-09-05T09:50:15Z","closed_at":null,"author_association":"NONE","body":"## Reporting an Issue\r\n\r\nWhen [reporting an issue](https://github.com/jonlabelle/SublimeJsPrettier/issues), please include the following information in your post:\r\n\r\n- [x] **Explain the Issue and Expected Behavior**\r\n- [x] **Prettier version**\r\n- [x] **JsPrettier Plug-in Version**\r\n- [x] **Platform Details**\r\n- [x] **Generated Prettier command line arguments**\r\n- [x] **Is the same behavior observed when run against Prettier directly?**\r\n- [x] **The contents of your** `User/JsPrettier.sublime-settings` **file**\r\n- [x] **The contents of your** `<project_name>.sublime-project` **file (if applicable)**\r\n- [x] **Steps to reproduce the behavior**\r\n\r\n---\r\n\r\n### Explain the Issue and Expected Behavior\r\n\r\nJsPrettier gets stuck on JSX's Fragment syntax\r\n\r\n```\r\nconst Foo = () => (\r\n\t<>\r\n\t\t<div>foo</div>\r\n\t\t<div>bar</div>\r\n\t</>\r\n```\r\n\r\nLeads to the error:\r\n\r\n```\r\nstdin: SyntaxError: Unexpected token (23:8)\r\nconst Foo = () => (\r\n       <>\r\n        ^\r\n\t\t\t<div>foo</div>\r\n\r\nProcess finished with exit code 2\r\n```\r\n\r\n### Prettier version\r\n\r\n1.14.2\r\n\r\n### JsPrettier Plug-in Version\r\n\r\n1.20.27\r\n\r\n### Platform Details\r\n\r\nST3 on Mac OSX\r\n\r\n### Generated Prettier command line arguments\r\n\r\n-----------------------------------------\r\n JsPrettier DEBUG - Prettier CLI Command \r\n-----------------------------------------\r\n\r\n/Users/kyle/.nvm/versions/node/v6.9.1/bin/node /Users/kyle/.nvm/versions/node/v6.9.1/bin/prettier --stdin --config /Library/WebServer/Documents/Work/secondcareerdevs/website-new/.prettierrc --config-precedence cli-override --parser babylon --tab-width 2 --use-tabs false --stdin-filepath /Library/WebServer/Documents/Work/secondcareerdevs/website-new/src/components/layout.js --cursor-offset 302\r\n\r\n### Is the same behavior observed when run against Prettier directly?\r\n\r\nPrettier supports the fragment syntax\r\n\r\n### The contents of your `User/JsPrettier.sublime-settings` file\r\n\r\n```\r\n{\r\n  \"debug\": false,\r\n  \"prettier_cli_path\": \"/Users/kyle/.nvm/versions/node/v6.9.1/bin/prettier\",\r\n  \"node_path\": \"/Users/kyle/.nvm/versions/node/v6.9.1/bin/node\",\r\n  \"auto_format_on_save\": true,\r\n  \"auto_format_on_save_excludes\": [\r\n    \"*/node_modules/*\",\r\n    \"*/.git/*\",\r\n    \"*.json\",\r\n    \"*.scss\",\r\n    \"*.md\"\r\n  ],\r\n  \"allow_inline_formatting\": false,\r\n  \"custom_file_extensions\": [],\r\n  \"additional_cli_args\": {},\r\n  \"max_file_size_limit\": -1,\r\n  \"prettier_options\": {\r\n    \"printWidth\": 80,\r\n    \"tabWidth\": 2,\r\n    \"singleQuote\": true,\r\n    \"trailingComma\": \"none\",\r\n    \"bracketSpacing\": true,\r\n    \"jsxBracketSameLine\": false,\r\n    \"parser\": \"babylon\",\r\n    \"semi\": false\r\n  }\r\n}\r\n```\r\n\r\n### Steps to reproduce the behavior\r\n\r\n1. Have some JSX, like my Foo component above, with Fragment syntax\r\n2. Try to format, get error.\r\n"},"comment":{"url":"https://api.github.com/repos/jonlabelle/SublimeJsPrettier/issues/comments/418670876","html_url":"https://github.com/jonlabelle/SublimeJsPrettier/issues/136#issuecomment-418670876","issue_url":"https://api.github.com/repos/jonlabelle/SublimeJsPrettier/issues/136","id":418670876,"node_id":"MDEyOklzc3VlQ29tbWVudDQxODY3MDg3Ng==","user":{"login":"jonlabelle","id":226837,"node_id":"MDQ6VXNlcjIyNjgzNw==","avatar_url":"https://avatars2.githubusercontent.com/u/226837?v=4","gravatar_id":"","url":"https://api.github.com/users/jonlabelle","html_url":"https://github.com/jonlabelle","followers_url":"https://api.github.com/users/jonlabelle/followers","following_url":"https://api.github.com/users/jonlabelle/following{/other_user}","gists_url":"https://api.github.com/users/jonlabelle/gists{/gist_id}","starred_url":"https://api.github.com/users/jonlabelle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonlabelle/subscriptions","organizations_url":"https://api.github.com/users/jonlabelle/orgs","repos_url":"https://api.github.com/users/jonlabelle/repos","events_url":"https://api.github.com/users/jonlabelle/events{/privacy}","received_events_url":"https://api.github.com/users/jonlabelle/received_events","type":"User","site_admin":false},"created_at":"2018-09-05T09:50:15Z","updated_at":"2018-09-05T09:50:15Z","author_association":"OWNER","body":"I observed the same error when running the mentioned JSX fragment snippet from the command-line (no integration/JSPrettier).\r\n\r\n**fragment-syntax-issue-136.js** file contents:\r\n\r\n```jsx\r\nconst Foo = () => (\r\n    <>\r\n        <div>foo</div>\r\n        <div>bar</div>\r\n    </>\r\n```\r\n\r\n**Prettier CLI Command:**\r\n\r\n```bash\r\nprettier \\\r\n    --stdin \\\r\n    --no-config \\\r\n    --print-width 80 \\\r\n    --single-quote false \\\r\n    --trailing-comma none \\\r\n    --bracket-spacing true \\\r\n    --jsx-bracket-same-line false \\\r\n    --parser babylon \\\r\n    --semi true \\\r\n    --require-pragma false \\\r\n    --prose-wrap always \\\r\n    --arrow-parens avoid \\\r\n    --tab-width 4 \\\r\n    --use-tabs false \\\r\n    --stdin-filepath fragment-syntax-issue-136.js \\\r\n    < fragment-syntax-issue-136.js\r\n```\r\n\r\n**Result**\r\n\r\n```\r\n[error] stdin: SyntaxError: Unexpected token, expected \",\" (6:1)\r\n[error]   4 |         <div>bar</div>\r\n[error]   5 |     </>\r\n[error] > 6 |\r\n[error]     | ^\r\n```"}}
{"actor":{"display_login":"jonlabelle"}}