Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Update: improve report location for space-infix-ops #12324
What is the purpose of this pull request? (put an "X" next to item)
[x] Changes an existing rule
What changes did you make? (Give an overview)
const a = p&&q // ~ before // ~~ after
Is there anything you'd like reviewers to focus on?
One thing confuses me. In the docs (https://eslint.org/docs/developer-guide/working-with-rules#working-with-rules) the location column is said to be 0-based, but in test cases the location column is 1-based. What's wrong?
I guess one reason context.reports expects 0-based column is that it allows passing a token location with
And one reason that problems.column is 1-based is that it is a more human friendly format, for example most editors display 1-based columns.