Conditional imports and prettier/eslint

prettier and eslint really don’t like conditional imports. Is this strictly a Meteor thing? If not, how do I get babel to be OK with conditional imports?

1 Like

As a workaround I use require and disable global-require. not pretty but works.

This should be fixed with this PR.


As for eslint, using babel-eslint as the parser in .eslintrc.js and setting parserOptions: { allowImportExportEverywhere: true } should do it.

1 Like

Now that prettier 1.5.0 is out, you should be able to use it properly with Meteor. :tada: