summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/fmt
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/testdata/fmt')
-rw-r--r--cli/tests/testdata/fmt/deno.malformed.jsonc6
-rw-r--r--cli/tests/testdata/fmt/deno.malformed2.jsonc8
-rw-r--r--cli/tests/testdata/fmt/fmt_with_deprecated_config.out3
-rw-r--r--cli/tests/testdata/fmt/fmt_with_malformed_config.out2
-rw-r--r--cli/tests/testdata/fmt/fmt_with_malformed_config2.out2
-rw-r--r--cli/tests/testdata/fmt/with_config/deno.deprecated.jsonc20
-rw-r--r--cli/tests/testdata/fmt/with_config/deno.jsonc28
7 files changed, 42 insertions, 27 deletions
diff --git a/cli/tests/testdata/fmt/deno.malformed.jsonc b/cli/tests/testdata/fmt/deno.malformed.jsonc
index c6200c4ee..e326edb1f 100644
--- a/cli/tests/testdata/fmt/deno.malformed.jsonc
+++ b/cli/tests/testdata/fmt/deno.malformed.jsonc
@@ -1,9 +1,7 @@
{
"fmt": {
- "files": {
- "include": ["fmt_with_config/"],
- "exclude": ["fmt_with_config/b.ts"]
- },
+ "include": ["fmt_with_config/"],
+ "exclude": ["fmt_with_config/b.ts"],
"dont_know_this_field": {},
"options": {
"useTabs": true
diff --git a/cli/tests/testdata/fmt/deno.malformed2.jsonc b/cli/tests/testdata/fmt/deno.malformed2.jsonc
index 4d6e99ae2..e326edb1f 100644
--- a/cli/tests/testdata/fmt/deno.malformed2.jsonc
+++ b/cli/tests/testdata/fmt/deno.malformed2.jsonc
@@ -1,10 +1,8 @@
{
"fmt": {
- "files": {
- "include": ["fmt_with_config/"],
- "exclude": ["fmt_with_config/b.ts"],
- "dont_know_this_field": {}
- },
+ "include": ["fmt_with_config/"],
+ "exclude": ["fmt_with_config/b.ts"],
+ "dont_know_this_field": {},
"options": {
"useTabs": true
}
diff --git a/cli/tests/testdata/fmt/fmt_with_deprecated_config.out b/cli/tests/testdata/fmt/fmt_with_deprecated_config.out
new file mode 100644
index 000000000..793fac1bc
--- /dev/null
+++ b/cli/tests/testdata/fmt/fmt_with_deprecated_config.out
@@ -0,0 +1,3 @@
+Warning: "options" configuration is deprecated. Please use "flat" options instead.
+Warning: "files" configuration is deprecated. Please use "include" and "exclude" instead.
+Checked 2 files
diff --git a/cli/tests/testdata/fmt/fmt_with_malformed_config.out b/cli/tests/testdata/fmt/fmt_with_malformed_config.out
index 1a55613ef..c269053a6 100644
--- a/cli/tests/testdata/fmt/fmt_with_malformed_config.out
+++ b/cli/tests/testdata/fmt/fmt_with_malformed_config.out
@@ -1,4 +1,4 @@
error: Failed to parse "fmt" configuration
Caused by:
- unknown field `dont_know_this_field`, expected `options` or `files`
+ unknown field `dont_know_this_field`, expected one of `useTabs`, `lineWidth`, `indentWidth`, `singleQuote`, `proseWrap`, `semiColons`, `options`, `include`, `exclude`, `files`
diff --git a/cli/tests/testdata/fmt/fmt_with_malformed_config2.out b/cli/tests/testdata/fmt/fmt_with_malformed_config2.out
index 948b6b5b8..c269053a6 100644
--- a/cli/tests/testdata/fmt/fmt_with_malformed_config2.out
+++ b/cli/tests/testdata/fmt/fmt_with_malformed_config2.out
@@ -1,4 +1,4 @@
error: Failed to parse "fmt" configuration
Caused by:
- unknown field `dont_know_this_field`, expected `include` or `exclude`
+ unknown field `dont_know_this_field`, expected one of `useTabs`, `lineWidth`, `indentWidth`, `singleQuote`, `proseWrap`, `semiColons`, `options`, `include`, `exclude`, `files`
diff --git a/cli/tests/testdata/fmt/with_config/deno.deprecated.jsonc b/cli/tests/testdata/fmt/with_config/deno.deprecated.jsonc
new file mode 100644
index 000000000..e053233fd
--- /dev/null
+++ b/cli/tests/testdata/fmt/with_config/deno.deprecated.jsonc
@@ -0,0 +1,20 @@
+{
+ "fmt": {
+ "files": {
+ "include": [
+ "./subdir/"
+ ],
+ "exclude": [
+ "./subdir/b.ts"
+ ]
+ },
+ "options": {
+ "useTabs": true,
+ "lineWidth": 40,
+ "indentWidth": 8,
+ "singleQuote": true,
+ "proseWrap": "always",
+ "semiColons": false
+ }
+ }
+}
diff --git a/cli/tests/testdata/fmt/with_config/deno.jsonc b/cli/tests/testdata/fmt/with_config/deno.jsonc
index 44e3f9a99..ffd265dcd 100644
--- a/cli/tests/testdata/fmt/with_config/deno.jsonc
+++ b/cli/tests/testdata/fmt/with_config/deno.jsonc
@@ -1,20 +1,16 @@
{
"fmt": {
- "files": {
- "include": [
- "./subdir/"
- ],
- "exclude": [
- "./subdir/b.ts"
- ]
- },
- "options": {
- "useTabs": true,
- "lineWidth": 40,
- "indentWidth": 8,
- "singleQuote": true,
- "proseWrap": "always",
- "semiColons": false
- }
+ "include": [
+ "./subdir/"
+ ],
+ "exclude": [
+ "./subdir/b.ts"
+ ],
+ "useTabs": true,
+ "lineWidth": 40,
+ "indentWidth": 8,
+ "singleQuote": true,
+ "proseWrap": "always",
+ "semiColons": false
}
}