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
This might be the only tag I can think of where the thing inside the brackets isn't really a "type" per se, but they chose to put it inside brackets anyway. I would like to be able to use @suppress tags with minimal fuss.
Using the @suppress {visibility} tag as above yields
warning The type 'visibility' is undefined jsdoc/no-undefined-types
with the jsdoc/no-undefined-types rule on and settings.jsdoc.mode set to closure.
Desired behavior
Ideally, validity/undefined checking for the suppress tag would be disabled automatically when in closure mode, or set to an allow list that matches closure's list of values.
Alternatives considered
I don't really want to maintain the list of closure's suppress values in my eslint config, though I realize that's probably safer. I would like to be able to turn off checking of the type value for the @suppress tag but
structuredTags: {
'suppress': {'type': false},
},
just gave me an error that @suppress was not allowed to have a type at all. A value like 'type': 'off' would also work, if you didn't want to build in support directly for the suppress tag. Or perhaps there is already a way to do this, but I couldn't find it. I tried messing around with namepath-defining etc and didn't get anywhere.
FWIW, I just updated from eslint v5->7 and eslint-plugin-jsdoc v22 -> 36 and got this for the first time. On version 22 this was not an issue for us. I would have done a binary search to find which version introduced this change, but filing this issue is the last thing I'm doing before going on vacation for 4 weeks and I didn't want to forget what I have so far.
Thanks for any feedback! I searched the issues and commit history for anything related to the @suppress tag but didn't find much.
The text was updated successfully, but these errors were encountered:
Thank you for the helpful report. I've liberalized things in 37.2.3 to avoid erring with @suppress in closure mode.
I filed #816 to add some sanity checking, however: requiring an expression of whitelisted curly bracketed types with such @suppress tags, and preventing any name portion after a curly bracketed type expression.
Motivation
Closure has the
@suppress
tag: https://github.com/google/closure-compiler/wiki/@suppress-annotations where the syntax is/** @suppress {visibility} */
This might be the only tag I can think of where the thing inside the brackets isn't really a "type" per se, but they chose to put it inside brackets anyway. I would like to be able to use
@suppress
tags with minimal fuss.It's listed as a valid tag in closure mode here: https://github.com/gajus/eslint-plugin-jsdoc#check-tag-names but I get errors with it (see below)
Current behavior
Using the
@suppress {visibility}
tag as above yieldswith the
jsdoc/no-undefined-types
rule on andsettings.jsdoc.mode
set toclosure
.Desired behavior
Ideally, validity/undefined checking for the
suppress
tag would be disabled automatically when inclosure
mode, or set to an allow list that matches closure's list of values.Alternatives considered
I don't really want to maintain the list of closure's suppress values in my eslint config, though I realize that's probably safer. I would like to be able to turn off checking of the type value for the
@suppress
tag butjust gave me an error that
@suppress
was not allowed to have a type at all. A value like'type': 'off'
would also work, if you didn't want to build in support directly for the suppress tag. Or perhaps there is already a way to do this, but I couldn't find it. I tried messing around withnamepath-defining
etc and didn't get anywhere.FWIW, I just updated from eslint v5->7 and eslint-plugin-jsdoc v22 -> 36 and got this for the first time. On version 22 this was not an issue for us. I would have done a binary search to find which version introduced this change, but filing this issue is the last thing I'm doing before going on vacation for 4 weeks and I didn't want to forget what I have so far.
Thanks for any feedback! I searched the issues and commit history for anything related to the
@suppress
tag but didn't find much.The text was updated successfully, but these errors were encountered: