@putout/eslint 1.10.1 → 2.0.1

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.
@@ -108,7 +108,7 @@ const createGetSpacesBeforeNode = ({getText}) => (node, text = getText(node)) =>
108
108
  let spaces = '';
109
109
  let i = 0;
110
110
 
111
- if (node === node.parent?.body?.[0].expression)
111
+ if (node === node.parent?.body?.[0]?.expression)
112
112
  return '';
113
113
 
114
114
  while (!spaces || /^[ \n]+$/.test(spaces))
@@ -117,9 +117,9 @@ const createGetSpacesBeforeNode = ({getText}) => (node, text = getText(node)) =>
117
117
 
118
118
  return spaces.slice(1);
119
119
  };
120
- module.exports.createGetSpaceBeforeNode = createGetSpacesBeforeNode;
120
+ module.exports.createGetSpacesBeforeNode = createGetSpacesBeforeNode;
121
121
 
122
- const createGetSpacesAfterNode = ({getText}) => (node, {text = getText(node)}) => {
122
+ const createGetSpacesAfterNode = ({getText}) => (node, text = getText(node)) => {
123
123
  const reg = /^[ \n;]+$/;
124
124
 
125
125
  if (isLastNodeInBody(node))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/eslint",
3
- "version": "1.10.1",
3
+ "version": "2.0.1",
4
4
  "type": "commonjs",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "Wrapper that simplifies ESLint API and makes it compatible with 🐊Putout",