It would be useful for us to be able to be able to filter lint diagnostics based on cursor position. The idea is that when a user is in the middle of typing some code (possibly with some autocomplete going on), we’d like to hide linter errors generated by the incomplete state of the code they’re currently typing.
The two ways I can see of doing this are:
- Reconfigure the linter with a new linter source
- Use CSS to hide lint markers and gutter markers for the current line
Neither is appealing. Reconfiguring the linter with a new source whenever the cursor changes seems highly likely to be inefficient, and conceptually wrong because the lint errors are still real and we just want to hide them in this context. CSS seems hacky and possibly imprecise. One option that occurs to me is to have some way to force the
markerFilter options in the linter config and lint gutter config to be applied.