From 90a5ef5e343bedc0f6f5326b14b6851b71733bea Mon Sep 17 00:00:00 2001 From: scarf Date: Thu, 27 Apr 2023 12:02:36 +0900 Subject: feat(cli): flatten deno.json configuaration (#17799) --- cli/tests/testdata/lint/Deno.compact.format.jsonc | 6 ++---- cli/tests/testdata/lint/Deno.jsonc | 6 ++---- cli/tests/testdata/lint/Deno.malformed.jsonc | 6 ++---- cli/tests/testdata/lint/Deno.malformed2.jsonc | 8 +++----- cli/tests/testdata/lint/Deno.no_tags.jsonc | 14 ++++++-------- cli/tests/testdata/lint/with_malformed_config.out | 2 +- cli/tests/testdata/lint/with_malformed_config2.out | 2 +- 7 files changed, 17 insertions(+), 27 deletions(-) (limited to 'cli/tests/testdata/lint') diff --git a/cli/tests/testdata/lint/Deno.compact.format.jsonc b/cli/tests/testdata/lint/Deno.compact.format.jsonc index 24b159ca6..f3487501a 100644 --- a/cli/tests/testdata/lint/Deno.compact.format.jsonc +++ b/cli/tests/testdata/lint/Deno.compact.format.jsonc @@ -1,9 +1,7 @@ { "lint": { - "files": { - "include": ["with_config/"], - "exclude": ["with_config/b.ts"] - }, + "include": ["with_config/"], + "exclude": ["with_config/b.ts"], "rules": { "tags": ["recommended"], "include": ["ban-untagged-todo"] diff --git a/cli/tests/testdata/lint/Deno.jsonc b/cli/tests/testdata/lint/Deno.jsonc index 24db221a7..e9c03cca4 100644 --- a/cli/tests/testdata/lint/Deno.jsonc +++ b/cli/tests/testdata/lint/Deno.jsonc @@ -1,9 +1,7 @@ { "lint": { - "files": { - "include": ["with_config/"], - "exclude": ["with_config/b.ts"] - }, + "include": ["with_config/"], + "exclude": ["with_config/b.ts"], "rules": { "tags": ["recommended"], "include": ["ban-untagged-todo"] diff --git a/cli/tests/testdata/lint/Deno.malformed.jsonc b/cli/tests/testdata/lint/Deno.malformed.jsonc index 4534a1fe8..fa71cd851 100644 --- a/cli/tests/testdata/lint/Deno.malformed.jsonc +++ b/cli/tests/testdata/lint/Deno.malformed.jsonc @@ -1,9 +1,7 @@ { "lint": { - "files": { - "include": ["with_config/"], - "exclude": ["with_config/b.ts"] - }, + "include": ["with_config/"], + "exclude": ["with_config/b.ts"], "dont_know_this_field": {}, "rules": { "tags": ["recommended"], diff --git a/cli/tests/testdata/lint/Deno.malformed2.jsonc b/cli/tests/testdata/lint/Deno.malformed2.jsonc index 335fcdc23..fa71cd851 100644 --- a/cli/tests/testdata/lint/Deno.malformed2.jsonc +++ b/cli/tests/testdata/lint/Deno.malformed2.jsonc @@ -1,10 +1,8 @@ { "lint": { - "files": { - "include": ["with_config/"], - "exclude": ["with_config/b.ts"], - "dont_know_this_field": {} - }, + "include": ["with_config/"], + "exclude": ["with_config/b.ts"], + "dont_know_this_field": {}, "rules": { "tags": ["recommended"], "include": ["ban-untagged-todo"] diff --git a/cli/tests/testdata/lint/Deno.no_tags.jsonc b/cli/tests/testdata/lint/Deno.no_tags.jsonc index 4771b0b73..b63600a90 100644 --- a/cli/tests/testdata/lint/Deno.no_tags.jsonc +++ b/cli/tests/testdata/lint/Deno.no_tags.jsonc @@ -1,13 +1,11 @@ { "lint": { - "files": { - "include": [ - "with_config/" - ], - "exclude": [ - "with_config/b.ts" - ] - }, + "include": [ + "with_config/" + ], + "exclude": [ + "with_config/b.ts" + ], "rules": { "include": [ "ban-untagged-todo" diff --git a/cli/tests/testdata/lint/with_malformed_config.out b/cli/tests/testdata/lint/with_malformed_config.out index 3aa491065..1c0f0fff6 100644 --- a/cli/tests/testdata/lint/with_malformed_config.out +++ b/cli/tests/testdata/lint/with_malformed_config.out @@ -1,4 +1,4 @@ error: Failed to parse "lint" configuration Caused by: - unknown field `dont_know_this_field`, expected one of `rules`, `files`, `report` + unknown field `dont_know_this_field`, expected one of `rules`, `include`, `exclude`, `files`, `report` diff --git a/cli/tests/testdata/lint/with_malformed_config2.out b/cli/tests/testdata/lint/with_malformed_config2.out index 11e878f00..1c0f0fff6 100644 --- a/cli/tests/testdata/lint/with_malformed_config2.out +++ b/cli/tests/testdata/lint/with_malformed_config2.out @@ -1,4 +1,4 @@ error: Failed to parse "lint" configuration Caused by: - unknown field `dont_know_this_field`, expected `include` or `exclude` + unknown field `dont_know_this_field`, expected one of `rules`, `include`, `exclude`, `files`, `report` -- cgit v1.2.3