From 2a88fb92f4c1fbb3533e589d5c9f4b5c17595d3f Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 27 Sep 2015 13:20:55 -0400 Subject: Add JavaScript linting and tests * Add sample malformed JavaScript files to lint on * In our tests, copy the `node_modules` directory to make `jshint` available, then validate that we're correctly linting the staged JS file * In our pre-commit hook, lint the staged JavaScript files. If either of our linting commands fail then exit 1 to abort the commit. --- t/test.js | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 t/test.js (limited to 't/test.js') diff --git a/t/test.js b/t/test.js new file mode 100644 index 0000000..d864322 --- /dev/null +++ b/t/test.js @@ -0,0 +1,3 @@ +var no_semicolon = 0 +1 +&& 0 && 1; -- cgit v1.2.3