Skip to content

Commit

Permalink
Made requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
caroline223 committed Jul 6, 2022
1 parent c155bfd commit 80f7b52
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/rules/jsx-indent.js
Expand Up @@ -168,18 +168,15 @@ module.exports = {
* @return {Number} Indent
*/
function getNodeIndent(node, byLastLine, excludeCommas) {
const finalLine = !!byLastLine;
const noCommas = !!excludeCommas;

let src = context.getSourceCode().getText(node, node.loc.start.column + extraColumnStart);
const lines = src.split('\n');
if (finalLine) {
if (byLastLine) {
src = lines[lines.length - 1];
} else {
src = lines[0];
}

const skip = noCommas ? ',' : '';
const skip = excludeCommas ? ',' : '';

let regExp;
if (indentType === 'space') {
Expand Down

0 comments on commit 80f7b52

Please sign in to comment.