• Get Review Board
  • What's New
  • Products
  • Review Board Code review, image review, and document review
  • Documentation
  • Release Notes
  • Power Pack Enterprise integrations, reports, and enhanced document review
  • Try for 60 Days
  • Purchase
  • RBCommons Review Board as a Service, hosted by us
  • Pricing
  • RBTools Command line tools and Python API for Review Board
  • Documentation
  • Release Notes
  • Review Bot Automated code review, connecting tools you already use
  • Documentation
  • Release Notes
  • RB Gateway Manage Git and Mercurial repositories in your network
  • Documentation
  • Release Notes
  • Learn and Explore
  • What is Code Review?
  • Documentation
  • Frequently Asked Questions
  • Support Options
  • Third-Party Integrations
  • Demo
  • Review Board RBTools Power Pack Review Bot Djblets RB Gateway
    1. Review Bot 3.0
    2. Version 4.x
    3. Version 3.0
    4. Version 2.0
    5. Version 1.0
    6. Review Bot Tools
    7. JSHint
  • Home
  • Installation
  • Manually Installing Review Bot
  • Review Bot Docker Images
  • Upgrading Review Bot
  • Configuring Review Bot
  • Review Bot Tools
  • Cargo Tool
  • Checkstyle
  • Clang Static Analyzer
  • Cppcheck
  • Cpplint
  • Doc8
  • FBInfer
  • Flake8
  • Go Fmt
  • Go Tool
  • JSHint
  • PMD
  • Pycodestyle
  • Pydocstyle
  • Pyflakes
  • RuboCop
  • Rust Fmt
  • Secret Scanner
  • ShellCheck
  • Module and Class Reference
  • reviewbot.tools.base
  • reviewbot.tools.base.mixins
  • reviewbot.tools.base.registry
  • reviewbot.tools.base.tool
  • reviewbot.testing.testcases
  • reviewbot.testing.utils
  • reviewbot.tools.testing
  • reviewbot.tools.testing.decorators
  • reviewbot.tools.testing.testcases
  • reviewbot.processing.review
  • reviewbot.utils.api
  • reviewbot.utils.filesystem
  • reviewbot.utils.log
  • reviewbot.utils.process
  • reviewbot.utils.text
  • reviewbot.celery
  • reviewbot.config
  • reviewbot.deprecation
  • reviewbot.errors
  • reviewbot.repositories
  • reviewbot.tasks
  • reviewbot.tools.cargotool
  • reviewbot.tools.checkstyle
  • reviewbot.tools.clang
  • reviewbot.tools.cppcheck
  • reviewbot.tools.cpplint
  • reviewbot.tools.doc8
  • reviewbot.tools.fbinfer
  • reviewbot.tools.flake8
  • reviewbot.tools.gofmt
  • reviewbot.tools.gotool
  • reviewbot.tools.jshint
  • reviewbot.tools.pmd
  • reviewbot.tools.pycodestyle
  • reviewbot.tools.pydocstyle
  • reviewbot.tools.pyflakes
  • reviewbot.tools.rbsecretscanner
  • reviewbot.tools.rubocop
  • reviewbot.tools.rustfmt
  • reviewbot.tools.shellcheck
  • General Index
  • Python Module Index
  • Release Notes
  • This documentation covers Review Bot 3.0. You can select a version above or view the latest documentation.

    JSHint¶

    JSHint is a tool which checks JavaScript code for common errors, including style consistency errors.

    Supported File Types¶

    The following are supported by this tool:

    • JavaScript: *.js

    Additional file extensions can be specified by configuring the Extra file extensions option.

    Installation¶

    This tool requires a Node.js install.

    Once installed, you can install JSHint by running:

    $ sudo npm install -g jshint
    

    It may also be available in your system’s package manager.

    Configuration¶

    JSHint Location¶

    If the jshint command is in a non-standard location, and can’t be found in Review Bot’s PATH environment variable, then you’ll need to specify the path in the Review Bot worker config file:

    exe_paths = {
        'jshint': '/path/to/jshint',
    }
    

    You will need to restart the Review Bot worker after making this change.

    Enabling JSHint in Review Board¶

    First, you’ll need to add a Review Bot configuration in Review Board (see Tool Configurations).

    The following configuration options are available:

    Extra file extensions (optional):

    A comma-separated list of additional file extensions to run JSHint on.

    This should look like: .ext1, .ext2, .ext3

    Extract JavaScript from HTML (optional):

    Whether JavaScript content in HTML files should be extracted and checked. The following choices are available:

    • Auto - Extracts only if it thinks the file is an HTML file

    • Always - Always treats a file as possible HTML

    • Never - Never extracts JavaScript from a non-JavaScript file

    If specifying this, you will want to add .html or suitable template extensions in Extra file extensions.

    This is equivalent to jshint --extract=....

    Configuration (optional):

    A custom JSON configuration for JSHint.

    Callers should be sure to validate this configuration before setting it.

    This is equivalent to jshint --config=... with a path to a file containing the provided configuration.

    Keep up with the latest Review Board releases, security updates, and helpful information.

    About
    News
    Demo
    RBCommons Hosting
    Integrations
    Happy Users
    Support Options
    Documentation
    FAQ
    User Manual
    RBTools
    Administration Guide
    Power Pack
    Release Notes
    Downloads
    Review Board
    RBTools
    Djblets
    Power Pack
    Package Store
    PGP Signatures
    Contributing
    Bug Tracker
    Submit Patches
    Development Setup
    Wiki
    Follow Us
    Mailing Lists
    Reddit
    Twitter
    Mastodon
    Facebook
    YouTube

    Copyright © 2006-2025 Beanbag, Inc. All rights reserved.

    Terms of Service — Privacy Policy — AI Ethics Policy — Branding

    On this page

    • [Top]
    • Supported File Types
    • Installation
    • Configuration
      • JSHint Location
      • Enabling JSHint in Review Board