ESLint settings

Last updated on
1 October 2016

As of Drupal 8, we use ESLint to make sure our JavaScript code is consistent and free from syntax error and leaking variables and that it can be properly minified.

ESLint is a tool to detect errors and potential problems in JavaScript code.

ESLint is a nodejs module and is integrated into a number of IDEs. (See installation and usage instructions.)

The following set of configuration options has been agreed upon. (See ESLint change notice.) Configuration is improved when possible, always use the latest stable ESLint version.

These configuration files ship with Drupal 8 core and can be used from there.

.eslintrc

.eslintignore

In a Drupal 8 folder these configuration files will be automatically detected and used by ESLint when it is invoked from within the code base.