Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jsdoc eslint errors halt not shown in VS #13

Open
nminkov opened this issue Jan 21, 2022 · 2 comments
Open

jsdoc eslint errors halt not shown in VS #13

nminkov opened this issue Jan 21, 2022 · 2 comments

Comments

@nminkov
Copy link

nminkov commented Jan 21, 2022

Hi, have a very weird issue. If there is jsdoc error, it's not shown in VS error/warn log and any following error neighed.

e.g.
`;

/**
*@note test
*/
class test
{
a = 1;
};`

This must display (got it from command line eslint execution):
1:1 error Unnecessary semicolon no-extra-semi
4:0 warning Invalid JSDoc tag name "note" jsdoc/check-tag-names
6:7 warning 'test' is defined but never used no-unused-vars
9:2 error Unnecessary semicolon no-extra-semi
9:3 error Newline required at end of file but not found eol-last

Howerver in VS I have a single
(no-extra-semi) Unnecessary semicolon. Miscellaneous Files test.js1

If I remove the error from the JS doc or remove the doc, will get all the following errors.

I suspect some kind of parsing error in your plugin related to jsdoc output (double quote?)

Thanks for fixing it

@aswathysdas
Copy link

Hi, have a very weird issue. If there is jsdoc error, it's not shown in VS error/warn log and any following error neighed.

e.g. `;

/** *@note test */ class test { a = 1; };`

This must display (got it from command line eslint execution): 1:1 error Unnecessary semicolon no-extra-semi 4:0 warning Invalid JSDoc tag name "note" jsdoc/check-tag-names 6:7 warning 'test' is defined but never used no-unused-vars 9:2 error Unnecessary semicolon no-extra-semi 9:3 error Newline required at end of file but not found eol-last

Howerver in VS I have a single (no-extra-semi) Unnecessary semicolon. Miscellaneous Files test.js1

If I remove the error from the JS doc or remove the doc, will get all the following errors.

I suspect some kind of parsing error in your plugin related to jsdoc output (double quote?)

Thanks for fixing it

@aswathysdas
Copy link

aswathysdas commented Feb 14, 2022

ESLint uses Doctrine to parse JSDoc comments. In case parsing fails, ESLint outputs whatever parser returned. You can try to use Doctrine directly on your JSDoc code, and see if it will be able to provide more meaningful error.

var doctrine = require("doctrine");
#13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants