mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 15:05:39 +01:00
Add support to ignore certain diagnostics (#46)
Add support to ignore certain diagnostics
This commit is contained in:
commit
e91b33e295
2 changed files with 2 additions and 0 deletions
|
|
@ -181,6 +181,7 @@ export class DiagnosticsAdapter extends Adapter {
|
|||
}
|
||||
const markers = diagnostics
|
||||
.reduce((p, c) => c.concat(p), [])
|
||||
.filter(d => (this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore || []).indexOf(d.code) === -1)
|
||||
.map(d => this._convertDiagnostics(resource, d));
|
||||
|
||||
monaco.editor.setModelMarkers(monaco.editor.getModel(resource), this._selector, markers);
|
||||
|
|
|
|||
1
src/monaco.d.ts
vendored
1
src/monaco.d.ts
vendored
|
|
@ -129,6 +129,7 @@ declare module monaco.languages.typescript {
|
|||
noSemanticValidation?: boolean;
|
||||
noSyntaxValidation?: boolean;
|
||||
noSuggestionDiagnostics?: boolean;
|
||||
diagnosticCodesToIgnore?: number[];
|
||||
}
|
||||
|
||||
export interface LanguageServiceDefaults {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue