diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2022-12-17 16:00:33 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-17 16:00:33 -0500 |
commit | f2c9cc500c84a3c6051823cd3ae33d6b4c1f6266 (patch) | |
tree | 89d66389f526b65803b3345c8406ebf6bf967704 /cli/tools | |
parent | 738e80a0da5f23eed33d8c4937cf34b0535cd17a (diff) |
fix(lint): column number for pretty reporting was off by 1 (#17107)
Closes #17086
Diffstat (limited to 'cli/tools')
-rw-r--r-- | cli/tools/lint.rs | 8 |
1 files changed, 5 insertions, 3 deletions
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), )), ); |