Standardize Your JavaScript with ESLint for Drupal 8, Drupal 9

Last updated February 11, 2021
Theming8.9.x/9.0.x

ESLint is the linting tool of choice for JavaScript in Drupal. In this tutorial we'll show how to install the ESLint application and then use it to verify that your JavaScript files are meeting the Drupal coding standards.

Drupal (as of version 8.4) has adopted the Airbnb JavaScript coding standards. In this tutorial, we'll walk through how to install the necessary package dependencies to run eslint on JavaScript files within your Drupal site.