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
Hey everyone, been digging around the issues with regards to rules that relates to @typedef, but I don't see one so far or I might have missed it. If there is an issue already resolved or closed, would be happy to be linked to that. For now, I would like to open a feature request for the following.
At the moment, there's no way to check if an imported @typedef is no longer in use from existing rules in the plugin that's similar to an unused declared variable or unused library/package. ESLint does not produces no warnings or errors for @typedefs. Thus it up to the developer to manually spot and remove code that's no longer in use.
Current behavior
Currently, there are no warnings/errors for unused @typedefs from ESLint.
Desired behavior
With this new feature, it'll produce a warning or error for unused @typedefs from ESLint.
Alternatives considered
Creating a custom rule (no-unused-typedefs) specifically for @typedef
The text was updated successfully, but these errors were encountered:
Actually, it would seem like the problem would still persist if I were to import it instead with JavaScript since importing just JSDoc types wouldn't be supported.
And import { foo } from "typedefs.js" in a different file to use it, the editor would pick it up, but would the browser would complain when starting a dev/production server since it's not exactly a "module" and you're not really importing "foo". The original idea from the description might still be better.
Motivation
Hey everyone, been digging around the issues with regards to rules that relates to
@typedef
, but I don't see one so far or I might have missed it. If there is an issue already resolved or closed, would be happy to be linked to that. For now, I would like to open a feature request for the following.At the moment, there's no way to check if an imported
@typedef
is no longer in use from existing rules in the plugin that's similar to an unused declared variable or unused library/package. ESLint does not produces no warnings or errors for@typedefs
. Thus it up to the developer to manually spot and remove code that's no longer in use.Current behavior
Currently, there are no warnings/errors for unused
@typedefs
from ESLint.Desired behavior
With this new feature, it'll produce a warning or error for unused
@typedefs
from ESLint.Alternatives considered
Creating a custom rule (no-unused-typedefs) specifically for
@typedef
The text was updated successfully, but these errors were encountered: