{"action":"created","issue":{"url":"https://api.github.com/repos/airbnb/javascript/issues/1786","repository_url":"https://api.github.com/repos/airbnb/javascript","labels_url":"https://api.github.com/repos/airbnb/javascript/issues/1786/labels{/name}","comments_url":"https://api.github.com/repos/airbnb/javascript/issues/1786/comments","events_url":"https://api.github.com/repos/airbnb/javascript/issues/1786/events","html_url":"https://github.com/airbnb/javascript/issues/1786","id":315045266,"number":1786,"title":"Prefer default export not working for const variable","user":{"login":"AjayPoshak","id":7375457,"avatar_url":"https://avatars2.githubusercontent.com/u/7375457?v=4","gravatar_id":"","url":"https://api.github.com/users/AjayPoshak","html_url":"https://github.com/AjayPoshak","followers_url":"https://api.github.com/users/AjayPoshak/followers","following_url":"https://api.github.com/users/AjayPoshak/following{/other_user}","gists_url":"https://api.github.com/users/AjayPoshak/gists{/gist_id}","starred_url":"https://api.github.com/users/AjayPoshak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AjayPoshak/subscriptions","organizations_url":"https://api.github.com/users/AjayPoshak/orgs","repos_url":"https://api.github.com/users/AjayPoshak/repos","events_url":"https://api.github.com/users/AjayPoshak/events{/privacy}","received_events_url":"https://api.github.com/users/AjayPoshak/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-17T12:51:15Z","updated_at":"2018-04-17T14:05:31Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"If I have single export in a file like this\r\n```\r\nexport const url = \"google.com\";\r\n```\r\nIt shows me linting error for prefer-default-export, but making it default would throw me this error\r\n`Parsing error: Unexpected token const`"},"comment":{"url":"https://api.github.com/repos/airbnb/javascript/issues/comments/382004897","html_url":"https://github.com/airbnb/javascript/issues/1786#issuecomment-382004897","issue_url":"https://api.github.com/repos/airbnb/javascript/issues/1786","id":382004897,"user":{"login":"ljharb","id":45469,"avatar_url":"https://avatars1.githubusercontent.com/u/45469?v=4","gravatar_id":"","url":"https://api.github.com/users/ljharb","html_url":"https://github.com/ljharb","followers_url":"https://api.github.com/users/ljharb/followers","following_url":"https://api.github.com/users/ljharb/following{/other_user}","gists_url":"https://api.github.com/users/ljharb/gists{/gist_id}","starred_url":"https://api.github.com/users/ljharb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ljharb/subscriptions","organizations_url":"https://api.github.com/users/ljharb/orgs","repos_url":"https://api.github.com/users/ljharb/repos","events_url":"https://api.github.com/users/ljharb/events{/privacy}","received_events_url":"https://api.github.com/users/ljharb/received_events","type":"User","site_admin":false},"created_at":"2018-04-17T14:05:31Z","updated_at":"2018-04-17T14:05:31Z","author_association":"OWNER","body":"Because that’s not a default export; if you want it default you’ll have to do it in two lines:\r\n```jsx\r\nconst url = ‘google.com’;\r\nexport default url;\r\n```"}}
{"actor":{"display_login":"ljharb"}}