microsoft / tsdoc

A doc comment standard for TypeScript
https://tsdoc.org/
MIT License
4.74k stars 131 forks source link

tsdoc-characters-after-block-tag not implemented in eslint plugin #211

Closed guillaumewuip closed 4 years ago

guillaumewuip commented 4 years ago

Bug

eslint-ts-doc-plugin crashed when trying to lint the code below, because of the ,:

/** @deprecated, hello

This error is returned:

> npm run lint --cache
npm WARN invalid config cache=true
npm WARN invalid config Must be a valid filesystem path

> test@1.0.0 lint /Users/guillaumeclochard/Downloads/a
> eslint src --ext .js,.jsx,.ts,.tsx 

TypeError: context.report() called with a messageId of 'tsdoc-characters-after-block-tag' which is not present in the 'messages' config: {
  "error-loading-config-file": "Error loading TSDoc config file:\n{{details}}",
  "error-applying-config": "Error applying TSDoc configuration: {{details}}",
  "tsdoc-at-sign-in-word": "tsdoc-at-sign-in-word: {{unformattedText}}",

...

Full error here: https://github.com/guillaumewuip/eslint-tsdoc-error-example/pull/2 Reproduction repo here: https://github.com/guillaumewuip/eslint-tsdoc-error-example

Expected behavior

No crash. Either the correct tsdoc-characters-after-block-tag message is used for this lint error, or something more generic like "TSDoc unknown error message" ?

anodynos commented 4 years ago

Quick remedy until fixed, use exact version "0.1.1".

octogonz commented 4 years ago

This fix was released with tsdoc version 0.12.19 and eslint-plugin-tsdoc version 0.2.4.