This is how I setup a new elm project for development.

In a fresh directory:

elm init

Install elm-live and start server.

npm init
npm install --save-dev elm-live
node_modules/.bin/elm-live src/Main.elm

Install elm-test.

npm install --save-dev elm-test
elm-test init

Install pre-commit hooks.

npm install --save-dev husky lint-staged

Then add to elm.json.

  "husky": {
    "hooks": {
      "pre-commit": "lint-staged"
    }
  },
  "lint-staged": {
    "**/*.elm": [
      "elm-format --validate",
      "elm-review"
    ]
  },

Elm-review & elm-review-unused.

npm install --save-dev elm-review
npx elm-review init
cd review
elm install jfmengels/elm-review-unused

Then add to review/src/ReviewConfig.elm:

module ReviewConfig exposing (config)

-- import NoUnused.Dependencies
-- import NoUnused.CustomTypeConstructorArgs

import NoUnused.CustomTypeConstructors
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.CustomTypeConstructorArgs.rule
    -- , NoUnused.Dependencies.rule
    , NoUnused.Exports.rule
    , NoUnused.Modules.rule
    , NoUnused.Parameters.rule
    , NoUnused.Patterns.rule
    , NoUnused.Variables.rule
    ]

To build the production elm.js file:

elm make src/Main.elm --optimize --output docs/elm.js