Skip to content
SPECIFICTION
Get listed

JSHint vs SwiftLint

JSHint

jshint.com

SwiftLint

realm.github.io

Side by side

FigureJSHintSwiftLint
Price fromFreeFree
Free planYesYes
Free trial——
Open sourceYes—
WebYes—
WindowsYesYes
macOSYesYes
LinuxYesYes
APIYes—
Self-hostedYes—
Plans published11
Spec score · Linters8.7 (#3)8.0 (#11)
ConfigurationProjects can configure JSHint with a .jshintrc file, package.json jshintConfig or the CLI --config option.File inclusions and exclusions can be configured in a `.swiftlint.yml` configuration file.
LicenseJSHint is licensed under the MIT Expat license.The GitHub repository identifies SwiftLint as MIT licensed.
PurposeJSHint is a community-driven static analysis tool that detects errors and potential problems in JavaScript code.SwiftLint enforces Swift style and conventions based on rules generally accepted by the Swift community.
SupportThe project directs users to report bugs and suggestions through GitHub Issues.The maintainers ask users to support the project by contributing, reporting issues, and helping the community, and note that volunteer time is limited.

Plans

JSHint

  • JSHintFree

JSHint pricing →

SwiftLint

  • SwiftLintFree

SwiftLint pricing →

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.

Visit jshint.com

SwiftLint

SwiftLint is a free, MIT-licensed tool that checks Swift source against style rules and conventions accepted by the Swift community. It includes more than 200 built-in rules, with opt-in rules disabled by default. A project can set active rules, included and excluded paths, and rule settings in a `.swiftlint.yml` file. SwiftLint can automatically correct some violations, overwriting affected files, and its command line supports linting, analysis, baselines, rule listings, and multiple reporters. Documented integrations include Xcode and Swift Package Manager plugins, pre-commit, Fastlane, Docker, Visual Studio Code, and MegaLinter. Installation choices include package managers, prebuilt packages, and source builds. Releases include macOS, Windows, and Linux binaries. SwiftLint is intended for valid, compilable source, and non-compiling code may produce unexpected results, especially when autocorrecting. Analyzer rules are considerably slower than lint rules. The project is maintained by volunteers, and the maintainers describe it as non-commercial.

Visit realm.github.io