I'm not sure where this issue belongs, I thought I'd start here as it's related to the rules in this package.
I'm using this plugin as it's included with 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
Parse errors in imported module browser-sync: Unexpected character # (1:1)
This 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, which I assume is causing the issue.
So appears there are a few things going on here:
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.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# as the first character in a javascript module fileThere'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! 馃榾
Strange. I'm not sure where to go on this, though this file should never have been parsed to begin with, since it has no imports/exports. So this is related to #615 / #649.
I'm not sure how/if you can set ESLint settings in XO (@jfmengels?) but the same workaround for those issues should work for this too, until the root issue (overparsing of CJS node modules) is solved.
The way to set ESLint settings in XO is described here.
Woo! 馃憦
@BarryThePenguin don't get your hopes up too high 馃槄 I'm pretty sure this should fix your issue without needing the aforementioned workaround, but not 100% sure. Let me know if it doesn't and I'll reopen.
I'm sure I'll keep you posted if I run into anymore trouble 馃槹