-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
refactor: refactor lib/reporter.js #3021
Conversation
lib/reporter.js
Outdated
|
||
return function (input, indentation) { | ||
indentation = _.isString(indentation) ? indentation : '' | ||
indentation = helper.isString(indentation) ? indentation : '' |
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.
Rather than introduce helper
just for this one case while keeping lodash
for the other cases, I'd rather consistently use one or the other.
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.
Fixed
lib/reporter.js
Outdated
return cache.get(sourceMap) | ||
} | ||
|
||
function formatFullPath (path, line, 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.
Maybe "formatPathMapping"?
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.
Fixed
lib/reporter.js
Outdated
|
||
// When no column is given and we default to 0, it doesn't make sense to only search for smaller | ||
// or equal columns in the sourcemap, let's search for equal or greater columns. |
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.
I think this comment is helpful.
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.
Reverted
lib/reporter.js
Outdated
.originalPositionFor({line: line, column: (column || 0), bias: bias}) | ||
|
||
// Source maps often only have a local file name, resolve to turn into a full path if | ||
// the path is not absolute yet. |
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.
And this one.
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.
Reverted
No description provided.