Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/rules/jsx-first-prop-new-line.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ module.exports = {
node: decl,
message: 'Property should be placed on a new line',
fix: function(fixer) {
return fixer.replaceTextRange([node.name.end, decl.range[0]], '\n');
return fixer.replaceTextRange([node.name.range[1], decl.range[0]], '\n');
}
});
}
Expand All @@ -58,7 +58,7 @@ module.exports = {
node: firstNode,
message: 'Property should be placed on the same line as the component declaration',
fix: function(fixer) {
return fixer.replaceTextRange([node.name.end, firstNode.range[0]], ' ');
return fixer.replaceTextRange([node.name.range[1], firstNode.range[0]], ' ');
}
});
return;
Expand Down