Skip to content

Commit

Permalink
Don't return node.start & node.end
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDeBoey committed May 9, 2020
1 parent cf71b0f commit af689be
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions __tests__/src/getProp-parser-test.js
Expand Up @@ -100,8 +100,10 @@ function adjustNodeLocations(node, { startOffset, endOffset }) {
const [start, end] = node.range || [];
return {
...node,
...(node.start !== undefined ? { start: node.start + startOffset } : {}),
...(node.end !== undefined ? { end: node.end + endOffset } : {}),
start: undefined,
end: undefined,
// ...(node.start !== undefined ? { start: node.start + startOffset } : {}),
// ...(node.end !== undefined ? { end: node.end + endOffset } : {}),
loc: {
...node.loc,
start: {
Expand Down
8 changes: 4 additions & 4 deletions src/getProp.js
Expand Up @@ -49,15 +49,15 @@ function propertyToJSXAttribute(node) {
}

function getBaseProps({
start,
end,
// start,
// end,
loc,
range,
}) {
return {
loc: getBaseLocation(loc),
...(start !== undefined ? { start } : {}),
...(end !== undefined ? { end } : {}),
// ...(start !== undefined ? { start } : {}),
// ...(end !== undefined ? { end } : {}),
...(range !== undefined ? { range } : {}),
};
}
Expand Down

0 comments on commit af689be

Please sign in to comment.