diff options
Diffstat (limited to 'tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noRestrictedSyntax.js')
-rw-r--r-- | tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noRestrictedSyntax.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noRestrictedSyntax.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noRestrictedSyntax.js index f8b76a7c9bc..6234c3d7d86 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noRestrictedSyntax.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noRestrictedSyntax.js @@ -20,8 +20,6 @@ var _default = (0, _iterateJsdoc.default)(({ sourceCode, report }) => { - var _foundContext$context, _foundContext$message; - if (!context.options.length) { report('Rule `no-restricted-syntax` is missing a `context` option.'); return; @@ -43,8 +41,8 @@ var _default = (0, _iterateJsdoc.default)(({ return; } - const contextStr = typeof foundContext === 'object' ? (_foundContext$context = foundContext.context) !== null && _foundContext$context !== void 0 ? _foundContext$context : 'any' : foundContext; - const message = (_foundContext$message = foundContext === null || foundContext === void 0 ? void 0 : foundContext.message) !== null && _foundContext$message !== void 0 ? _foundContext$message : 'Syntax is restricted: {{context}}' + (comment ? ' with {{comment}}' : ''); + const contextStr = typeof foundContext === 'object' ? foundContext.context ?? 'any' : foundContext; + const message = (foundContext === null || foundContext === void 0 ? void 0 : foundContext.message) ?? 'Syntax is restricted: {{context}}' + (comment ? ' with {{comment}}' : ''); report(message, null, null, { comment, context: contextStr |