Eslint: `eol-last`: Issues should be reported in last column, not the first

Created on 13 Sep 2016  路  3Comments  路  Source: eslint/eslint

Currently, eol-last always reports linting issues in column 1.

Earlier today, @kaicataldo and I had a discussion about this and thought that semantically, it would make more sense to report issues at: _last line, last column_ (as opposed to: _last line, first column_), since the last EOL in a file is also the last character of a line.

One might argue that the last EOL is a newline, so we could theoretically also report the issue in column 0, but in line lines + 1. For users, the latter approach might be unexpected and have bad editor integration.

What do you think?

accepted archived due to age bug

Most helpful comment

:+1: for last line, last column. My vote is bug fix, because report count won't change and reports are currently wrong.

All 3 comments

I think lines + 1 could create unexpected behavior as you mentioned, so "last line, last column" sounds good to me.
Not sure if this should be considered an enhancement or a bug fix, though.

:+1: for last line, last column. My vote is bug fix, because report count won't change and reports are currently wrong.

@platinumazure good point, agreed!

Was this page helpful?
0 / 5 - 0 ratings