Skip to content

Commit

Permalink
import review config from rank-anything
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianHicks committed May 10, 2021
1 parent f6a3584 commit ae4bfde
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 0 deletions.
36 changes: 36 additions & 0 deletions 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.2",
"jfmengels/elm-review": "2.4.1",
"jfmengels/elm-review-common": "1.0.3",
"jfmengels/elm-review-unused": "1.1.9",
"stil4m/elm-syntax": "7.2.3"
},
"indirect": {
"elm/html": "1.0.0",
"elm/parser": "1.1.0",
"elm/random": "1.0.0",
"elm/time": "1.0.0",
"elm/virtual-dom": "1.0.2",
"elm-community/list-extra": "8.3.0",
"elm-explorations/test": "1.2.2",
"miniBill/elm-unicode": "1.0.2",
"rtfeldman/elm-hex": "1.0.0",
"stil4m/structured-writer": "1.0.3"
}
},
"test-dependencies": {
"direct": {
"elm-explorations/test": "1.2.2"
},
"indirect": {}
}
}
50 changes: 50 additions & 0 deletions review/src/ReviewConfig.elm
@@ -0,0 +1,50 @@
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 NoExposingEverything
import NoImportingEverything
import NoMissingTypeAnnotation
import NoMissingTypeAnnotationInLetIn
import NoMissingTypeExpose
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 as Rule exposing (Rule)


config : List Rule
config =
[ -- common
NoExposingEverything.rule
|> Rule.ignoreErrorsForDirectories [ "tests" ]
, NoImportingEverything.rule []
|> Rule.ignoreErrorsForDirectories [ "tests" ]
, NoMissingTypeAnnotation.rule
, NoMissingTypeAnnotationInLetIn.rule
, NoMissingTypeExpose.rule

-- unused
, NoUnused.CustomTypeConstructors.rule []
, NoUnused.CustomTypeConstructorArgs.rule
, NoUnused.Dependencies.rule
, NoUnused.Exports.rule
, NoUnused.Modules.rule
, NoUnused.Parameters.rule
, NoUnused.Patterns.rule
, NoUnused.Variables.rule
]
1 change: 1 addition & 0 deletions shell.nix
Expand Up @@ -12,5 +12,6 @@ in pkgs.mkShell {
pkgs.elmPackages.elm-test
pkgs.elmPackages.elm-format
pkgs.elmPackages.elm-json
pkgs.elmPackages.elm-review
];
}

0 comments on commit ae4bfde

Please sign in to comment.