repotest: add json linting
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I99dadfac3c2d324bb5ef6a5ab399ad35825b34d5
diff --git a/.eslintrc.json b/.eslintrc.json
new file mode 100644
index 0000000..abd7853
--- /dev/null
+++ b/.eslintrc.json
@@ -0,0 +1,3 @@
+{
+ "extends": ["plugin:json/recommended-with-comments"]
+}
diff --git a/meta-phosphor/scripts/run-repotest b/meta-phosphor/scripts/run-repotest
index 8c47e53..c841b65 100755
--- a/meta-phosphor/scripts/run-repotest
+++ b/meta-phosphor/scripts/run-repotest
@@ -188,7 +188,9 @@
meta-yadro/meta-nicole/recipes-phosphor/chassis/avsbus-control/avsbus-control.sh
"
-types=(shell)
+types=(json shell)
+# shellcheck disable=SC2034
+check_json="eslint --resolve-plugins-relative-to /usr/local/lib/node_modules"
# shellcheck disable=SC2034
check_shell="shellcheck -x"
@@ -215,12 +217,19 @@
file_type="shell"
;;
+ *JSON\ data*)
+ file_type="json"
+ ;;
+
*)
case $f in
*.sh)
file_type="shell"
;;
+ *.json)
+ file_type="json"
+ ;;
esac
esac