You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The jsdoc/no-restricted-syntax rule works with an inline and a single line JSDoc blocks.
Actual behavior
The jsdoc/jsdoc/no-restricted-syntax doesn't report the issue when using an inline or single line JSDoc comment block. The rule works only for a multiline JSDdoc comment:
ESLint Config
module.exports={rules: {'jsdoc/no-restricted-syntax': ['error',{contexts: [{comment: 'JsdocBlock:has(JsdocTag[tag="type"]:has([value=/FunctionComponent/]))',context: 'any',message: 'The `FunctionComponent` type is not allowed. Please use `FC` instead.',},],},],}};
ESLint sample
/** @type {React.FunctionComponent<{ children: React.ReactNode }>}*/constMyComponent=({ children })=>{returnchildren;}
Environment
Node version: v16.13.0
ESLint version v8.7.0
eslint-plugin-jsdoc version: 37.6.1
The text was updated successfully, but these errors were encountered:
Expected behavior
The
jsdoc/no-restricted-syntax
rule works with an inline and a single line JSDoc blocks.Actual behavior
The
jsdoc/jsdoc/no-restricted-syntax
doesn't report the issue when using an inline or single line JSDoc comment block. The rule works only for a multiline JSDdoc comment:ESLint Config
ESLint sample
Environment
eslint-plugin-jsdoc
version: 37.6.1The text was updated successfully, but these errors were encountered: