Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

incorrect possition within line #122

Closed
yohny opened this issue Oct 17, 2015 · 3 comments
Closed

incorrect possition within line #122

yohny opened this issue Oct 17, 2015 · 3 comments

Comments

@yohny
Copy link

yohny commented Oct 17, 2015

Using the linked sample I discovered that linter-jscs reports incorrect column position inside Atom. When I run jscs on provided sample.js file in console I get
console
which is correct, however inside Atom the issue is reported as
atom1
error and line are correct, but column within line is not - it's not 7.
atom2

@Arcanemagus
Copy link
Member

For some reason this package decides to ignore the column specified by the linter and make one up of their own here.

jscs itself has the correct column as you can see from the output here:

JSON.stringify(errors)
"[{"filename":"C:\\Users\\Landon\\Downloads\\sample\\sample.js","rule":"requireSpaceBeforeBinaryOperators","message":"Operator + should not stick to preceding expression","line":3,"column":35,"fixed":true}]"

@iam4x or @simonappelt do either of you know why this was done? I personally don't use this linter.

@casesandberg
Copy link
Contributor

It looks like it was done like that so that the line with the error would be underlined with the dotted red. I think atom does a good job with the red dots to the left so I am going to fix the code such that that echos the proper column number.

@casesandberg
Copy link
Contributor

This has been fixed! Go ahead and update to 3.4.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants