Skip to content

Commit 80f7b52

Browse files
committed
Made requested changes
1 parent c155bfd commit 80f7b52

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lib/rules/jsx-indent.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,18 +168,15 @@ module.exports = {
168168
* @return {Number} Indent
169169
*/
170170
function getNodeIndent(node, byLastLine, excludeCommas) {
171-
const finalLine = !!byLastLine;
172-
const noCommas = !!excludeCommas;
173-
174171
let src = context.getSourceCode().getText(node, node.loc.start.column + extraColumnStart);
175172
const lines = src.split('\n');
176-
if (finalLine) {
173+
if (byLastLine) {
177174
src = lines[lines.length - 1];
178175
} else {
179176
src = lines[0];
180177
}
181178

182-
const skip = noCommas ? ',' : '';
179+
const skip = excludeCommas ? ',' : '';
183180

184181
let regExp;
185182
if (indentType === 'space') {

0 commit comments

Comments
 (0)