Using options argument in linter


I need to pass some configuration to the linter addon for a new mode.

Let’s take a sample linter function as follow:

  function validator(text, options, editor) {
       // do something

  CodeMirror.registerHelper("lint", "mymode", validator);

I don’t understand how I can populate the “options” parameter with something different by an empty object.


… OK, found myself; seems that the key is to not init the linter with:

lint: true,

But as:

lint: { key: val, ... },