-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Description
We have a particular issue after upgrading eslint-plugin-react to 7.29.0 from 7.28.0: indentation doesn't seem to be counted correctly in some cases, resulting in false positives. Take this code snippet:
case 'multiChoice':
for (let i = 0; i < obj.options.length; i += 1) {
options[i] = new Option(obj.options[i].description, parse(obj.options[i].option));
}
return new MultiChoiceNode(obj.question, // This is line 34 in the original file
obj.questionKey,
options,
parse(obj.singleOpening),
parse(obj.multipleOpening),
parse(obj.singleClosing),
parse(obj.multipleClosing));
Running the linter on this file with 7.28.0 causes no problem, but from 7.29.0 it results in the following error:
TemplateParser.js:34:7: Expected indentation of 6 space characters but found 8. [Error/react/jsx-indent]
Note that the indentation in line 34 is indeed 6 spaces, not 8 as the error message reports.
adominguez, leedabin, doberkofler, davidwalschots and Robloche
Metadata
Metadata
Assignees
Labels
No labels