-
Notifications
You must be signed in to change notification settings - Fork 41
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
Open editor when clicking on notification #16
Conversation
if (error.error) { | ||
body = 'Error: ' + body + error.error.toString(); | ||
line = error.error.loc.line; | ||
column = error.error.loc.column; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is loc
always available?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. Seems to be something that babel adds.
Nice catch.
I like the idea of that templated string, although it might cause troubles when using |
Yeah - if we were to use a templated string I think we'd have to drop using the second argument of |
98aaa09
to
df3f9d7
Compare
not necessarily. we could allow |
d99678b
to
b04959f
Compare
Do you have any reason for wanting that syntax over a simple string? I believe that it'd make a simpler api. Also checked the doc for child process. If we want to send the arguments in an array we will have to use |
@alexanderchr I am worried about escaping properly if e.g. the filepath contains spaces or any other kinds of special characters ( |
4467913
to
efc1d5d
Compare
@Turbo87 True. Didn't think about that. I've implemented the templated strings i spoke of earlier - please see the changed commits. |
@alexanderchr cool, thanks! I'll try to test this tomorrow. |
@alexanderchr I've just tested this and in my current dependency setup the location info is not available at |
Interesting. What loaders are you using? |
@alexanderchr I just used the project in the |
Strange, I get I'm running node v5.6.0, what are you using? |
@alexanderchr node v5.8.0 it's been a while since I ran |
I upgraded to |
@alexanderchr |
@alexanderchr |
Still not sure how to open the editor at the correct line/position. At least in atom you can do
atom editor filename:line
but it might break other editors.One option would to let the user supply a templated string to exec instead - like
atom #{file}:#{row}
.