Table of Contents

Shows errors inline

ESLint’s IDE integration relies in general on the .eslintrc files (optionally with a .js or .json extension).

With the crafty ide command, a configuration file is generated to be read by your IDE.

Note that these configuration files should not be committed with your project as they are different for each machine because module paths are absolute.

Options

When generating the configuration file, you can add arguments to specify which presets you want, if you specify nothing it will use the format preset.

Presets

  • format Base formatting rules, should work on any code (included in legacy and recommended)
  • node Adds environment information for Node.js
  • legacy For all your EcmaScript 5 code
  • recommended For al your EcmaScript 2015+ code, also contains rules for React

You can use the number of presets you wish, the format preset is the one checked by the hooks

You can define them with --preset {presetName}

For example running with crafty ide --preset recommended will verify for formatting, common rules, EcmaScript 2015+ specific and React specific rules.

IDE plugins