diff options
| author | HasanAlrimawi <141642411+HasanAlrimawi@users.noreply.github.com> | 2024-09-16 20:45:25 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-16 17:45:25 +0000 |
| commit | 36a1a79f175b2df31d8ba5d7e121239c3b7e74ea (patch) | |
| tree | a2d1c96ba22181dc3301e3a20e4c4977f50b5d3d /tests/specs/lint/with_config_without_args | |
| parent | acc32e1cee043ef7233a94bcf5645c4a842ed13a (diff) | |
chore: deprecate lint itests (#25655)
Diffstat (limited to 'tests/specs/lint/with_config_without_args')
5 files changed, 50 insertions, 0 deletions
diff --git a/tests/specs/lint/with_config_without_args/Deno.no_tags.jsonc b/tests/specs/lint/with_config_without_args/Deno.no_tags.jsonc new file mode 100644 index 000000000..b63600a90 --- /dev/null +++ b/tests/specs/lint/with_config_without_args/Deno.no_tags.jsonc @@ -0,0 +1,15 @@ +{ + "lint": { + "include": [ + "with_config/" + ], + "exclude": [ + "with_config/b.ts" + ], + "rules": { + "include": [ + "ban-untagged-todo" + ] + } + } +} diff --git a/tests/specs/lint/with_config_without_args/__test__.jsonc b/tests/specs/lint/with_config_without_args/__test__.jsonc new file mode 100644 index 000000000..9a1ae7cb4 --- /dev/null +++ b/tests/specs/lint/with_config_without_args/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "lint --config Deno.no_tags.jsonc with_config/", + "output": "with_config_without_tags.out", + "exitCode": 1 +} diff --git a/tests/specs/lint/with_config_without_args/with_config/a.ts b/tests/specs/lint/with_config_without_args/with_config/a.ts new file mode 100644 index 000000000..c378218a3 --- /dev/null +++ b/tests/specs/lint/with_config_without_args/with_config/a.ts @@ -0,0 +1,4 @@ +// TODO: foo +function add(a: number, b: number): number { + return a + b; +} diff --git a/tests/specs/lint/with_config_without_args/with_config/b.ts b/tests/specs/lint/with_config_without_args/with_config/b.ts new file mode 100644 index 000000000..d5647067e --- /dev/null +++ b/tests/specs/lint/with_config_without_args/with_config/b.ts @@ -0,0 +1,4 @@ +// TODO: this file should be ignored +function subtract(a: number, b: number): number { + return a - b; +} diff --git a/tests/specs/lint/with_config_without_args/with_config_without_tags.out b/tests/specs/lint/with_config_without_args/with_config_without_tags.out new file mode 100644 index 000000000..f527bb712 --- /dev/null +++ b/tests/specs/lint/with_config_without_args/with_config_without_tags.out @@ -0,0 +1,22 @@ +error[ban-untagged-todo]: TODO should be tagged with (@username) or (#issue) + --> [WILDCARD]a.ts:1:1 + | +1 | // TODO: foo + | ^^^^^^^^^^^^ + = hint: Add a user tag or issue reference to the TODO comment, e.g. TODO(@djones), TODO(djones), TODO(#123) + + docs: https://lint.deno.land/rules/ban-untagged-todo + + +error[no-unused-vars]: `add` is never used + --> [WILDCARD]a.ts:2:10 + | +2 | function add(a: number, b: number): number { + | ^^^ + = hint: If this is intentional, prefix it with an underscore like `_add` + + docs: https://lint.deno.land/rules/no-unused-vars + + +Found 2 problems +Checked 1 file |
