How to use the vscode-json-languageservice.TextDocument function in vscode-json-languageservice

To help you get started, we’ve selected a few vscode-json-languageservice examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github azeemba / eslint-plugin-json / src / index.js View on Github external
preprocess: function(text, fileName) {
            const textDocument = jsonService.TextDocument.create(fileName, 'json', 1, text);
            fileDocuments[fileName] = textDocument;
            const parsed = jsonServiceHandle.parseJSONDocument(textDocument);
            fileLintResults[fileName] = getDiagnostics(parsed);
            fileComments[fileName] = parsed.comments;
            return ['']; // sorry nothing ;)
        },
        postprocess: function(messages, fileName) {