<p dir="auto"><strong>TypeScript Version:</strong></p>
<p dir="auto">1.8.2</p>
<p dir="auto"><strong>Background</strong>:</p>
<p dir="auto">I have been working on trying to get <a href="https://github.com/eslint/typescript-eslint-parser">https://github.com/eslint/typescript-eslint-parser</a>, a TypeScript parser plugin for ESLint, off the ground, and the job this weekend has been to begin adding JSX support.</p>
<p dir="auto">ESLint uses espree and so the aim of the project is to convert the output of the tsc to an AST which espree expects. We already have a solid suite of JSX tests to develop against (taken from the espree project itself), but I have come up against a tsc error in one of them so far.</p>
<p dir="auto">My issue is that it seems currently the tsc does not accept this "namespaced attribute" JSX syntax:</p>
<p dir="auto"><strong>Code</strong></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;a n:foo=&quot;bar&quot;&gt; {value} &lt;b&gt;&lt;c /&gt;&lt;/b&gt;&lt;/a&gt;;
"><pre class="notranslate"><span class="pl-c1">&lt;</span><span class="pl-s1">a</span> <span class="pl-smi">n</span>:<span class="pl-smi">foo</span><span class="pl-c1">=</span><span class="pl-s">"bar"</span><span class="pl-c1">&gt;</span> <span class="pl-kos">{</span><span class="pl-s1">value</span><span class="pl-kos">}</span> <span class="pl-kos">&lt;</span><span class="pl-smi">b</span><span class="pl-kos">&gt;</span><span class="pl-kos">&lt;</span><span class="pl-smi">c</span><span class="pl-kos"></span> <span class="pl-pds"><span class="pl-c1">/</span>&gt;&lt;<span class="pl-c1">/</span>b</span><span class="pl-c1">&gt;</span><span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-smi">a</span><span class="pl-c1">&gt;</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Expected behavior:</strong><br>
Please note the AST produced by espree (see in particular the <code class="notranslate">tokens</code> array): <a href="http://astexplorer.net/#/B46lew7I59" rel="nofollow">http://astexplorer.net/#/B46lew7I59</a></p>
<p dir="auto"><strong>Actual behavior:</strong><br>
...compared to the one produced by the tsc (note the issues found in <code class="notranslate">parseDiagnostics</code>):<br>
<a href="http://astexplorer.net/#/G5L3CptVNq" rel="nofollow">http://astexplorer.net/#/G5L3CptVNq</a></p>
<p dir="auto">Removing the <code class="notranslate">n:</code> from <code class="notranslate">n:foo</code> resolves the parsing issues.</p>
<p dir="auto">Hi,<br>
working to a few projects I've noticed some strange behaviors, because I found a few times ts compilation errors in ts for files inside the wwwroot, that by default is excluded.<br>
I workied a bit on it and seems that the root causes were:</p>
<ol dir="auto">
<li>if I have a .d.ts  that reference a ts file inside the excluded zone, it's evalutated anyway bypassing the exclude, with potential problems. This happened to me using typings: I excluded the <strong>typings/main</strong> folder, but I continued to receive errors. After this I noticed that in the <strong>typings/main.d.ts</strong> the files are referenced. excluding the main.d.ts too I solved the problem.</li>
<li>if inside the excluded zone I have another <strong>tsconfig.json</strong> file with a valid "files" section, the files are evalutated anyway, bypassing the exclude. This happened to me with angular2: to deploy an asp.net 5 app with angular, Currently I copy all the content of the angular 2 npm package from node_modules to wwwroot, but after this compiling I started having compilation problems for duplicate symbols.<br>
I solved the problem, excluding in the copy task all the .ts and tsconfig.json.</li>
</ol>
<p dir="auto">Is this by design? At the beginning is a bit confusing, though solve the problem is not hard.</p>