eslint-plugin-bpmn-io

raw JSON →
2.2.0 verified Fri May 01 auth: no javascript

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.

error Error: Cannot find module 'eslint-plugin-bpmn-io'
cause Package not installed or missing from dependencies.
fix
npm install --save-dev eslint-plugin-bpmn-io
error Error [ERR_REQUIRE_ESM]: require() of ES Module not supported.
cause Using CommonJS require() with ESM-only plugin (v2+).
fix
Use import statement or set type: 'module' in package.json.
error Configuration for rule 'import/no-unresolved' is invalid: Value "error" is the wrong shape.
cause Using .eslintrc (legacy) with v2 plugin that expects flat config.
fix
Migrate to eslint.config.js flat config and ESLint 9.
error Definition for rule 'no-console' was not found.
cause Plugin not properly loaded in flat config; missing import.
fix
Add import bpmnIoPlugin from 'eslint-plugin-bpmn-io' and include its configs.
breaking v2.0.0 migrated to ES modules and flat config; requires ESLint ^9.
fix Update to ESLint 9 and use import syntax; remove .eslintrc and use flat config array.
deprecated v1.x is deprecated; uses legacy .eslintrc format and eslint <9.
fix Upgrade to v2.0.0+ and migrate to flat config.
gotcha Plugin configs must be spread into array; using them as single config object fails.
fix Use ...bpmnIoPlugin.configs.recommended (spread operator) in export default array.
gotcha The 'mocha' config must be applied only to test files via 'files' property.
fix Map configs and add files: ['**/*.spec.js'] or similar.
npm install eslint-plugin-bpmn-io
yarn add eslint-plugin-bpmn-io
pnpm add eslint-plugin-bpmn-io

Shows how to use the plugin with flat config (ESLint 9+), spreading the recommended config and adding custom rules.

import bpmnIoPlugin from 'eslint-plugin-bpmn-io';

export default [
  ...bpmnIoPlugin.configs.recommended,
  {
    rules: {
      'no-console': 'warn'
    }
  }
];