Error descriptions and quick-fixes are available from the editor and from the Problems tool window. To open the tool window, click the Inspection widget in the upper-right corner of the editor:
GoLand also provides code completion in JSCS configuration files.
Before you start
Download and install Node.js.
Install and enable the JSCS plugin on the Settings/Preferences | Plugins page as described in Installing plugins from JetBrains repository.
If the JSCS repository plugin is missing, GoLand suggests installing it when you open a .jscsrc or a .jscs.json configuration file.
Install JSCS globally
In the embedded Terminal (Alt+F12) , type:
npm install --g jscs
Enable JSCS and configure its behavior in GoLand
In the Settings/Preferences dialog Ctrl+Alt+S, go to . On the JSCS page, that opens, select the Enable checkbox. After that the other controls on the page become available.
In the Node Interpreter field, specify the path to Node.js. If you followed the standard installation procedure, GoLand detects the path and fills in the field itself.
In the JSCS Package field, specify the location of the
If you installed JSCS through the Node Package Manager, GoLand locates the package itself and fills in the field automatically. Otherwise, type the path manually or click and select the package location in the dialog that opens.
Specify the configuration to use.
Search for config(s) - select this option if JSCS rules are configured in your project package.json, in .jscsrc, or in .jscs .json.
GoLand will first look for a
jscsConfigproperty in the project package .json.
jscsConfigproperty is found, GoLand will look for a .jscsrc or a .jscs.json configuration file. GoLand starts the search from the folder where the file to be checked is stored, then searches in the parent folder, and so on until the project root is reached.
Configuration File - select this option if JSCS rules are configured in a custom JSON file. Specify the file location in the Path field. Select the path from the list or click and select the relevant file in the dialog that opens.
To apply a predefined set of rules associated with the code style you are using, select the set from the Code Style Preset list.