Linting for FEEL expressions.
There are 2 ways to use this library:
The lintExpression
function takes a string expression and returns a list of linting errors.
import { lintExpression } from "@bpmn-io/feel-lint"
lintExpression('foo = bar');
The cmFeelLinter
function returns a codemirror linting source that you can use as a extension
in you codemirror instance.
import { cmFeelLinter } from "@bpmn-io/feel-lint"
import { linter } from '@codemirror/lint';
// ...
const myEditor = new EditorView({
state: EditorState.create({
doc: '',
extensions: [
linter(cmFeelLinter())
]
})
});
To get the development setup make sure to have NodeJS installed. As soon as you are set up, clone the project and execute
npm install
npm run dev
MIT