eslint-plugin-jsdoc 65.3.13 → 65.3.14

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
@@ -163,5 +163,5 @@
163
163
  "test-cov": "TIMING=1 c8 --reporter text pnpm run test-no-cov",
164
164
  "test-index": "pnpm run test-no-cov test/rules/index.js"
165
165
  },
166
- "version": "65.3.13"
166
+ "version": "65.3.14"
167
167
  }
package/src/jsdocUtils.js CHANGED
@@ -1707,6 +1707,14 @@ const getContextObject = (contexts, checkJsdoc, handler, convertAny) => {
1707
1707
  lastIndex: idx,
1708
1708
  selector: prop.context,
1709
1709
  };
1710
+ if (prop.comment && !handler) {
1711
+ throw new Error(
1712
+ 'The `comment` property of a `contexts` entry (e.g., one from ' +
1713
+ '`settings.jsdoc.contexts`) is not supported by this rule; give the ' +
1714
+ 'rule its own `contexts` option instead.',
1715
+ );
1716
+ }
1717
+
1710
1718
  if (prop.comment) {
1711
1719
  property = /** @type {string} */ (prop.context);
1712
1720
  value = checkJsdoc.bind(
@@ -648,7 +648,7 @@ export default iterateJsdoc(({
648
648
  // checks if they are not functions but say variables), the user may
649
649
  // instead wish to narrow contexts in those settings, so this check
650
650
  // is still useful
651
- if (!allowedNodes.includes(nde.type) ||
651
+ if (!nde || !allowedNodes.includes(nde.type) ||
652
652
  nde.type === 'TSPropertySignature' &&
653
653
  (/** @type {import('@typescript-eslint/types').TSESTree.TSPropertySignature} */ (
654
654
  nde