Registry / testing / eslint-config-drupal-bundle

eslint-config-drupal-bundle

JSON →
library2.0.7jsnpmunverified

An ESLint shareable config that bundles Drupal coding standards, Airbnb style, and Prettier formatting into a single package, avoiding peer dependency conflicts. Current stable version is 2.0.7. It is designed for global installation, so you can lint any project without per-project ESLint setup. However, note that as of ESLint 6+, globally installed plugins and configs no longer work due to package loading changes; per-project setup is required for ESLint 6+. This package was primarily used with Drupal 8/9 and Node.js < 12. It is now largely considered outdated; recommended alternative is to use Drupal's official ESLint config or run ESLint per project with yarn/npm.

npm install eslint-config-drupal-bundle
INSTALL
IMPORT
SIG · ESLINT-CONFIG-DRUP
E
eslint-config-drupal-bundle
testingjavascriptv2.0.7
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default config via extends
module.exports = { extends: ['drupal-bundle'] };
module.exports = { extends: ['eslint-config-drupal-bundle'] };
Use 'drupal-bundle' (the package's prefix) not the full package name.
ESLint binary
./node_modules/eslint-config-drupal-bundle/node_modules/.bin/eslint
global eslint command after global install
For local install, use the nested node_modules/.bin/eslint path.
.eslintrc.js (global install)
module.exports = { extends: ['drupal-bundle'] };
module.exports = { extends: ['eslint-config-drupal-bundle'] };
Global install still requires .eslintrc with 'drupal-bundle' extends.

Global install and run ESLint with Drupal config on current directory.

npm install -g eslint-config-drupal-bundle@2.0.7 echo 'module.exports = { extends: ["drupal-bundle"] };' > .eslintrc.js eslint .
Debug
Known issues
breakingESLint 6+ breaks global plugin loading. This package relies on global installation which no longer works with ESLint >=6.
fix
Install ESLint per project and use local node_modules path, or use Drupal's official ESLint config.
affects: >=2.0.0
deprecatedPackage is no longer maintained. Drupal has moved to its own ESLint config in core.
fix
Use @drupal/eslint-config or configure ESLint manually with Drupal rules.
affects: >=1.0.0
gotchaWhen using with eslint-loader, you must specify the exact path to ESLint binary inside this package's node_modules.
fix
Set eslintPath to 'eslint-config-drupal-bundle/node_modules/eslint'.
affects: >=1.0.0
gotchaVSCode ESLint extension requires setting eslint.nodePath to this package's node_modules path.
fix
In workspace settings: { "eslint.nodePath": "/path/to/eslint-config-drupal-bundle/node_modules/eslint" }
affects: >=1.0.0
deprecatedAirbnb base config included but no longer maintained; may bring outdated rules.
fix
Consider using @drupal/eslint-config or eslint-config-airbnb separately.
affects: >=1.0.0
Errors
Common errors & fixes
ESLint couldn't find the config "drupal-bundle".
The config is not installed or not accessible from the current working directory (e.g., when running ESLint globally).
fix
Install the package globally or locally, and ensure .eslintrc extends 'drupal-bundle'.
Cannot find module 'eslint-config-drupal-bundle'
ESLint expects configs to be installed in node_modules relative to the project, but this package is installed globally.
fix
Either install locally (npm install --save-dev eslint-config-drupal-bundle) or adjust ESLint's resolve path.
ESLint: Failed to load plugin 'react' declared in 'drupal-bundle'
The package bundles Airbnb config which requires eslint-plugin-react, but it's not installed.
fix
Ensure all peer dependencies are available; use npm@5-6 or yarn with 'install-peers' flag.
Upgrade
Version history
2.0.7latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
eslint-config-drupal-bundle — npm install eslint-config-drupal-bundle · libregistry