feat(react-jsx-source): add columnNumber property (#11139)

* feat(react-jsx-source): add column property

This will be useful to tools that consume the injected `__source` prop, allowing precise source locations to be displayed.

* Rename column -> columnNumber, make 1-based
This commit is contained in:
Moti Zilberman
2020-03-16 21:59:22 +00:00
committed by GitHub
parent 740260b236
commit 1971b7e87d
4 changed files with 28 additions and 9 deletions

View File

@@ -7,7 +7,8 @@ var expected = multiline([
'var _jsxFileName = "/fake/path/mock.js";',
'var x = <sometag __source={{',
' fileName: _jsxFileName,',
' lineNumber: 1',
' lineNumber: 1,',
' columnNumber: 9',
'}} />;',
]);