Skip to content

Detecting unused $dependencies #5

@jakub-g

Description

@jakub-g

It would be interesting to have an option to remove dead dependencies, i.e. the deps that are defined in $dependencies but then not referenced anywhere in the code.

Right now those deps are already implicitly detected; the output of conversion looks like this:

var Aria = require("ariatemplates/Aria");
var modulesSthSth = require("modules/sth/Sth");
require("ariatemplates/utils/Data"); // this is not written to any variable -> it's actually an unused import
var ariaUtilsJson = require("ariatemplates/utils/Json");

To be decided if this should be the default behavior, probably yes, perhaps with a log to stderr about the fact.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions