Add new rule.

This commit is contained in:
Dillon Kearns 2021-06-03 17:59:58 -07:00
parent 819dd0d5e2
commit 03f8ee359f
12 changed files with 20 additions and 6 deletions

View File

@ -34,8 +34,8 @@ config : List Rule
config =
[ -- NoExposingEverything.rule
--, NoImportingEverything.rule []
--, NoMissingTypeAnnotation.rule
NoMissingTypeAnnotationInLetIn.rule
NoMissingTypeAnnotation.rule
, NoMissingTypeAnnotationInLetIn.rule
, NoMissingTypeExpose.rule
|> Rule.ignoreErrorsForFiles
[ "src/Head/Seo.elm"

View File

@ -1,6 +1,6 @@
module Pages.Internal.Platform.Mode exposing (..)
import Json.Decode as Decode
import Json.Decode as Decode exposing (Decoder)
type Mode
@ -9,6 +9,7 @@ type Mode
| ElmToHtmlBeta
modeDecoder : Decoder Mode
modeDecoder =
Decode.string
|> Decode.andThen

View File

@ -26,6 +26,7 @@ encode body =
]
encodeWithType : String -> List ( String, Encode.Value ) -> Encode.Value
encodeWithType typeName otherFields =
Encode.object <|
( "type", Encode.string typeName )

View File

@ -171,6 +171,7 @@ optionalField fieldName decoder_ =
|> Decode.andThen finishDecoding
dropTrailingIndexHtml : String -> String
dropTrailingIndexHtml =
Regex.replace (Regex.fromString "/index\\.html$" |> Maybe.withDefault Regex.never)
(\_ -> "")

View File

@ -66,6 +66,7 @@ underlineText length =
String.repeat length "^"
sortMatches : String -> List String -> List String
sortMatches missingSecret availableSecrets =
let
simpleMatch : List Fuzzy.Config -> List String -> String -> String -> Int

View File

@ -137,6 +137,7 @@ encode (StructuredData typeName fields) =
--example : StructuredDataHelper { personOrOrganization : () } { address : (), affiliation : () }
example : StructuredData { personOrOrganization : () } { additionalName : (), address : (), affiliation : () }
example =
person { name = "Dillon Kearns" }
|> additionalName "Cornelius"

View File

@ -51,10 +51,12 @@ resetColors =
ansi "[0m"
ansi : String -> String
ansi code =
ansiPrefix ++ code
ansiPrefix : String
ansiPrefix =
"\u{001B}"

View File

@ -2,9 +2,10 @@ module ApiRouteTests exposing (..)
import ApiRoute exposing (..)
import Expect
import Test exposing (describe, test)
import Test exposing (Test, describe, test)
all : Test
all =
describe "api routes"
[ test "match top-level file with no extension" <|

View File

@ -2,9 +2,10 @@ module PathTests exposing (all)
import Expect
import Path
import Test exposing (describe, test)
import Test exposing (Test, describe, test)
all : Test
all =
describe "Path"
[ test "join two segments" <|

View File

@ -3,9 +3,10 @@ module QueryParamsTests exposing (all)
import Dict
import Expect
import QueryParams
import Test exposing (describe, test)
import Test exposing (Test, describe, test)
all : Test
all =
describe "QueryParams"
[ test "run Url.Parser.Query" <|

View File

@ -1054,10 +1054,12 @@ normalizeNewlines string =
(\_ -> " ")
toJsPort : a -> Cmd msg
toJsPort _ =
Cmd.none
fromJsPort : Sub msg
fromJsPort =
Sub.none

View File

@ -12,10 +12,12 @@ import Secrets
import Test exposing (Test, describe, test)
getWithoutSecrets : String -> Decode.Decoder a -> DataSource.DataSource a
getWithoutSecrets url =
DataSource.Http.get (Secrets.succeed url)
requestsDict : List ( Request.Request, b ) -> Dict.Dict String (Maybe b)
requestsDict requestMap =
requestMap
|> List.map