jfmengels / lint-unused / NoUnused.Variables

Report variables or types that are declared or imported but never used.

Rule

rule : Lint.Rule.Rule

Report variables or types that are declared or imported but never used.

NOTE: Since elm-lint only works in the scope of a single file, this rule will not report variables that are exposed but not used anywhere in the project. If you wish those to be reported, check out elm-xref.

config =
    [ NoUnused.Variables.rule
    ]

Fail

module A exposing (a)

a n =
    n + 1

b =
    a 2

Success

module A exposing (a)

a n =
    n + 1