summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-07-28 10:24:24 -0400
committerChristopher Speller <crspeller@gmail.com>2015-07-28 10:24:24 -0400
commit18aaa9d175879abe09045d6022e5b6ddf1c4d910 (patch)
tree1da4dfd4833a4356df0974c80def6eaea22e5218
parentc1637ce11364806aed3d21059010717207406e44 (diff)
downloadchat-18aaa9d175879abe09045d6022e5b6ddf1c4d910.tar.gz
chat-18aaa9d175879abe09045d6022e5b6ddf1c4d910.tar.bz2
chat-18aaa9d175879abe09045d6022e5b6ddf1c4d910.zip
Adding check target to makefile to run eslint. Adding eslint to package.json
-rw-r--r--Makefile5
-rw-r--r--web/react/package.json4
2 files changed, 8 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 222d4ffe4..01986bf64 100644
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,7 @@ GOFLAGS ?= $(GOFLAGS:)
BUILD_NUMBER ?= $(BUILD_NUMBER:)
GO=$(GOPATH)/bin/godep go
+ESLINT=web/react/node_modules/eslint/bin/eslint.js
ifeq ($(BUILD_NUMBER),)
BUILD_NUMBER := dev
@@ -62,6 +63,10 @@ install:
@cd web/react/ && npm install
+check: install
+ @echo Running ESLint...
+ @$(ESLINT) web/react/components/*
+
test: install
@mkdir -p logs
@$(GO) test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=180s ./api || exit 1
diff --git a/web/react/package.json b/web/react/package.json
index 8d9d57fab..2bba29e2b 100644
--- a/web/react/package.json
+++ b/web/react/package.json
@@ -16,7 +16,9 @@
"jest-cli": "~0.1.17",
"reactify": "^0.15.2",
"uglify-js": "~2.4.15",
- "watchify": "^2.1.1"
+ "watchify": "^2.1.1",
+ "eslint": "^0.24.1",
+ "eslint-plugin-react": "^3.0.0"
},
"scripts": {
"start": "watchify --extension=jsx -o ../static/js/bundle.js -v -d ./**/*.jsx",