{"id":19510,"library":"eslint-config-etherpad","title":"Etherpad ESLint Shareable Config","description":"ESLint shareable config used by Etherpad and its plugins. Version 4.0.5 (stable). This package provides multiple config presets (etherpad, etherpad/node, etherpad/browser, etherpad/tests, etc.) and a plugin-oriented config that automatically applies the correct presets based on file location. It includes a workaround for ESLint's modern module resolution issue (ESLint #3458). Key differentiator: tailored specifically for Etherpad ecosystem, handles backend/frontend/test code separately, and requires explicit peer dependency on ep_etherpad-lite to satisfy Node.js plugin checks.","status":"active","version":"4.0.5","language":"javascript","source_language":"en","source_url":"https://github.com/ether/eslint-config-etherpad","tags":["javascript","eslint","eslintconfig","etherpad"],"install":[{"cmd":"npm install eslint-config-etherpad","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-config-etherpad","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-config-etherpad","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency; ESLint is required to use the shareable config.","package":"eslint","optional":false},{"reason":"Peer dependency; required for TypeScript parsing and rules included in the config.","package":"typescript","optional":false}],"imports":[{"note":"This package is not imported in code; it is used in ESLint configuration files.","wrong":"Default import or named imports not applicable; config is used in .eslintrc via 'extends'.","symbol":"never","correct":"import { ... } from 'eslint-config-etherpad'"},{"note":"The 'etherpad/plugin' config automatically applies the correct sub-configs for different file types.","wrong":"Using 'extends: 'etherpad'' instead of 'etherpad/plugin' when a full plugin config is needed.","symbol":"module.exports","correct":"module.exports = { extends: 'etherpad/plugin' }"},{"note":"The patch is a workaround for ESLint issue #3458. Must be called before any 'extends' in .eslintrc.","wrong":"Omitting this require() call causes ESLint to fail to resolve plugins.","symbol":"require()","correct":"require('eslint-config-etherpad/patch/modern-module-resolution')"}],"quickstart":{"code":"// .eslintrc.cjs\n'use strict';\n\n// Workaround for https://github.com/eslint/eslint/issues/3458\nrequire('eslint-config-etherpad/patch/modern-module-resolution');\n\nmodule.exports = {\n  root: true,\n  extends: 'etherpad/plugin',\n  overrides: [\n    {\n      files: ['static/js/shared/**/*'],\n      env: {\n        'shared-node-browser': true,\n      },\n    },\n  ],\n};\n","lang":"javascript","description":"Creates a .eslintrc.cjs file that extends the etherpad/plugin config and adds an override for shared Node/browser files."},"warnings":[{"fix":"Add 'require('eslint-config-etherpad/patch/modern-module-resolution');' at the top of .eslintrc.cjs.","message":"Patch required: The require('eslint-config-etherpad/patch/modern-module-resolution') call is necessary for ESLint to resolve plugins correctly. Omitting it causes 'Failed to load plugin' errors.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Run 'npm install --no-save ep_etherpad-lite@file:/path/to/etherpad-lite/src' after each npm install.","message":"Peer dependency ep_etherpad-lite must be manually installed and symlinked; npm install removes the symlink.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Ensure ESLint version matches the peer dependency range specified in package.json.","message":"The 'etherpad/plugin' config may become outdated as ESLint evolves; always check compatibility with your ESLint version.","severity":"deprecated","affected_versions":">=4.0.0"},{"fix":"Refer to peerDependencies in package.json and install a compatible ESLint version.","message":"ESLint version mismatch: The shareable config may require a specific ESLint version. Using an incompatible version can cause rule errors.","severity":"gotcha","affected_versions":">=3.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Add 'require('eslint-config-etherpad/patch/modern-module-resolution');' at the top of your ESLint config file.","cause":"Missing the modern-module-resolution patch require() call in .eslintrc.cjs.","error":"Error: Failed to load plugin 'something' declared in '...'"},{"fix":"Run 'npm install --save-dev typescript'.","cause":"TypeScript is not installed as a peer dependency.","error":"Parsing error: Cannot find module 'typescript'"},{"fix":"Use the proper sub-config like 'etherpad/browser' or add env in overrides.","cause":"Missing appropriate env or global definitions for the file type (e.g., browser globals in test files).","error":"Warning: Rule 'no-undef' encountered an unknown global '...'"},{"fix":"Ensure 'eslint-config-etherpad' is installed and the patch require() is called.","cause":"Package not installed or module resolution fails without the patch.","error":"Error: Cannot find module 'eslint-config-etherpad'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}