fix(lint): column number for pretty reporting was off by 1 (#17107)

Closes #17086
This commit is contained in:
David Sherret 2022-12-17 16:00:33 -05:00 committed by GitHub
parent 738e80a0da
commit f2c9cc500c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 11 deletions

View file

@ -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),
)),
);