Skip to content

Commit

Permalink
Runs the linter on Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
robotlolita committed Jul 23, 2017
1 parent e576829 commit f1d8adb
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
11 changes: 11 additions & 0 deletions .eslintrc.travis.json
@@ -0,0 +1,11 @@
{
"extends": "origamitower",
"rules": {
"no-trailing-spaces": "off",
"new-cap": "off",
"max-len": ["warn", 120],
"prefer-reflect": "off",
"no-undef": "error",
"no-shadow": ["error", { "allow": ["_"] }]
}
}
12 changes: 8 additions & 4 deletions build.frp
Expand Up @@ -128,6 +128,12 @@ define run-tests reporter @ options =
action Terminal.display-line "All good!"


define run-lint configuration =
do let packages = Stream.map (x -> packages / x) (Stream.from-vector ["base"])
bind package <- packages
action Terminal.display-line "Linting {package}"
action show-shell-output $((npm-bin "eslint") (package / "source") '--config configuration)


# --[ Tasks ]----------------------------------------------------------
export define clean =
Expand Down Expand Up @@ -164,6 +170,7 @@ export define test-on-travis =
let mocha = npm-bin "mocha" in
let tests = root / "test" / "source" / "specs" in
do action clean
action run-lint (root / ".eslintrc.travis.json")
action compile-source
action compile-test
action compile-annotations
Expand All @@ -189,9 +196,6 @@ export define documentation =

export define lint =
# Notifies about formatting problems and potential bugs in the source code.
do let packages = Stream.map (x -> packages / x) (Stream.from-vector ["base"])
bind package <- packages
action Terminal.display-line "Linting {package}"
action show-shell-output $((npm-bin "eslint") (package / "source"))
run-lint (root / ".eslintrc.json")


0 comments on commit f1d8adb

Please sign in to comment.