summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cli/tests/testdata/lint/expected_quiet.out4
-rw-r--r--cli/tests/testdata/lint/with_config.out4
-rw-r--r--cli/tests/testdata/lint/with_config_and_flags.out4
-rw-r--r--cli/tests/testdata/lint/with_config_without_tags.out4
-rw-r--r--cli/tools/lint.rs8
5 files changed, 13 insertions, 11 deletions
diff --git a/cli/tests/testdata/lint/expected_quiet.out b/cli/tests/testdata/lint/expected_quiet.out
index d7c9d7bb9..7a2ef48e6 100644
--- a/cli/tests/testdata/lint/expected_quiet.out
+++ b/cli/tests/testdata/lint/expected_quiet.out
@@ -1,14 +1,14 @@
(ban-untagged-ignore) Ignore directive requires lint rule name(s)
// deno-lint-ignore
^^^^^^^^^^^^^^^^^^^
- at [WILDCARD]file1.js:1:0
+ at [WILDCARD]file1.js:1:1
hint: [WILDCARD]
(no-empty) Empty block statement
while (false) {}
^^
- at [WILDCARD]file1.js:2:14
+ at [WILDCARD]file1.js:2:15
hint: [WILDCARD]
diff --git a/cli/tests/testdata/lint/with_config.out b/cli/tests/testdata/lint/with_config.out
index ea4581af8..2ea821c05 100644
--- a/cli/tests/testdata/lint/with_config.out
+++ b/cli/tests/testdata/lint/with_config.out
@@ -1,7 +1,7 @@
(ban-untagged-todo) TODO should be tagged with (@username) or (#issue)
// TODO: foo
^^^^^^^^^^^^
- at [WILDCARD]a.ts:1:0
+ at [WILDCARD]a.ts:1:1
hint: Add a user tag or issue reference to the TODO comment, e.g. TODO(@djones), TODO(djones), TODO(#123)
help: for further information visit https://lint.deno.land/#ban-untagged-todo
@@ -9,7 +9,7 @@
(no-unused-vars) `add` is never used
function add(a: number, b: number): number {
^^^
- at [WILDCARD]a.ts:2:9
+ at [WILDCARD]a.ts:2:10
hint: If this is intentional, prefix it with an underscore like `_add`
help: for further information visit https://lint.deno.land/#no-unused-vars
diff --git a/cli/tests/testdata/lint/with_config_and_flags.out b/cli/tests/testdata/lint/with_config_and_flags.out
index 0a409343e..41432df9d 100644
--- a/cli/tests/testdata/lint/with_config_and_flags.out
+++ b/cli/tests/testdata/lint/with_config_and_flags.out
@@ -1,7 +1,7 @@
(ban-untagged-todo) TODO should be tagged with (@username) or (#issue)
// TODO: this file should be ignored
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- at [WILDCARD]b.ts:1:0
+ at [WILDCARD]b.ts:1:1
hint: Add a user tag or issue reference to the TODO comment, e.g. TODO(@djones), TODO(djones), TODO(#123)
help: for further information visit https://lint.deno.land/#ban-untagged-todo
@@ -9,7 +9,7 @@
(no-unused-vars) `subtract` is never used
function subtract(a: number, b: number): number {
^^^^^^^^
- at [WILDCARD]b.ts:2:9
+ at [WILDCARD]b.ts:2:10
hint: If this is intentional, prefix it with an underscore like `_subtract`
help: for further information visit https://lint.deno.land/#no-unused-vars
diff --git a/cli/tests/testdata/lint/with_config_without_tags.out b/cli/tests/testdata/lint/with_config_without_tags.out
index ea4581af8..2ea821c05 100644
--- a/cli/tests/testdata/lint/with_config_without_tags.out
+++ b/cli/tests/testdata/lint/with_config_without_tags.out
@@ -1,7 +1,7 @@
(ban-untagged-todo) TODO should be tagged with (@username) or (#issue)
// TODO: foo
^^^^^^^^^^^^
- at [WILDCARD]a.ts:1:0
+ at [WILDCARD]a.ts:1:1
hint: Add a user tag or issue reference to the TODO comment, e.g. TODO(@djones), TODO(djones), TODO(#123)
help: for further information visit https://lint.deno.land/#ban-untagged-todo
@@ -9,7 +9,7 @@
(no-unused-vars) `add` is never used
function add(a: number, b: number): number {
^^^
- at [WILDCARD]a.ts:2:9
+ at [WILDCARD]a.ts:2:10
hint: If this is intentional, prefix it with an underscore like `_add`
help: for further information visit https://lint.deno.land/#no-unused-vars
diff --git a/cli/tools/lint.rs b/cli/tools/lint.rs
index 1b2487e4c..9925c3273 100644
--- a/cli/tools/lint.rs
+++ b/cli/tools/lint.rs
@@ -413,9 +413,11 @@ impl LintReporter for PrettyLintReporter {
d.hint.as_ref(),
&format_location(&JsStackFrame::from_location(
Some(d.filename.clone()),
- Some(d.range.start.line_index as i64 + 1), // 1-indexed
- // todo(#11111): make 1-indexed as well
- Some(d.range.start.column_index as i64),
+ // todo(dsherret): these should use "display positions"
+ // which take into account the added column index of tab
+ // indentation
+ Some(d.range.start.line_index as i64 + 1),
+ Some(d.range.start.column_index as i64 + 1),
)),
);