ricardofbarros / linter-js-standard

Atom linter plugin for JavaScript, using JavaScript Standard Style
https://atom.io/packages/linter-js-standard
MIT License
99 stars 48 forks source link

Incorrect column numbers #74

Closed qrohlf closed 7 years ago

qrohlf commented 8 years ago

I'm getting some nonsensical underlining when using linter-js-standard in my project:

screen shot 2015-11-30 at 11 49 12 am

That's with the default settings on a fresh install of Atom.

For reference, here's how that same file looks in Sublime using sublime-linter and Sublime​Linter-contrib-standard

screen shot 2015-11-30 at 11 49 19 am

Note how the quote is highlighted and so is the non-existent variable.

qrohlf commented 8 years ago

For reference, here is the complete text of my test case:

var foo = "bar"
console.log(foo)

foo = doesNotExist
ricardofbarros commented 8 years ago

Hey @qrohlf, thanks for your report and sorry for the late reply.

This is a known issue on eslint ecosystem. Basically it's missing a range property on the report so we could know where the violation starts and ends.

But there's something going on there. It should have had highlighted the code until a EOL, but it's doing the opposite, I'll take a look into it.

gabmontes commented 8 years ago

Same issue here:

screen shot 2016-03-02 at 17 54 34

Running Atom 1.5.3 on Mac OS X 10.11.3 linter@1.11.3 linter-js-standard@3.2.1

Any news on this?

sonicdoe commented 7 years ago

Range highlighting is now considerably improved in https://github.com/ricardofbarros/linter-js-standard/commit/24e76aed136435117489fe56519e76041ceb5952 and https://github.com/ricardofbarros/linter-js-standard/commit/e5d31dc0b80139c0eee210bad517aa89394c12cb.

For example, @qrohlf’s code snippet now looks like this:

Screenshot