From a41b5f5f036b5c1846e8d35b95d5661c24b529cd Mon Sep 17 00:00:00 2001 From: Dillon Kearns Date: Mon, 7 Dec 2020 08:31:06 -0800 Subject: [PATCH] Add review config. --- package.json | 3 ++- review/elm.json | 36 ++++++++++++++++++++++++++++++++++++ review/src/ReviewConfig.elm | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 review/elm.json create mode 100644 review/src/ReviewConfig.elm diff --git a/package.json b/package.json index cf28cf1a..e4ce00de 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "main": "index.js", "scripts": { "build": "cd generator && elm make src/Main.elm --output src/Main.js --optimize", - "test": "elm-test && jest --rootDir jest-tests" + "test": "elm-test && jest --rootDir jest-tests", + "review": "elm-review" }, "repository": "https://github.com/dillonkearns/elm-pages", "keywords": [ diff --git a/review/elm.json b/review/elm.json new file mode 100644 index 00000000..9de7febe --- /dev/null +++ b/review/elm.json @@ -0,0 +1,36 @@ +{ + "type": "application", + "source-directories": [ + "src" + ], + "elm-version": "0.19.1", + "dependencies": { + "direct": { + "elm/core": "1.0.5", + "elm/json": "1.1.3", + "elm/project-metadata-utils": "1.0.1", + "jfmengels/elm-review": "2.3.7", + "jfmengels/elm-review-unused": "1.1.4", + "stil4m/elm-syntax": "7.1.3" + }, + "indirect": { + "elm/html": "1.0.0", + "elm/parser": "1.1.0", + "elm/random": "1.0.0", + "elm/time": "1.0.0", + "elm/url": "1.0.0", + "elm/virtual-dom": "1.0.2", + "elm-community/json-extra": "4.3.0", + "elm-community/list-extra": "8.2.4", + "rtfeldman/elm-hex": "1.0.0", + "rtfeldman/elm-iso8601-date-strings": "1.1.3", + "stil4m/structured-writer": "1.0.3" + } + }, + "test-dependencies": { + "direct": { + "elm-explorations/test": "1.2.2" + }, + "indirect": {} + } +} \ No newline at end of file diff --git a/review/src/ReviewConfig.elm b/review/src/ReviewConfig.elm new file mode 100644 index 00000000..7b2d111b --- /dev/null +++ b/review/src/ReviewConfig.elm @@ -0,0 +1,35 @@ +module ReviewConfig exposing (config) + +{-| Do not rename the ReviewConfig module or the config function, because +`elm-review` will look for these. + +To add packages that contain rules, add them to this review project using + + `elm install author/packagename` + +when inside the directory containing this file. + +-} + +import NoUnused.CustomTypeConstructorArgs +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.CustomTypeConstructorArgs.rule + , NoUnused.Dependencies.rule + , NoUnused.Exports.rule + , NoUnused.Modules.rule + , NoUnused.Parameters.rule + , NoUnused.Patterns.rule + , NoUnused.Variables.rule + ]