View source | Discuss this page | Page history | Printable version   

How To Setup ESLint And Prettier In Your IDE



Starting from PR19Q3, Openbravo uses Prettier as JavaScript formatter and ESLint as linting tool (more details). Among its advantages, both are supported by most modern IDEs, so they can be configured to check linting as you code and properly format files when saving.


There is no known plugins to add support for ESLint or Prettier. However, built in Openbravo scripts can still be used.

Visual Studio Code

Visual Studio Code supports both ESLint and Prettier via extensions. Please, install the extensions shown in the screenshot below:


Then, make sure you run npm ci on your Openbravo root folder to install the tools before using it in your IDE.

To access settings.json press Ctrl + Shift + P in VSCode, then search Preferences: Open Settings (JSON).


For Prettier, in order to use our config file to format, the following option should be enabled: "Prettier: Require Config", or in settings.json:

  "prettier.requireConfig": true,

In addition, add the following line in settings.json to enable autoformatting of file when saving the file:

   "editor.formatOnSave": true,


IntelliJ Ultimate has built-in support of ESLint and supports Prettier via Plugin.



Sublime Text

ESLint just works by installing SublimeLinter and then SublimeLinter-eslint packages using PackageControl.

Prettier can be used by installing the package JsPrettier in PackageControl. By default, this plugin will search for the Prettier CLI in the following order:

If none applies, it is required to introduce the path of the Prettier CLI in JsPrettier settings (Preferences|Package Settings|JsPrettier):

  "prettier_cli_path": "<path_to_prettier_executable>"


Atom supports both ESLint and Prettier via packages.

Retrieved from ""

This page has been accessed 12,726 times. This page was last modified on 24 January 2020, at 11:07. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.