Skip to content
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

Have the cli also export the lines where the occurrence happened #1897

Closed
santialbo opened this issue Jul 29, 2020 · 2 comments
Closed

Have the cli also export the lines where the occurrence happened #1897

santialbo opened this issue Jul 29, 2020 · 2 comments

Comments

@santialbo
Copy link
Contributor

Which package?
cli

Is your feature request related to a problem? Please describe.
On 1.x.x the cli used to export the lines and column where the token was found which was useful to create a reference (e.g: /path/to/file.tsx:XX:XX).
After 2.0.0 the cli is only exporting the position in the whole file which makes it harder to build that reference.

Describe the solution you'd like
I don't have a preference for the interface as long as the data is available somehow.

Describe alternatives you've considered
I have considered modifying the script so that it opens the source files and calculates the line and column.

@longlho
Copy link
Member

longlho commented Jul 29, 2020

yeah this was a regression since we switched to the TypeScript compiler. Some tooling also prefer absolution char positioning since it doesn't deal w/ encoding (e.g byte-based offset vs utf-8 offset).
Thanks for reporting. We'll add an option for this soon.

@santialbo
Copy link
Contributor Author

Thanks a lot!

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

No branches or pull requests

2 participants