eslint-plugin-drupal
v0.3.1
Published
ESLint rules for enforcing Drupal coding standards.
Downloads
148
Readme
Drupal ESLint rules
ESLint 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
}
}
Rules
- jquery-var-name: Ensure jquery variables are prefixed with
$
. - check-closure-globals: Ensure all global variable used are declared in the file-closure.