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
When using TypeScript w/ multiple Annotations, eslint-plugin-jsdoc is expecting the doc to appear in a strange place. #571 indicates that the doc comment should be above annotations (and it seems to work for single annotations), but in the case of multiple annotations the behavior does not match.
Expected behavior
The following code snippet does not trigger the rule jsdoc/require-jsdoc.
/** Defines the current user's settings. */
@Injectable({providedIn: 'root',})
@State<Partial<UserSettingsStateModel>>({name: 'userSettings',defaults: {isDev: !environment.production,},})exportclassUserSettingsState{}
Actual behavior
The above code triggers the rule jsdoc/require-jsdoc, even though VS Code detects the documentation correctly.
It considers this valid:
@Injectable({providedIn: 'root',})
@State<Partial<UserSettingsStateModel>>({name: 'userSettings',defaults: {isDev: !environment.production,},})/** Defines the current user's settings. */exportclassUserSettingsState{}
When run with --fix and no documentation, it attempts to place the doc comment line so:
(AFAIK this is invalid, and VS Code does not pick it up)
When using TypeScript w/ multiple Annotations, eslint-plugin-jsdoc is expecting the doc to appear in a strange place. #571 indicates that the doc comment should be above annotations (and it seems to work for single annotations), but in the case of multiple annotations the behavior does not match.
Expected behavior
The following code snippet does not trigger the rule jsdoc/require-jsdoc.
Actual behavior
The above code triggers the rule jsdoc/require-jsdoc, even though VS Code detects the documentation correctly.
It considers this valid:
When run with --fix and no documentation, it attempts to place the doc comment line so:
(AFAIK this is invalid, and VS Code does not pick it up)
ESLint Config
ESLint sample
Environment
eslint-plugin-jsdoc
version: 30.7.8The text was updated successfully, but these errors were encountered: