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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-unicorn",
3
- "version": "8.0.1",
3
+ "version": "8.0.2",
4
4
  "description": "Various awesome ESLint rules",
5
5
  "license": "MIT",
6
6
  "repository": "sindresorhus/eslint-plugin-unicorn",
@@ -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.start);
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;