IntelliJ IDEA 2019.2 Help

JSHint

You can check your code with the JSHint linter which is already bundled with IntelliJ IDEA.

To enable JSHint and configure its behavior in IntelliJ IDEA

  1. In the Settings/Preferences dialog (Ctrl+Alt+S), go to Languages and Frameworks | JavaScript | Code Quality Tools | JSHint.

  2. On the JSHint page that opens, select the Enable checkbox. After that all the controls on the page become available.

  3. From the Version list, choose the version of the tool to use. IntelliJ IDEA comes bundled with version 2.9.5, which is used by default. To download another version, choose it from the list.

  4. Configure the behaviour of JSHint:

    • To verify the code against the rules from a configuration file, select the Use config files checkbox.

      A configuration file is a JSON file with the extension .jshintrc that specifies which JSHint options should be enabled or disabled. IntelliJ IDEA first looks for a .jshintrc file in the working directory. If the search fails, IntelliJ IDEA searches in the parent folder, then again in the parent folder. The process is repeated until IntelliJ IDEA finds a .jshintrc or reaches the project root. To have IntelliJ IDEA still run verification when no .jshintrc is found in the project, specify the default configuration file to use. Learn more about JSHint configuration files from the JSHint official website.

    • To configure verification manually, clear the checkbox and enable the relevant validations in the Options area. Learn more from the JSHint official website.

Last modified: 17 October 2019