facebook
Webclipse

Using Linters for JavaScript with JSjet

Use JavaScript linting to achieve a high level of JavaScript code quality. Enable linters such as JSHint or ESLint to catch coding pitfalls and potential runtime problems early in the development process. JSjet is available in Webclipse or MyEclipse.

Back to Learning Center

JSjet was introduced in version 2016 CI 3 of Webclipse and MyEclipse.

What is a Linter?

Linters are Code Quality Inspectors that work by basically parsing your code. They check JavaScript code for common mistakes and discrepancies without running the application. JSjet includes support for the following linters: ESLint, JSCS, JSHint and Lint.

JSHintValidationEx 
Example of linting with JSHint

Some benefits of using a linter include:

  • Instant notification of mistakes without running the application
  • Save time
  • Safer code
  • Stay focused on the hard part of coding
  • Better coding flow
  • Obvious highlighting in code
  • Standard coding style across teams

Enabling Linters

Complete the following steps to enable a linter:

  1. Right-click on a web project and select Properties>JavaScript>Code Quality.
  2. Select the linter you want to use.
  3. Click Enable.
  4. If you use configuration files instead of the default configuration, select Use config files and accept the default location or specify a custom location. (Note: This option is not available for Lint.)

    JSjetLinterConfig

    If you are using JSHint, you have the option to edit the configuration from JSjet. 

    JSjetJSHint
  5. Click OK to save your changes.