Permalink
Browse files

Add eslint

  • Loading branch information...
1 parent ea581a1 commit 76f55514ca965243f8b3035322536c19e9367a15 @bananaappletw bananaappletw committed Oct 20, 2016
Showing with 32 additions and 1 deletion.
  1. +15 −0 .eslintrc.yml
  2. +2 −0 .travis.yml
  3. +4 −1 Makefile
  4. +7 −0 Readme.md
  5. +4 −0 package.json
View
@@ -0,0 +1,15 @@
+env:
+ mocha: true
+extends: standard
+plugins:
+ - standard
+ - promise
+rules:
+ arrow-parens: 0
+ eqeqeq: 0
+ no-return-assign: 0 # fails for arrow functions
+ semi: [2, always]
+ space-before-function-paren: [2, never]
+ yoda: 0
+ arrow-spacing: 2
+ dot-location: [2, "property"]
View
@@ -2,3 +2,5 @@ node_js:
- "4"
- "6"
language: node_js
+script:
+ make lint
View
@@ -1,8 +1,11 @@
+lint:
+ @./node_modules/.bin/eslint .
+
test:
@NODE_ENV=test ./node_modules/.bin/mocha \
--harmony \
--reporter spec \
--require should \
*/test.js
-.PHONY: test
+.PHONY: lint test
View
@@ -2,6 +2,13 @@
A repository containing small examples to illustrate the use of Koa
for creating web applications and other HTTP servers.
+
+# Running tests
+
+```bash
+make test
+make lint
+```
## Included Examples
View
@@ -26,6 +26,10 @@
},
"devDependencies": {
"co": "*",
+ "eslint": "^3.8.1",
+ "eslint-config-standard": "^6.2.0",
+ "eslint-plugin-promise": "^3.3.0",
+ "eslint-plugin-standard": "^2.0.1",
"mocha": "*",
"should": "^3.3.2",
"supertest": "*"

0 comments on commit 76f5551

Please sign in to comment.