From f2c9cc500c84a3c6051823cd3ae33d6b4c1f6266 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Sat, 17 Dec 2022 16:00:33 -0500 Subject: fix(lint): column number for pretty reporting was off by 1 (#17107) Closes #17086 --- cli/tools/lint.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'cli/tools') 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), )), ); -- cgit v1.2.3