Use standard for linting rules

This commit is contained in:
Adrian Obelmejias
2016-08-30 16:58:35 -04:00
parent df481a5229
commit de550f31df
11 changed files with 23 additions and 28 deletions
+1 -11
View File
@@ -1,16 +1,6 @@
{
"parser": "babel-eslint",
"extends": "airbnb",
"plugins": [
"react"
],
"rules": {
"semi": [2, "never"],
"no-param-reassign": [2, { "props": false }],
"strict": 0,
"comma-dangle": [2, "never"],
"max-len": [2, 80, 2, { "ignoreComments": true }]
},
"extends": "standard",
"env": {
"node": true,
"mocha": true
+3
View File
@@ -1,4 +1,6 @@
#koa2-api-boilerplate
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com)
Boilerplate for building APIs with [koa2](https://github.com/koajs/koa/tree/v2.x) and mongodb.
This project covers basic necessities of most APIs.
@@ -6,6 +8,7 @@ This project covers basic necessities of most APIs.
* Database (mongoose)
* Testing (mocha)
* Doc generation with apidoc
* linting using standard
##Requirements
* node __^4.0.0__
+3 -1
View File
@@ -57,7 +57,9 @@
"babel-register": "^6.5.1",
"chai": "^3.5.0",
"eslint": "^3.4.0",
"eslint-config-airbnb": "^10.0.1",
"eslint-config-standard": "^6.0.0",
"eslint-plugin-promise": "^2.0.1",
"eslint-plugin-standard": "^2.0.0",
"mocha": "^3.0.2",
"nodemon": "^1.8.1",
"supertest": "^2.0.0"
+1 -1
View File
@@ -134,7 +134,7 @@ export async function getUser(ctx, next) {
ctx.throw(500)
}
if(next) return next()
if (next) { return next() }
}
/**