{"action":"created","issue":{"url":"https://api.github.com/repos/benmosher/eslint-plugin-import/issues/634","repository_url":"https://api.github.com/repos/benmosher/eslint-plugin-import","labels_url":"https://api.github.com/repos/benmosher/eslint-plugin-import/issues/634/labels{/name}","comments_url":"https://api.github.com/repos/benmosher/eslint-plugin-import/issues/634/comments","events_url":"https://api.github.com/repos/benmosher/eslint-plugin-import/issues/634/events","html_url":"https://github.com/benmosher/eslint-plugin-import/issues/634","id":184205991,"number":634,"title":"Parser error on files in node_modules","user":{"login":"BarryThePenguin","id":1351912,"avatar_url":"https://avatars.githubusercontent.com/u/1351912?v=3","gravatar_id":"","url":"https://api.github.com/users/BarryThePenguin","html_url":"https://github.com/BarryThePenguin","followers_url":"https://api.github.com/users/BarryThePenguin/followers","following_url":"https://api.github.com/users/BarryThePenguin/following{/other_user}","gists_url":"https://api.github.com/users/BarryThePenguin/gists{/gist_id}","starred_url":"https://api.github.com/users/BarryThePenguin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BarryThePenguin/subscriptions","organizations_url":"https://api.github.com/users/BarryThePenguin/orgs","repos_url":"https://api.github.com/users/BarryThePenguin/repos","events_url":"https://api.github.com/users/BarryThePenguin/events{/privacy}","received_events_url":"https://api.github.com/users/BarryThePenguin/received_events","type":"User","site_admin":false},"labels":[{"id":187330413,"url":"https://api.github.com/repos/benmosher/eslint-plugin-import/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/benmosher/eslint-plugin-import/milestones/32","html_url":"https://github.com/benmosher/eslint-plugin-import/milestones/unambiguous%20regex%20false%20positives","labels_url":"https://api.github.com/repos/benmosher/eslint-plugin-import/milestones/32/labels","id":2112138,"number":32,"title":"unambiguous regex false positives","description":"fix the unambiguous regex to disqualify CJS dependencies without parsing","creator":{"login":"benmosher","id":3709196,"avatar_url":"https://avatars.githubusercontent.com/u/3709196?v=3","gravatar_id":"","url":"https://api.github.com/users/benmosher","html_url":"https://github.com/benmosher","followers_url":"https://api.github.com/users/benmosher/followers","following_url":"https://api.github.com/users/benmosher/following{/other_user}","gists_url":"https://api.github.com/users/benmosher/gists{/gist_id}","starred_url":"https://api.github.com/users/benmosher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benmosher/subscriptions","organizations_url":"https://api.github.com/users/benmosher/orgs","repos_url":"https://api.github.com/users/benmosher/repos","events_url":"https://api.github.com/users/benmosher/events{/privacy}","received_events_url":"https://api.github.com/users/benmosher/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":4,"state":"open","created_at":"2016-11-03T13:24:05Z","updated_at":"2016-11-07T10:08:42Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2016-10-20T11:39:15Z","updated_at":"2016-11-07T11:10:37Z","closed_at":"2016-11-07T10:08:42Z","body":"I'm not sure where this issue belongs, I thought I'd start here as it's related to the rules in this package.\n\nI'm using this plugin as it's included with [XO](https://github.com/sindresorhus/xo). I'm getting an error as a result of the following rules: `import/no-named-as-default`, `import/no-named-as-default-member`, `import/default`, `import/namespace` and `import/named`\n\n``` bash\nParse errors in imported module browser-sync: Unexpected character # (1:1)\n```\n\nThis happens when I'm importing `browser-sync`. It looks as though BrowserSync has a `#! /usr/bin/env node` at the top of their [main file](https://github.com/BrowserSync/browser-sync/blob/master/index.js), which I assume is causing the issue.\n\nSo appears there are a few things going on here:\n- `eslint-plugin-import` is parsing files in my `node_modules` folder. I haven't spent much time understanding how this plugin works, I just consume it through XO.\n- `browser-sync` has a `#! /usr/bin/env node` line at the top of their main file. I'm only aware of using this in node shell scripts, and I don't think the main BrowserSync file is a script\n- it looks like the eslint parser falls over when it encounters a `#` as the first character in a javascript module file\n\nThere's a few things here and I'm happy to follow up with any changes to the other projects, I just wanted to check with others that the above is correct. Thanks! 😀 \n"},"comment":{"url":"https://api.github.com/repos/benmosher/eslint-plugin-import/issues/comments/258808729","html_url":"https://github.com/benmosher/eslint-plugin-import/issues/634#issuecomment-258808729","issue_url":"https://api.github.com/repos/benmosher/eslint-plugin-import/issues/634","id":258808729,"user":{"login":"BarryThePenguin","id":1351912,"avatar_url":"https://avatars.githubusercontent.com/u/1351912?v=3","gravatar_id":"","url":"https://api.github.com/users/BarryThePenguin","html_url":"https://github.com/BarryThePenguin","followers_url":"https://api.github.com/users/BarryThePenguin/followers","following_url":"https://api.github.com/users/BarryThePenguin/following{/other_user}","gists_url":"https://api.github.com/users/BarryThePenguin/gists{/gist_id}","starred_url":"https://api.github.com/users/BarryThePenguin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BarryThePenguin/subscriptions","organizations_url":"https://api.github.com/users/BarryThePenguin/orgs","repos_url":"https://api.github.com/users/BarryThePenguin/repos","events_url":"https://api.github.com/users/BarryThePenguin/events{/privacy}","received_events_url":"https://api.github.com/users/BarryThePenguin/received_events","type":"User","site_admin":false},"created_at":"2016-11-07T11:10:37Z","updated_at":"2016-11-07T11:10:37Z","body":"I'm sure I'll keep you posted if I run into anymore trouble 😰"}}
{"actor":{"display_login":"BarryThePenguin"}}