val-town / codemirror-ts

lint, hover, and autocomplete extensions for CodeMirror + TypeScript
https://val-town.github.io/codemirror-ts/
ISC License
146 stars 12 forks source link

feat: add `diagnosticCodesToIgnore` on tsLinter #34

Closed KABBOUCHI closed 2 months ago

KABBOUCHI commented 2 months ago

Add a way to ignore diagnostic codes, similar to https://microsoft.github.io/monaco-editor/typedoc/interfaces/languages.typescript.DiagnosticsOptions.html#diagnosticCodesToIgnore

tsLinter({
    diagnosticCodesToIgnore: [
        2354, // tslib not found
        2307, // Cannot find module 'xxx' or its corresponding type declarations
        1375, // 'await' expressions are only allowed at the top level of a file when that file is a module
    ],
}),
tmcw commented 2 months ago

Thanks!