A
A
Andrew2020-11-23 18:26:50
Refactoring
Andrew, 2020-11-23 18:26:50

How to detect unused classes/fields?

The problem is this:
There is a project on angular 9, many classes have been created in it that describe the data. Some classes are combined in namespace.

How can you find all the classes that are not being used (classes are not instantiated)?
How to find class fields that are not used?

What I have already tried:
ts-prune - found one unused interface and five classes that I marked as "used in module" and which are used by
ng lint - a curious thing, but I could not find unused code.
Resharper - works badly. For example, for some reason it does not understand some of the imports (there is an import, but the use of an imported element is marked as unavailable). Unused code does not see.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
WbICHA, 2020-11-23
@WblCHA

If I'm not mistaken, it will find everything in the link with this plugin and this setting:
https://github.com/benmosher/eslint-plugin-import/...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question