diff options
| author | David Sherret <dsherret@users.noreply.github.com> | 2024-06-07 13:02:47 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-07 17:02:47 +0000 |
| commit | 78774dd6647aef137b83473ab86c2f0f1a427e86 (patch) | |
| tree | b9258a06968e617198517c21fd25c70df27fd4a3 /tests/specs | |
| parent | 708a6196930a1267e577805aed380e3715eaae10 (diff) | |
fix: do not panic linting files with UTF-8 BOM (#24136)
Closes #24122
Diffstat (limited to 'tests/specs')
| -rw-r--r-- | tests/specs/lint/bom/__test__.jsonc | 5 | ||||
| -rw-r--r-- | tests/specs/lint/bom/mod.out | 12 | ||||
| -rw-r--r-- | tests/specs/lint/bom/mod.ts | 4 |
3 files changed, 21 insertions, 0 deletions
diff --git a/tests/specs/lint/bom/__test__.jsonc b/tests/specs/lint/bom/__test__.jsonc new file mode 100644 index 000000000..f2ea579c4 --- /dev/null +++ b/tests/specs/lint/bom/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "lint mod.ts", + "exitCode": 1, + "output": "mod.out" +} diff --git a/tests/specs/lint/bom/mod.out b/tests/specs/lint/bom/mod.out new file mode 100644 index 000000000..eea1e531d --- /dev/null +++ b/tests/specs/lint/bom/mod.out @@ -0,0 +1,12 @@ +error[no-unused-vars]: `t` is never used + --> [WILDLINE] + | +4 | const t = 5; + | ^ + = hint: If this is intentional, prefix it with an underscore like `_t` + + docs: https://lint.deno.land/rules/no-unused-vars + + +Found 1 problem +Checked 1 file diff --git a/tests/specs/lint/bom/mod.ts b/tests/specs/lint/bom/mod.ts new file mode 100644 index 000000000..c2374d45d --- /dev/null +++ b/tests/specs/lint/bom/mod.ts @@ -0,0 +1,4 @@ +// this file is saved as UTF8 with BOM +console.log("Hello, world!"); + +const t = 5; |
