eslint-plugin-putout 13.1.0 → 13.2.0

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.
@@ -33,6 +33,9 @@ module.exports.filter = ({text, node, getCommentsBefore, getSpacesBeforeNode}) =
33
33
 
34
34
  const spaces = getSpacesBeforeNode(node, text);
35
35
 
36
+ if (!spaces)
37
+ return false;
38
+
36
39
  if (regExp.test(spaces))
37
40
  return false;
38
41
 
@@ -43,7 +46,6 @@ module.exports.filter = ({text, node, getCommentsBefore, getSpacesBeforeNode}) =
43
46
  continue;
44
47
 
45
48
  const prevA = body[i - 1];
46
- const nextA = body[i + 1];
47
49
 
48
50
  if (!isVariableDeclaration(prevA))
49
51
  return false;
@@ -53,11 +55,7 @@ module.exports.filter = ({text, node, getCommentsBefore, getSpacesBeforeNode}) =
53
55
  if (regExp.test(spaces))
54
56
  return false;
55
57
 
56
- if (!nextA)
57
- return true;
58
-
59
- const nextSpaces = getSpacesBeforeNode(nextA);
60
- return !regExp.test(nextSpaces);
58
+ return true;
61
59
  }
62
60
 
63
61
  return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-putout",
3
- "version": "13.1.0",
3
+ "version": "13.2.0",
4
4
  "type": "commonjs",
5
5
  "description": "eslint plugin for putout",
6
6
  "release": false,