New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(react-jsx-source): add columnNumber property #11139
Conversation
Should we call it |
Yeah, probably. We could make up a convention that |
This will be useful to tools that consume the injected `__source` prop, allowing precise source locations to be displayed.
d1437d0
to
6d5988d
Compare
Fixed tests and corrected the information in the PR description (I had a 👍 under Breaking Change, which this isn't) |
Docs PR to go with babel/babel#11139
|
I'll change to |
I slightly prefer 0-based column numbers, but it seems that other user-facing tools start counting from 1:
(I'm ✔️ing for the implementation, not for the 1-based number, but I won't block this PR if it starts from 1 anyway) |
@motiz88 Out of curiosity, what tool would use this information? |
The specific thing we have in mind is showing better code frames for component errors in React Native. |
* react-jsx-source: add column property Docs PR to go with babel/babel#11139 * column -> columnNumber, make 1-based Updated for babel/babel@9fb61dd
This will be useful to tools that consume the injected
__source
prop, allowing precise source locations to be displayed.cc @rickhanlonii