From 858f680ce5771eb491c139d605cd42139ba8d8af Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Wed, 7 Oct 2015 17:39:32 +0100 Subject: [PATCH] Added JSON linting --- package.json | 6 ++++-- runtests | 1 - scripts/release.sh | 2 +- scripts/run.sh | 3 +-- src/decoder.json | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 39d732f..b763db6 100644 --- a/package.json +++ b/package.json @@ -12,8 +12,9 @@ "build-assets": "env/bin/python3 assets/build-emoticons.py", "build-data-files": "bash scripts/data-files.sh", "build": "npm run create-dirs && npm run build-assets && npm run develop && npm run build-data-files", - "test":"npm run lint", + "test":"npm run lint && npm run lint-json", "lint":"eslint -c node_modules/eslint-config/.eslintrc 'src/injections/' 'src/global.js'", + "lint-json": "jsonlint -q src/decoder.json", "clean": "rm -rf firefox/data chrome/data node_modules/ build/ env/" }, "repository": { @@ -37,6 +38,7 @@ "less": "^2.4.0", "crx": "^3.0.3", "jpm":"^1.0.1", - "uglify-js":"^2.4.24" + "uglify-js":"^2.4.24", + "jsonlint": "^1.6.2" } } diff --git a/runtests b/runtests index 98fc955..1d22053 100755 --- a/runtests +++ b/runtests @@ -7,4 +7,3 @@ export PATH=env/bin:${PATH} flake8 . --ignore=E128,E501 --exclude="node_modules,env" npm test - diff --git a/scripts/release.sh b/scripts/release.sh index 7ef51ff..d7a9cba 100644 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -13,4 +13,4 @@ crx pack chrome -o 'chrome/hipchat-emoticons-for-all.crx' -p 'chrome/key.pem' echo "Zipping Chrome Extension..." cd chrome zip 'release.zip' -1 -9 -T 'hipchat-emoticons-for-all.crx' 'manifest.json' 'data/*' -cd - \ No newline at end of file +cd - diff --git a/scripts/run.sh b/scripts/run.sh index 5bc2f1c..6613945 100644 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -2,7 +2,6 @@ set -e -npm run lint bash scripts/build-js.sh bash scripts/distribute.sh @@ -10,4 +9,4 @@ cd firefox/ jpm run -b /usr/bin/firefox echo "Exiting..." -cd - \ No newline at end of file +cd - diff --git a/src/decoder.json b/src/decoder.json index c50531a..bcee8fd 100644 --- a/src/decoder.json +++ b/src/decoder.json @@ -4,4 +4,4 @@ {"github.com":"github.js"}, {"trello.com":"trello.js"} ] -} \ No newline at end of file +}