diff --git a/lib/Linter.js b/lib/Linter.js index 8591ed0..06e326f 100644 --- a/lib/Linter.js +++ b/lib/Linter.js @@ -15,6 +15,8 @@ import { getEntryIds } from './utils/properties-panel'; import { toSemverMinor } from './utils/version'; +import { getDocumentationUrl } from './utils/documentation'; + const moddle = new BpmnModdle({ modeler: modelerModdle, zeebe: zeebeModdle @@ -79,6 +81,9 @@ export class Linter { propertiesPanel: { entryId: entryIds[ Math.max(0, entryIds.length - 1) ] }, + documentation: { + url: getDocumentationUrl(rule) + }, rule }; }) diff --git a/lib/utils/documentation.js b/lib/utils/documentation.js new file mode 100644 index 0000000..6d2cddf --- /dev/null +++ b/lib/utils/documentation.js @@ -0,0 +1,15 @@ +const baseUrl = 'http://localhost:3000/docs/next/components/modeler/reference/modeling-guidance'; + +export function getDocumentationUrl(rule) { + console.log('getting documentation URL', rule); + + if (rule === 'camunda-compat/implementation') { + return getUrl('service-task-implementation'); + } + + return null; +} + +function getUrl(fragment) { + return `${ baseUrl }#${ fragment }`; +} \ No newline at end of file