We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
range[1]
end
1 parent 24044e0 commit aa4c339Copy full SHA for aa4c339
lib/rules/jsx-first-prop-new-line.js
@@ -45,7 +45,7 @@ module.exports = {
45
node: decl,
46
message: 'Property should be placed on a new line',
47
fix: function(fixer) {
48
- return fixer.replaceTextRange([node.name.end, decl.range[0]], '\n');
+ return fixer.replaceTextRange([node.name.range[1], decl.range[0]], '\n');
49
}
50
});
51
@@ -58,7 +58,7 @@ module.exports = {
58
node: firstNode,
59
message: 'Property should be placed on the same line as the component declaration',
60
61
- return fixer.replaceTextRange([node.name.end, firstNode.range[0]], ' ');
+ return fixer.replaceTextRange([node.name.range[1], firstNode.range[0]], ' ');
62
63
64
return;
0 commit comments