GoLand 2020.2 Help

JavaScript linters

GoLand integrates with ESLint and other most popular JavaScript code linters that detect problems in your code without executing it.

When installed and enabled, a linter activates automatically every time you open a JavaScript file and reports detected errors and warnings in the editor and in the Problems tool window.

View problems and apply quick-fixes in the editor

  1. In the editor, hover the mouse pointer over the highlighted problem. GoLand shows a tooltip with a description of the problem.

    JavaScript linters: errors and warnings are highlighted, the description of a problem is shown in a tooltip.

    To resolve the problem, click <Linter name>: Fix '<rule name>' or press Shift+Alt+Enter.

  2. To resolve all the detected problems in the current file, click More actions ( Alt+Enter) and select <Linter name>: Fix current file from the list.

    JavaScript linters: resolving problems

    Alternatively, press Alt+Enter and choose the relevant suggestion from the list.

Problems tool window

The Problems tool window shows all the errors for the file in the active editor tab. Each error is supplied with a brief description and information about the number of the line where it occurred.

From each error message, you can navigate to the code where it occurred or fix the problem right in the Problems tool window, possibly using the Preview pane for reference.

  • To navigate to the place where a error occurred, select Jump to Source from the context menu of the error message or press F4.

  • To resolve the detected problems in the whole file, select <Linter name >: Fix current file.

  • You can also edit the linter's settings, suppress a rule where its violation has been detected or suppress a rule in the whole file, as well as exclude the current file from analysis at all.

Last modified: 8 July 2020