From 518f082c534fef526068bca2d71388808b435426 Mon Sep 17 00:00:00 2001 From: Quinn Dougherty Date: Mon, 11 Apr 2022 00:06:35 -0400 Subject: [PATCH] (rebase): A rescript linter! --- packages/squiggle-lang/lint.sh | 2 +- packages/squiggle-lang/package.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/squiggle-lang/lint.sh b/packages/squiggle-lang/lint.sh index 42faeda9..06a22b8e 100755 --- a/packages/squiggle-lang/lint.sh +++ b/packages/squiggle-lang/lint.sh @@ -8,7 +8,7 @@ errors=false for file in $files do current=`cat $file` - linted=`echo "${current}" | ./node_modules/.bin/rescript format -stdin .res` + linted=`echo "${current}" | rescript format -stdin .res` diff=`diff <(echo $current) <(echo $linted)` if [ ${#diff} -gt 0 ] diff --git a/packages/squiggle-lang/package.json b/packages/squiggle-lang/package.json index a2c93a54..ac07d185 100644 --- a/packages/squiggle-lang/package.json +++ b/packages/squiggle-lang/package.json @@ -11,6 +11,7 @@ "test": "jest", "test:watch": "jest --watchAll", "coverage": "rm -f *.coverage; yarn clean; BISECT_ENABLE=yes yarn build; yarn test; bisect-ppx-report html", + "lint": "./lint.sh", "all": "yarn build && yarn bundle && yarn test" }, "keywords": [