This repository has been archived by the owner on Aug 18, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 209
Expose allowImportExportEverywhere #327
Labels
Comments
We do a similar thing for other options https://github.com/babel/babel-eslint/blob/master/index.js#L366-L367, sounds fine. We can support more than that just that too |
rhettlivingston
added a commit
to rhettlivingston/babel-eslint
that referenced
this issue
Jun 22, 2016
rhettlivingston
added a commit
to rhettlivingston/babel-eslint
that referenced
this issue
Jun 22, 2016
hzoo
pushed a commit
that referenced
this issue
Jun 22, 2016
When I saw this was closed, I was sure it met with the same YAGNI reply @rhettlivingston got from the ESLint folks—but no! Glad to see this enabled! 🔥 🚒 💃 |
Heh 😄 in babel-eslint 6.1.0 - and maybe i'l have time later for reify.. |
This was referenced Jun 29, 2016
nicolo-ribaudo
pushed a commit
to babel/babel
that referenced
this issue
Nov 14, 2019
…babel/babel-eslint#329) * Add allowImportExportEverywhere parserOption (babel/babel-eslint#327) * Added "allowImportExportEverywhere option (babel/babel-eslint#327)" test.
1 task
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The Meteor framework recently recommended ESLint as the goto lint tool for all of their users. Then, this past week, they added support for imports to be placed below the top-level in conditionals and nested contexts. The change works well and is implemented through the NPM module "reify".
My problem is that whenever either Espree or babel-eslint encounter this, they throw a syntax error that stops all other analysis.
I am looking for a means that I can specify in the Meteor Guide that all users can use to get around this problem.
Both Espree and babel-eslint are using parsers that have an option to "allowImportExportEverywhere". I have created issue #6472 on eslint requesting that they make a change to Espree to pass the option through if specified in .eslintrc.json. They are hesitant to make the change due to their policies against supporting experimental features.
Babel-eslint seems to be the ESLint place for "experimental" changes. But, I don't see how to enable this flag without making a code change in the parseNoPatch routine to set allowImportExportEverywhere to options.allowImportExportEverywhere (when specified).
Is there a way for me to enable allowImportExportEverywhere without changing code?
If not, would you consider a PR to add this option to the above code? I'm thinking it would involve adding the line
to the parse function, changing the existing line that sets allowImportExportEverywhere to false to
and test and documentation changes.
The text was updated successfully, but these errors were encountered: