Closed nikku closed 5 years ago
There is not much benefit of passing the utils into a rule factory when we could have a library utility export, too. The API would slightly simplify though, possibly making it easier for users to write rules.
utils
Current Rule Layout
// some-rule.js module.exports = (utils) => { return { check: (...) => {} }; };
Proposed Rule Layout
// some-rule-new.js import { is } from 'bpmnlint-utils'; export default function() { ... return { check: ... }; }
Utils export is dropped from v5. Users should use the bpmnlint-utils package instead.
v5
bpmnlint-utils
There is not much benefit of passing the
utils
into a rule factory when we could have a library utility export, too. The API would slightly simplify though, possibly making it easier for users to write rules.Current Rule Layout
Proposed Rule Layout