{"id":25500,"library":"eslint-plugin-bpmn-io","title":"eslint-plugin-bpmn-io","description":"Shared ESLint plugin for bpmn.io projects, providing lint configurations and rules for browser, node, and testing environments. Current stable version is 2.2.0 (2024). Release cadence: major updates align with ESLint major releases. Key differentiators: tailored for bpmn.io ecosystem, includes recommended profiles for common setups (browser, node, mocha, JSX), and uses flat configs (ESLint 9+) since v2.0.0. Supports ES2022 by default.","status":"active","version":"2.2.0","language":"javascript","source_language":"en","source_url":"ssh://git@github.com/bpmn-io/eslint-plugin-bpmn-io","tags":["javascript","eslint","lint","rules","bpmn.io"],"install":[{"cmd":"npm install eslint-plugin-bpmn-io","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-bpmn-io","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-bpmn-io","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency; plugin requires ESLint ^9","package":"eslint","optional":false}],"imports":[{"note":"ESM-only since v2.0.0; CommonJS require() throws ERR_REQUIRE_ESM.","wrong":"const bpmnIoPlugin = require('eslint-plugin-bpmn-io')","symbol":"bpmnIoPlugin","correct":"import bpmnIoPlugin from 'eslint-plugin-bpmn-io'"},{"note":"Access configs after default import; v1 used extends arrays in .eslintrc.","wrong":"require('eslint-plugin-bpmn-io').configs.recommended","symbol":"configs.recommended","correct":"bpmnIoPlugin.configs.recommended"},{"note":"One of several top-level configs; similar for node, mocha, jsx.","wrong":"","symbol":"configs.browser","correct":"bpmnIoPlugin.configs.browser"}],"quickstart":{"code":"import bpmnIoPlugin from 'eslint-plugin-bpmn-io';\n\nexport default [\n  ...bpmnIoPlugin.configs.recommended,\n  {\n    rules: {\n      'no-console': 'warn'\n    }\n  }\n];","lang":"javascript","description":"Shows how to use the plugin with flat config (ESLint 9+), spreading the recommended config and adding custom rules."},"warnings":[{"fix":"Update to ESLint 9 and use import syntax; remove .eslintrc and use flat config array.","message":"v2.0.0 migrated to ES modules and flat config; requires ESLint ^9.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Upgrade to v2.0.0+ and migrate to flat config.","message":"v1.x is deprecated; uses legacy .eslintrc format and eslint <9.","severity":"deprecated","affected_versions":"<2.0.0"},{"fix":"Use ...bpmnIoPlugin.configs.recommended (spread operator) in export default array.","message":"Plugin configs must be spread into array; using them as single config object fails.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Map configs and add files: ['**/*.spec.js'] or similar.","message":"The 'mocha' config must be applied only to test files via 'files' property.","severity":"gotcha","affected_versions":">=2.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"npm install --save-dev eslint-plugin-bpmn-io","cause":"Package not installed or missing from dependencies.","error":"Error: Cannot find module 'eslint-plugin-bpmn-io'"},{"fix":"Use import statement or set type: 'module' in package.json.","cause":"Using CommonJS require() with ESM-only plugin (v2+).","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module not supported."},{"fix":"Migrate to eslint.config.js flat config and ESLint 9.","cause":"Using .eslintrc (legacy) with v2 plugin that expects flat config.","error":"Configuration for rule 'import/no-unresolved' is invalid: Value \"error\" is the wrong shape."},{"fix":"Add import bpmnIoPlugin from 'eslint-plugin-bpmn-io' and include its configs.","cause":"Plugin not properly loaded in flat config; missing import.","error":"Definition for rule 'no-console' was not found."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}