summaryrefslogtreecommitdiff
path: root/cli/tests/testdata
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2021-10-12 00:02:33 +0200
committerGitHub <noreply@github.com>2021-10-12 00:02:33 +0200
commitf332d72f1653ec03b64a80d8d4949dce5564cc99 (patch)
tree500e6d5d523f1cf66898985d5b7134c32cc270d8 /cli/tests/testdata
parent5bad8e17734ef8cc1f19df292d553cc1327638f3 (diff)
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<ConfigFile>", "Option<LintConfig>" and "Option<FmtConfig>" on "Inner"; as well as storing "Option<LintConfig>" and "Option<FmtConfig>" on "StateSnapshot". Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
Diffstat (limited to 'cli/tests/testdata')
-rw-r--r--cli/tests/testdata/lsp/deno.lint.jsonc8
-rw-r--r--cli/tests/testdata/lsp/did_open_lint.json8
2 files changed, 16 insertions, 0 deletions
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}"
+ }
+}