<h2 dir="auto">Bug Report</h2>
<p dir="auto"><strong>Current behavior</strong><br>
A clear and concise description of the behavior.</p>
<ul dir="auto">
<li><a href="babeljs.io/repl">REPL</a>, <a href="https://codesandbox.io/s/babel-repl-custom-plugin-7s08o?file=/src/index.js" rel="nofollow">Codesandbox</a>, or GitHub Repo helps!</li>
</ul>
<p dir="auto"><strong>Input Code</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function from(x) {
    return x === x[Symbol.iterator]() ? Array.from(x) : x;
}
export default from;"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">from</span><span class="pl-kos">(</span><span class="pl-s1">x</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-k">return</span> <span class="pl-s1">x</span> <span class="pl-c1">===</span> <span class="pl-s1">x</span><span class="pl-kos">[</span><span class="pl-v">Symbol</span><span class="pl-kos">.</span><span class="pl-c1">iterator</span><span class="pl-kos">]</span><span class="pl-kos">(</span><span class="pl-kos">)</span> ? <span class="pl-v">Array</span><span class="pl-kos">.</span><span class="pl-en">from</span><span class="pl-kos">(</span><span class="pl-s1">x</span><span class="pl-kos">)</span> : <span class="pl-s1">x</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>
<span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-s1">from</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Expected behavior</strong></p>
<p dir="auto">The above is a valid ES module and will execute in browsers, but throw when parsed by Babylon.</p>
<ul dir="auto">
<li>Babel version(s): [e.g. v6.0.0, v7.0.0-beta.34] 7.10.2</li>
</ul>
<p dir="auto"><strong>Possible Solution</strong></p>
<p dir="auto">Acorn handles this parsing fine, so it should be a relatively straightforward parser fix.</p>
<h3 dir="auto">💻</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Would you like to work on a fix?</li>
</ul>
<h3 dir="auto">How are you using Babel?</h3>
<p dir="auto">@babel/eslint-parser</p>
<h3 dir="auto">Input code</h3>
<p dir="auto"><code class="notranslate">@babel/eslint-parser</code> fails if Babel config in the host project relies on any preset / plugin using <code class="notranslate">parserOverride</code>. This happens because <a href="https://github.com/babel/babel/blob/05af38cff2d5fc2288ce79b11b755b361a7e946d/eslint/babel-eslint-parser/src/worker/extract-parser-options-plugin.cjs#L3-L5"><code class="notranslate">@babel/eslint-parser</code> itself uses it to capture Babel options</a>. Although there seems to be <a href="https://github.com/babel/babel/blob/05af38cff2d5fc2288ce79b11b755b361a7e946d/eslint/babel-eslint-parser/src/worker/maybeParse.cjs#L20-L29">some code in place</a> to safeguard against "<em>More than one plugin attempted to override parsing</em>" error when some other parsers/plugin rely on <code class="notranslate">parserOverride</code>, it does not seem to help in practice.</p>
<h3 dir="auto">Configuration file name</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Configuration</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Current and expected behavior</h3>
<p dir="auto"><code class="notranslate">@babel/eslint-parser</code> fails to work in the described scenario, it should work though.</p>
<h3 dir="auto">Environment</h3>
<p dir="auto">Babel 7.16.0</p>
<h3 dir="auto">Possible solution</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Additional context</h3>
<p dir="auto"><em>No response</em></p>