From 4be496579c8abd75d152a84538363af93b6c6a8c Mon Sep 17 00:00:00 2001 From: Jeroen Engels Date: Tue, 6 Nov 2018 13:08:20 +0100 Subject: [PATCH] Make example easier to use --- .gitignore | 1 + example/Main.elm | 4 +- example/elm.json | 7 +- example/index.html | 12312 ------------------------------------------- src/Lint.elm | 1 - 5 files changed, 7 insertions(+), 12318 deletions(-) delete mode 100644 example/index.html diff --git a/.gitignore b/.gitignore index 68d3b031..5744a70f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ elm-stuff example/elm.js *.log node_modules/ +example/index.html diff --git a/example/Main.elm b/example/Main.elm index 23e4cd68..fceeaa09 100644 --- a/example/Main.elm +++ b/example/Main.elm @@ -4,7 +4,7 @@ module Main exposing (main) import Browser import Html exposing (..) -import Html.Attributes exposing (class, id) +import Html.Attributes exposing (class, id, style) import Html.Events exposing (onInput) import Lint exposing (lintSource) import Lint.Rules.NoDebug @@ -93,6 +93,8 @@ view model = , textarea [ id "input" , onInput Replace + , style "height" "500px" + , style "width" "500px" ] [ text model ] , div [] diff --git a/example/elm.json b/example/elm.json index bceb8b5a..c6cf7398 100644 --- a/example/elm.json +++ b/example/elm.json @@ -1,6 +1,7 @@ { "type": "application", "source-directories": [ + "../src", "." ], "elm-version": "0.19.0", @@ -9,11 +10,10 @@ "elm/browser": "1.0.1", "elm/core": "1.0.0", "elm/html": "1.0.0", - "elm/json": "1.0.0", - "elm/regex": "1.0.0", - "jfmengels/elm-lint": "3.0.0" + "stil4m/elm-syntax": "7.0.2" }, "indirect": { + "elm/json": "1.0.0", "elm/parser": "1.1.0", "elm/time": "1.0.0", "elm/url": "1.0.0", @@ -22,7 +22,6 @@ "elm-community/list-extra": "8.1.0", "rtfeldman/elm-hex": "1.0.0", "rtfeldman/elm-iso8601-date-strings": "1.1.2", - "stil4m/elm-syntax": "7.0.2", "stil4m/structured-writer": "1.0.2" } }, diff --git a/example/index.html b/example/index.html deleted file mode 100644 index 7d690339..00000000 --- a/example/index.html +++ /dev/null @@ -1,12312 +0,0 @@ - - - - - Main - - - -
- - - \ No newline at end of file diff --git a/src/Lint.elm b/src/Lint.elm index 1346e6f3..d8985522 100644 --- a/src/Lint.elm +++ b/src/Lint.elm @@ -52,7 +52,6 @@ import Elm.Syntax.File exposing (File) import Elm.Syntax.Node exposing (Node) import Lint.Types exposing (Direction, LintError, LintImplementation, LintRule, LintRuleImplementation, Severity(..), Visitor) import Lint.Visitor exposing (expressionToVisitors, transformDeclarationsIntoVisitors) -import Regex {-| Lints a file and gives back the errors raised by the given rules.