JSHint vs PMD
JSHint
jshint.comPMD
pmd.github.ioSide by side
| Figure | JSHint | PMD |
|---|---|---|
| Price from | Free | Free |
| Free plan | Yes | Yes |
| Free trial | — | — |
| Open source | Yes | — |
| Web | Yes | — |
| Windows | Yes | Yes |
| macOS | Yes | Yes |
| Linux | Yes | Yes |
| API | Yes | — |
| Self-hosted | Yes | Yes |
| Plans published | 1 | 1 |
| Spec score · Linters | 8.7 (#3) | 8.3 (#6) |
| Build integrations | Listed workflow integrations include Grunt, Ant/Maven, QUnit, pre-commit, overcommit and JSXHint. | PMD can be integrated through Maven or Gradle builds, which can be configured to fail when violations are found. |
| Installation | Official installation supports browser-like standalone files, Mozilla Rhino, npm global installation and npm development dependencies. | PMD requires Java 8 or above and is distributed as a ZIP archive containing PMD and CPD. |
| License | JSHint is licensed under the MIT Expat license. | The project identifies its license as BSD-style. |
| Purpose | JSHint is a community-driven static analysis tool that detects errors and potential problems in JavaScript code. | PMD is an extensible cross-language static code analyzer that finds common programming flaws. |
| Support | The project directs users to report bugs and suggestions through GitHub Issues. | The project directs users to Stack Overflow for questions, GitHub issues for suspected bugs or requests, and Gitter for quick questions. |
Plans
In their own words
JSHint
JSHint is a free, open-source static analysis tool for JavaScript. It checks code for syntax errors and potential problems such as implicit type conversion issues and leaking variables. The project aims to help JavaScript developers avoid typos and language gotchas while working on complex programs. JSHint is distributed as a Node module with a library and command-line program, and it can also be used through a JavaScript API. Configuration can come from command-line options, a .jshintrc file, package.json, or inline source directives. Standalone files are available for browser-like environments and Mozilla Rhino, with releases published to npm for Node.js. The install page lists integrations for editors and IDEs including Vim, Emacs, Sublime Text, Visual Studio, VS Code, Eclipse, and JetBrains IDEs, plus build integrations such as Grunt, Ant, Maven, pre-commit, and QUnit. JSHint is licensed under the MIT Expat license. Its documentation cautions that static analysis cannot determine whether a program is correct or fast, or whether it has memory leaks, and recommends using it alongside unit and functional tests and code reviews.
PMD
PMD is a free, extensible static code analyzer that checks source code for programming flaws such as unused variables, empty catch blocks, and unnecessary object creation. It includes more than 400 built-in rules, and teams can write custom rules in Java or XPath. Its bundled CPD tool finds duplicated code across many programming languages. PMD checks source directories from the command line and can run as a Maven, Ant, Gradle, or bld build operation. Supported languages include Java, JavaScript, Salesforce Apex and Visualforce, Kotlin, Swift, Modelica, PL/SQL, Apache Velocity, JSP, WSDL, Maven POM, HTML, XML, and XSL; Scala is supported without Scala rules. It runs on Linux, macOS, and Windows and requires Java 8 or above. For CI, its GitHub Action can create SARIF reports and fail builds based on violation counts; documentation also covers GitLab, Jenkins, and Bamboo integrations. IDE integrations include Eclipse, IntelliJ IDEA, and Visual Studio Code, though some listed plugins are not actively maintained. Only the latest major version is actively developed.