for more information visit the package's GitHub page
Package contains the following modules:
This package was republished as jfmengels/elm-review-unused
in order to have a more consistent naming convention for elm-review
rule packages.
To migrate, I recommend going to your review configuration and running the following commands:
# NOTE: You'll need to have Node.js installed to be able to use `npx`
npx elm-json uninstall jfmengels/review-unused --yes
npx elm-json install jfmengels/elm-review-unused --yes
Provides elm-review
rules to detect unused elements in your Elm project.
NoUnused.Variables
- Reports unused top-level variables and types, imports and imported variables and types inside of a module.NoUnused.CustomTypeConstructors
- Reports unused constructors for a custom type.NoUnused.Exports
- Reports unused exposed elements from a module.NoUnused.Modules
- Reports unused modules in the project.NoUnused.Dependencies
- Reports unused dependencies in the project.NoUnused.Parameters
- Report unused parameters.NoUnused.Patterns
- Report useless patterns and pattern values that are not used.module ReviewConfig exposing (config)
import NoUnused.CustomTypeConstructors
import NoUnused.Dependencies
import NoUnused.Exports
import NoUnused.Modules
import NoUnused.Parameters
import NoUnused.Patterns
import NoUnused.Variables
import Review.Rule exposing (Rule)
config : List Rule
config =
[ NoUnused.CustomTypeConstructors.rule []
, NoUnused.Dependencies.rule
, NoUnused.Exports.rule
, NoUnused.Modules.rule
, NoUnused.Parameters.rule
, NoUnused.Patterns.rule
, NoUnused.Variables.rule
]
This package works by having several rules that check for different unused elements, and that complement each other.
This allows for fine-grained control over what you want the rules to do. If you add these rules to an existing project, you will likely get a lot of errors, and fixing them will take time. Instead, you can introduce these rules gradually in batches. For cases where the errors are too time-consuming to fix, you can ignore them in the configuration, until you take care of them.
A few of these rules provide automatic fixes using elm-review --fix
or elm-review --fix-all
.
Thanks to @sparksp for writing NoUnused.Parameters
and NoUnused.Patterns
.