From 508b1817d985d87851ab704dca15081714ef627e Mon Sep 17 00:00:00 2001 From: RealOrangeOne Date: Tue, 15 Mar 2016 22:23:44 +0000 Subject: [PATCH] Validate JSON data --- package.json | 3 ++- scripts/test-extras.sh | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100755 scripts/test-extras.sh diff --git a/package.json b/package.json index 22012cf..1b7f9f5 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "watch-less": "watch 'npm run build-less' static/src/less/", "watch": "npm run watch-less", "clean": "./scripts/clean.js", - "test": "npm run lint" + "test": "npm run lint && ./scripts/test-extras.sh" }, "repository": { "type": "git", @@ -38,6 +38,7 @@ "eslint": "=1.5.0", "eslint-config": "git://github.com/dabapps/eslint-config.git", "eslint-plugin-react": "=3.4.2", + "jsonlint": "=1.6.2", "less": "=2.5.1", "less-mixins": "git://github.com/RealOrangeOne/less-mixins.git", "postcss-cli": "=2.5.1", diff --git a/scripts/test-extras.sh b/scripts/test-extras.sh new file mode 100755 index 0000000..b157046 --- /dev/null +++ b/scripts/test-extras.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +set -e + +echo ">> Linting JSON Data..." +jsonlint -q data/projects.json + + +echo "> Extra tests passed!"