AppCode 2020.2 Help

Stylelint

AppCode integrates with Stylelint so you can inspect your CSS code from inside the IDE. Stylelint wakes up automatically when you edit a CSS file and highlights the detected problems. To view the description of a problem in an information popup, hover the mouse pointer over a stripe in the Validation sidebar. To examine errors and apply suggested quick fixes, press ⌥⏎.

  1. Install Stylelint and its standard configuration. To do that, open the embedded Terminal (⌥F12) and type:

    npm install --save-dev stylelint stylelint-config-standard

    Learn more from the Stylelint official website.

  2. In your project root, create a .stylelintrc.json configuration file as described in Creating files and directories. Open .stylelintrc.json in the editor and type:

    { "extends": "stylelint-config-standard" }
  3. To activate Stylelint, open the Preferences dialog ⌃⌥S, go to Languages and Frameworks | Style Sheets | Stylelint, and select the Enable checkbox. After that the controls in the dialog become available.

  4. In the Node Interpreter field, specify the Node.js interpreter to use. If you choose the Project alias, AppCode will automatically use the project default interpreter from the Node interpreter field on the Node.js and NPM page .

    In most cases, AppCode detects the project default interpreter and fills in the field itself. You can also choose another configured local interpreter or click the Browse button and configure a new one.

  5. In the Stylelint Package field, specify the location of the stylelint package installed globally or in the current project. If you followed the standard installation procedure, AppCode detects the package automaticaly.

  6. If you want Stylelint to also wake up automatically when you are editing a JavaScript file and check Style Sheet injections in it, select the Process JS files checkbox.

Last modified: 29 July 2020