From f332d72f1653ec03b64a80d8d4949dce5564cc99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 12 Oct 2021 00:02:33 +0200 Subject: fix(lsp): lint diagnostics respect config file (#12338) This commit fixes problem with LSP where diagnostics coming from "deno lint" don't respect configuration file. LSP was changed to store "Option", "Option" and "Option" on "Inner"; as well as storing "Option" and "Option" on "StateSnapshot". Co-authored-by: Kitson Kelly --- cli/tests/testdata/lsp/deno.lint.jsonc | 8 ++++++++ cli/tests/testdata/lsp/did_open_lint.json | 8 ++++++++ 2 files changed, 16 insertions(+) create mode 100644 cli/tests/testdata/lsp/deno.lint.jsonc create mode 100644 cli/tests/testdata/lsp/did_open_lint.json (limited to 'cli/tests/testdata') diff --git a/cli/tests/testdata/lsp/deno.lint.jsonc b/cli/tests/testdata/lsp/deno.lint.jsonc new file mode 100644 index 000000000..51db1b5c7 --- /dev/null +++ b/cli/tests/testdata/lsp/deno.lint.jsonc @@ -0,0 +1,8 @@ +{ + "lint": { + "rules": { + "exclude": ["camelcase"], + "include": ["ban-untagged-todo"] + } + } +} diff --git a/cli/tests/testdata/lsp/did_open_lint.json b/cli/tests/testdata/lsp/did_open_lint.json new file mode 100644 index 000000000..51cef9807 --- /dev/null +++ b/cli/tests/testdata/lsp/did_open_lint.json @@ -0,0 +1,8 @@ +{ + "textDocument": { + "uri": "file:///a/file.ts", + "languageId": "typescript", + "version": 1, + "text": "// TODO: fixme\nexport async function non_camel_case() {\nconsole.log(\"finished!\")\n}" + } +} -- cgit v1.2.3