Adding check target to makefile to run eslint. Adding eslint to package.json
Этот коммит содержится в:
5
Makefile
5
Makefile
@@ -5,6 +5,7 @@ GOFLAGS ?= $(GOFLAGS:)
|
|||||||
BUILD_NUMBER ?= $(BUILD_NUMBER:)
|
BUILD_NUMBER ?= $(BUILD_NUMBER:)
|
||||||
|
|
||||||
GO=$(GOPATH)/bin/godep go
|
GO=$(GOPATH)/bin/godep go
|
||||||
|
ESLINT=web/react/node_modules/eslint/bin/eslint.js
|
||||||
|
|
||||||
ifeq ($(BUILD_NUMBER),)
|
ifeq ($(BUILD_NUMBER),)
|
||||||
BUILD_NUMBER := dev
|
BUILD_NUMBER := dev
|
||||||
@@ -62,6 +63,10 @@ install:
|
|||||||
|
|
||||||
@cd web/react/ && npm install
|
@cd web/react/ && npm install
|
||||||
|
|
||||||
|
check: install
|
||||||
|
@echo Running ESLint...
|
||||||
|
@$(ESLINT) web/react/components/*
|
||||||
|
|
||||||
test: install
|
test: install
|
||||||
@mkdir -p logs
|
@mkdir -p logs
|
||||||
@$(GO) test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=180s ./api || exit 1
|
@$(GO) test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=180s ./api || exit 1
|
||||||
|
|||||||
@@ -16,7 +16,9 @@
|
|||||||
"jest-cli": "~0.1.17",
|
"jest-cli": "~0.1.17",
|
||||||
"reactify": "^0.15.2",
|
"reactify": "^0.15.2",
|
||||||
"uglify-js": "~2.4.15",
|
"uglify-js": "~2.4.15",
|
||||||
"watchify": "^2.1.1"
|
"watchify": "^2.1.1",
|
||||||
|
"eslint": "^0.24.1",
|
||||||
|
"eslint-plugin-react": "^3.0.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "watchify --extension=jsx -o ../static/js/bundle.js -v -d ./**/*.jsx",
|
"start": "watchify --extension=jsx -o ../static/js/bundle.js -v -d ./**/*.jsx",
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user