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.
1 parent c155bfd commit 80f7b52Copy full SHA for 80f7b52
lib/rules/jsx-indent.js
@@ -168,18 +168,15 @@ module.exports = {
168
* @return {Number} Indent
169
*/
170
function getNodeIndent(node, byLastLine, excludeCommas) {
171
- const finalLine = !!byLastLine;
172
- const noCommas = !!excludeCommas;
173
-
174
let src = context.getSourceCode().getText(node, node.loc.start.column + extraColumnStart);
175
const lines = src.split('\n');
176
- if (finalLine) {
+ if (byLastLine) {
177
src = lines[lines.length - 1];
178
} else {
179
src = lines[0];
180
}
181
182
- const skip = noCommas ? ',' : '';
+ const skip = excludeCommas ? ',' : '';
183
184
let regExp;
185
if (indentType === 'space') {
0 commit comments