Created
March 28, 2019 05:09
-
-
Save marbemac/99ca51fb1e871c888dc33b455240f08d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
async activate() { | |
SL.graph.onDidChangeSourceNodeContent(({ node }) => { | |
if (!node || node.subtype !== 'md') return; | |
let diagnostics = []; | |
if (node.raw.match('swagger')) { | |
diagnostics = [ | |
{ | |
code: 'swagger-check', | |
severity: 0, | |
message: 'get outta here swagger!' | |
} | |
]; | |
} | |
SL.graph.setSourceNodeDiagnostics(node.id, diagnostics); | |
}) | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment