@so1ve/eslint-plugin 0.45.1 → 0.45.3

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/dist/index.cjs CHANGED
@@ -111,6 +111,9 @@ const genericSpacing = createEslintRule({
111
111
  const lastParam = params[params.length - 1];
112
112
  const endBracket = sourceCode.getTokenAfter(lastParam);
113
113
  const rightToken = sourceCode.getTokenAfter(endBracket, util__namespace.isOpeningParenToken);
114
+ if (!rightToken) {
115
+ return;
116
+ }
114
117
  const hasSpacingAfterParam = sourceCode.isSpaceBetween(endBracket, rightToken);
115
118
  if (hasSpacingBeforeNode && node.parent.type !== utils.AST_NODE_TYPES.TSFunctionType) {
116
119
  context.report({
package/dist/index.mjs CHANGED
@@ -96,6 +96,9 @@ const genericSpacing = createEslintRule({
96
96
  const lastParam = params[params.length - 1];
97
97
  const endBracket = sourceCode.getTokenAfter(lastParam);
98
98
  const rightToken = sourceCode.getTokenAfter(endBracket, util.isOpeningParenToken);
99
+ if (!rightToken) {
100
+ return;
101
+ }
99
102
  const hasSpacingAfterParam = sourceCode.isSpaceBetween(endBracket, rightToken);
100
103
  if (hasSpacingBeforeNode && node.parent.type !== AST_NODE_TYPES.TSFunctionType) {
101
104
  context.report({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@so1ve/eslint-plugin",
3
- "version": "0.45.1",
3
+ "version": "0.45.3",
4
4
  "author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
5
5
  "contributors": [
6
6
  {