Lint errors persist after removing plugin

Hello

I’m trying to implement un editor that can toggle lint feature by user, but even if I remove the plugin by reconfiguring compartment the lint errors keep being displayed.

const compartment = new Compartment();
const editorView = new EditorView({
  state: EditorState.create({
    extensions: [compartment.of([])]
  })
});

function enable() {
  editorView.dispatch({ effects: [compartment.reconfigure(linter(() => {...}))] });
}

function disable() {
  editorView.dispatch({ effects: [compartment.reconfigure([])] });
}

Is there any ideas to do this?

demo: twilight-glade-ulmiph - CodeSandbox

This patch should help with this.

Thank you marijn!
Is there any way to try changes that haven’t been released?

You can clone and build the repository and copy the dist/ over into your own dependency tree. But I’ve tagged @codemirror/lint 6.2.1 now.

It worked perfectly as expected.
Thank you so much!!