ESLint rules for enforcing Drupal coding standards.
npm install eslint-plugin-drupalESLint rules for enforcing Drupal coding standards
Install the eslint plugin:
```
npm install eslint-plugin-drupal
And add the plugin to the configuration file:
``
{
"plugins": ["drupal"],
"rules": {
"drupal/jquery-var-name": 2,
"drupal/check-closure-globals": 2
}
}
- jquery-var-name: Ensure jquery variables are prefixed with $`.
- check-closure-globals: Ensure all global variable used are declared in the file-closure.