Skip to content
This repository has been archived by the owner on Feb 9, 2022. It is now read-only.

Commit

Permalink
Lint code
Browse files Browse the repository at this point in the history
  • Loading branch information
leo committed May 24, 2016
1 parent af38b22 commit 3a04ec3
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ app.use(async (ctx, next) => {
console.log(chalk.blue('[muffin]') + ' %s %s - %sms', ctx.method, ctx.url, ms)
})

function listening() {
function listening () {
const port = this.address().port
const url = 'http://localhost:' + port

Expand Down
2 changes: 1 addition & 1 deletion lib/models/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const userSchema = goose.Schema({
})

userSchema.pre('save', function (next) {
var user = this
let user = this

// Only hash & salt password field if it differs from the
// one within the DB
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class Config {
}
}

assignProperty(obj, path, value) {
assignProperty (obj, path, value) {
let props = path.split('_'),
i = 0,
prop
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export function log (message, err) {

// Ability to add custom message to error
if (err instanceof Error) {
console.error(chalk.bold(message) + "\n", err.stack)
console.error(chalk.bold(message) + '\n', err.stack)
return
}

Expand Down
10 changes: 9 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@
"main": "dist/index.js",
"scripts": {
"start": "gulp",
"prepublish": "gulp transpile"
"prepublish": "gulp transpile",
"test": "eslint lib/**"
},
"files": [
"dist"
],
"eslintConfig": {
"extends": "default",
"parser": "babel-eslint"
},
"babel": {
"presets": [
"es2015-node"
Expand Down Expand Up @@ -62,9 +67,12 @@
"query-string": "^4.1.0"
},
"devDependencies": {
"babel-eslint": "^6.0.4",
"babel-plugin-syntax-async-functions": "^6.8.0",
"babel-plugin-transform-async-to-generator": "^6.8.0",
"babel-preset-es2015-node": "^4.0.2",
"eslint": "^2.10.2",
"eslint-config-default": "^0.1.0",
"gulp": "^3.9.1",
"gulp-babel": "^6.1.2",
"gulp-cached": "^1.1.0"
Expand Down

0 comments on commit 3a04ec3

Please sign in to comment.