Package detail

@bpmn-io/feel-lint

bpmn-io109.4kMIT1.4.0

Linter for FEEL expressions.

bpmn-io, feel, linter

readme

@bpmn-io/feel-lint

CI

Linting for FEEL expressions.

Usage

There are 2 ways to use this library:

Linting string expressions

The lintExpression function takes a string expression and returns a list of linting errors.

import { lintExpression } from "@bpmn-io/feel-lint"

lintExpression('foo = bar');

You may pass custom language configuration to the editor:

lintExpression('> 10, "yes", mike\'s name', {
  dialect: 'unaryTests',
  context: {
    "mike's name": "Mike the might"
  }
});

CodeMirror plugin

The cmFeelLinter function returns a LintSource that you can use to extend your 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())
      ]
    })
  });

Hacking the Project

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

License

MIT

changelog

Changelog

All notable changes to feel-lint are documented here. We use semantic versioning for releases.

Unreleased

_Note: Yet to be released changes appear here._

1.4.0

  • FEAT: allow to configure language parsing (#23)
  • FEAT: add ability to lint unary tests (#23)
  • FEAT: add ability to lint FEEL flavors (#23)
  • DEPS: update to @codemirror/language@6.10.8
  • DEPS: update to lezer-feel@1.7.0

1.3.1

  • FIX: make first-item a warning

1.3.0

  • FEAT: add first-item rule (#25)

1.2.0

  • FEAT: provide more user friendly messages (#2)

1.1.0

  • DEPS: update to lezer-feel@1.2.0

1.0.0

  • re-release v0.2.0 as stable

0.2.0

  • DEPS: bump to lezer-feel@1.0.1

Breaking Changes

  • We now treat any FEEL expression as a single expression, not a list of expressions.

0.1.1

  • DEPS: bump lezer-feel@0.15.0

0.1.0

  • initial release