JavaScript- and TypeScript-specific features and guidance
Table of Contents
<summary>Language Info for JavaScript</summary>
<div class="card">
<ul class="list-group list-group-flush">
<li class="list-group-item">Implementation: <a href="https://docs.pmd-code.org/apidocs/pmd-javascript/7.0.0-SNAPSHOT/net/sourceforge/pmd/lang/ecmascript/EcmascriptLanguageModule.html#"><code>EcmascriptLanguageModule</code></a></li>
<li class="list-group-item">Id: ecmascript</li>
<li class="list-group-item">PMD: ✔️</li>
<li class="list-group-item">CPD: ✔️</li>
</ul>
</div>
<summary>Language Info for TypeScript</summary>
<div class="card">
<ul class="list-group list-group-flush">
<li class="list-group-item">Since PMD 7.0.0</li>
<li class="list-group-item">Implementation: <a href="https://docs.pmd-code.org/apidocs/pmd-javascript/7.0.0-SNAPSHOT/net/sourceforge/pmd/lang/ecmascript/EcmascriptLanguageModule.html#"><code>EcmascriptLanguageModule</code></a></li>
<li class="list-group-item">Id: ts</li>
<li class="list-group-item">PMD: ❌</li>
<li class="list-group-item">CPD: ✔️</li>
</ul>
</div>
JavaScript
JavaScript support is using Rhino for parsing and supports CPD as well as PMD with rules.
See Compatibility Table for supported language features.
TypeScript
TypeScript is supported for Copy-Paste-Detection only and uses the ANTLR grammar from antlr/grammars-v4. This grammar is published under the MIT license.