add eslint and standard config
This commit is contained in:
parent
bfa53fbc28
commit
24ccde947d
4 changed files with 24 additions and 5 deletions
10
.eslintrc
Normal file
10
.eslintrc
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
# Support ES2016 features
|
||||||
|
parser: babel-eslint
|
||||||
|
|
||||||
|
extends: standard
|
||||||
|
|
||||||
|
rules:
|
||||||
|
eqeqeq: 0
|
||||||
|
semi: [2, always]
|
||||||
|
space-before-function-paren: [2, never]
|
||||||
|
yoda: 0
|
9
Makefile
9
Makefile
|
@ -1,7 +1,5 @@
|
||||||
SRC = lib/*.js
|
SRC = lib/*.js
|
||||||
|
|
||||||
include node_modules/make-lint/index.mk
|
|
||||||
|
|
||||||
REQUIRED = --require should --require should-http
|
REQUIRED = --require should --require should-http
|
||||||
|
|
||||||
TESTS = test/application/* \
|
TESTS = test/application/* \
|
||||||
|
@ -10,6 +8,9 @@ TESTS = test/application/* \
|
||||||
test/response/* \
|
test/response/* \
|
||||||
test/experimental/index.js
|
test/experimental/index.js
|
||||||
|
|
||||||
|
lint:
|
||||||
|
@./node_modules/.bin/eslint lib test
|
||||||
|
|
||||||
test:
|
test:
|
||||||
@NODE_ENV=test node \
|
@NODE_ENV=test node \
|
||||||
./node_modules/.bin/_mocha \
|
./node_modules/.bin/_mocha \
|
||||||
|
@ -26,7 +27,7 @@ test-cov:
|
||||||
$(TESTS) \
|
$(TESTS) \
|
||||||
--bail
|
--bail
|
||||||
|
|
||||||
test-travis:
|
test-travis: lint
|
||||||
@NODE_ENV=test node \
|
@NODE_ENV=test node \
|
||||||
./node_modules/.bin/istanbul cover \
|
./node_modules/.bin/istanbul cover \
|
||||||
./node_modules/.bin/_mocha \
|
./node_modules/.bin/_mocha \
|
||||||
|
@ -39,4 +40,4 @@ test-travis:
|
||||||
bench:
|
bench:
|
||||||
@$(MAKE) -C benchmarks
|
@$(MAKE) -C benchmarks
|
||||||
|
|
||||||
.PHONY: test bench
|
.PHONY: lint test bench
|
||||||
|
|
|
@ -44,8 +44,11 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel": "^5.0.0",
|
"babel": "^5.0.0",
|
||||||
|
"babel-eslint": "^4.1.3",
|
||||||
|
"eslint": "^1.6.0",
|
||||||
|
"eslint-config-standard": "^4.4.0",
|
||||||
|
"eslint-plugin-standard": "^1.3.1",
|
||||||
"istanbul": "^0.3.22",
|
"istanbul": "^0.3.22",
|
||||||
"make-lint": "^1.0.1",
|
|
||||||
"mocha": "^2.0.1",
|
"mocha": "^2.0.1",
|
||||||
"should": "^6.0.3",
|
"should": "^6.0.3",
|
||||||
"should-http": "0.0.3",
|
"should-http": "0.0.3",
|
||||||
|
|
5
test/.eslintrc
Normal file
5
test/.eslintrc
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
env:
|
||||||
|
mocha: true
|
||||||
|
|
||||||
|
rules:
|
||||||
|
space-before-blocks: [2, {functions: never, keywords: always}]
|
Loading…
Reference in a new issue