eslint-plugin-unicorn 8.0.1 → 8.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/rules/no-for-loop.js +1 -1
package/package.json
CHANGED
package/rules/no-for-loop.js
CHANGED
|
@@ -168,7 +168,7 @@ const checkUpdateExpression = (forStatement, indexIdentifierName) => {
|
|
|
168
168
|
|
|
169
169
|
const getRemovalRange = (node, sourceCode) => {
|
|
170
170
|
const nodeText = sourceCode.getText(node);
|
|
171
|
-
const {line} = sourceCode.getLocFromIndex(node.
|
|
171
|
+
const {line} = sourceCode.getLocFromIndex(node.range[0]);
|
|
172
172
|
const lineText = sourceCode.lines[line - 1];
|
|
173
173
|
|
|
174
174
|
const isOnlyNodeOnItsLine = lineText.trim() === nodeText;
|