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
|
||||
|
||||
include node_modules/make-lint/index.mk
|
||||
|
||||
REQUIRED = --require should --require should-http
|
||||
|
||||
TESTS = test/application/* \
|
||||
|
@ -10,6 +8,9 @@ TESTS = test/application/* \
|
|||
test/response/* \
|
||||
test/experimental/index.js
|
||||
|
||||
lint:
|
||||
@./node_modules/.bin/eslint lib test
|
||||
|
||||
test:
|
||||
@NODE_ENV=test node \
|
||||
./node_modules/.bin/_mocha \
|
||||
|
@ -26,7 +27,7 @@ test-cov:
|
|||
$(TESTS) \
|
||||
--bail
|
||||
|
||||
test-travis:
|
||||
test-travis: lint
|
||||
@NODE_ENV=test node \
|
||||
./node_modules/.bin/istanbul cover \
|
||||
./node_modules/.bin/_mocha \
|
||||
|
@ -39,4 +40,4 @@ test-travis:
|
|||
bench:
|
||||
@$(MAKE) -C benchmarks
|
||||
|
||||
.PHONY: test bench
|
||||
.PHONY: lint test bench
|
||||
|
|
|
@ -44,8 +44,11 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"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",
|
||||
"make-lint": "^1.0.1",
|
||||
"mocha": "^2.0.1",
|
||||
"should": "^6.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