Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
rjrodger committed Jan 4, 2020
1 parent 102c34d commit 29c8a1a
Show file tree
Hide file tree
Showing 7 changed files with 552 additions and 348 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tmp
14 changes: 14 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
extends: 'eslint:recommended',
env: {
node: true,
es6: true
},
"parserOptions": {
"ecmaVersion": 10
},
rules: {
'no-console': 0,
'no-unused-vars': [2,{args:'none'}]
}
}
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"semi": false,
"singleQuote": true
}
18 changes: 10 additions & 8 deletions member-doc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const Joi = require('@hapi/joi')

// TODO: complete docs and validations


const validate_member = {
parent: Joi.string().description('Parent entity identifier.'),
child: Joi.string().description('Child entity identifier.'),
Expand All @@ -28,10 +27,15 @@ module.exports = {
},

add_member: {
desc: 'Add child (id) to parent (id) under relationship `kind` (idempotent).',
desc:
'Add child (id) to parent (id) under relationship `kind` (idempotent).',
validate: Object.assign({}, validate_member, {
parent: Joi.string().required().description('Parent entity identifier.'),
child: Joi.string().required().description('Child entity identifier.'),
parent: Joi.string()
.required()
.description('Parent entity identifier.'),
child: Joi.string()
.required()
.description('Child entity identifier.'),
kind: Joi.string().required()
})
},
Expand All @@ -53,9 +57,7 @@ module.exports = {
id: Joi.string(),
// TODO: Joi OR
child: Joi.string(),
kind: Joi.string(),
kind: Joi.string()
})
},


}
}
Loading

0 comments on commit 29c8a1a

Please sign in to comment.