Tern Linter ESLint

Mathieu ABOU-AICHI edited this page Feb 22, 2018 · 5 revisions

Tern Validation with ESLint

tern-eslint provides the eslint.js Tern plugin which enables to validate your JavaScript files with ESLint.

After installing and converting your project as Tern Project, go at Tern project property, you can check the eslint plugin.

Check ESLint Plugin

or go at Tern / Validation / ESLint and click on Enable checkbox.

After that your JavaScript files are validated with ESLint:

ESLint sample

ESLint Preferences:

You can configure ESLint with UI project property page Tern / Validation / ESLint.

There are 2 means to configure ESLint:

  • config: it stores the ESLint configuration in the .tern-project.
  • configFile: it uses a ESLint config from a selected eslint.json file.


After checked the Enable checkbox, a treeview displays ESLint option that you can update :


The ESLint configuration is saved inside .tern-project:

				"rules": {
		    		"indent": 2


If you prefer using a eslint.json file (which must be stored in your project), check the Use config files checkbox and click on Browse button to select the eslint.json that you wish to use.

ESLint config file

The ESLint file to use is saved inside .tern-project :

			"configFile": "eslint.json"

ESLint Quick Fix

ESLint provides rules that support fixes. tern.java can use those fixes for Quick Fix:

ESLint Quick Fix


Provide an UI Preferences to customize ESLint. See https://github.com/angelozerr/tern.java/issues/234

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.