RubyMine 2018.1 Help


RubyMine provides facilities to run CSS-specific code quality inspections through integration with the Stylelint code verification tool. The tool registers itself as a RubyMine code inspection: it checks CSS code for most common mistakes and discrepancies without running the application. When a tool is activated, it launches automatically on the edited CSS file. Discrepancies are highlighted and reported in pop-up information windows, a pop-up window appears when you hover the mouse pointer over a stripe in the Validation sidebar. You can also press Alt+Enter to examine errors and apply suggested quick fixes. Learn more about inspections and intention actions at Code Inspection and Intention Actions.

Before you start

  1. Install the Node.js runtime environment and configure it as a local Node.js interpreter.
  2. Install and enable the ^plugin_name% repository plugin on the Plugins page as described in Installing, Updating and Uninstalling Repository Plugins and Enabling and Disabling Plugins.

Installing Stylelint globally

Open the embedded Terminal (View | Tool Windows | Terminal) and type npm install -g stylelint at the command prompt.

Activating and configuring Stylelint

  1. Open the Settings / Preferences Dialog by pressing Ctrl+Alt+S or by choosing File | Settings for Windows and Linux or RubyMine | Preferences for macOS. Expand the Languages & Frameworks node, and then click Stylelint under Stylesheets. The Stylelint page opens.
  2. Select the Enable checkbox to activate Stylelint. After that the controls in the dialog box become available.
  3. In the Node Interpreter field, specify the Node.js interpreter to use. Choose one of the configured interpreters or click browseButton.png and configure a new one as described in Configuring Node.js Interpreters.
  4. In the Stylelint Package field, specify the location of the stylelint package installed globally or in the current project, see Stylelint.
Last modified: 19 January 2018

See Also