Skip to content

Commit

Permalink
chore: Fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
andreidmt committed Nov 26, 2020
1 parent 2793e0c commit f858c50
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 49 deletions.
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
}
},
"rules": {
"promise/avoid-new": "off"
"promise/avoid-new": "off",
"valid-jsdoc": "off"
},
}
25 changes: 15 additions & 10 deletions src/plugins/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ module.exports = {
/**
* Searches for the first match.
*
* @param {Object} arg1 Props
* @param {string} arg1.method HTTP method
* @param {string} arg1.pathname URL pathname
* @param {object} arg1 Props
* @param {string} arg1.method HTTP method
* @param {string} arg1.pathname URL pathname
*
* @return {Object}
* @returns {object}
*/
find: ({ method, pathname }) => {
const route = findWith(
Expand Down Expand Up @@ -77,9 +77,14 @@ module.exports = {
/**
* { function_description }
*
* @param {Object} newRoute Route
* @param {object} props
* @param {string} props.method
* @param {string} props.path
* @param {object} props.schema
* @param {Function} props.authenticate
* @param {Function} props.authorize
*
* @return {undefined}
* @returns {undefined}
*/
add: ({
method = "GET",
Expand Down Expand Up @@ -115,11 +120,11 @@ module.exports = {
/**
* { function_description }
*
* @param {Object} arg1 The argument 1
* @param {Object} arg1.route The route
* @param {Object} arg1.req The request
* @param {object} arg1 The argument 1
* @param {object} arg1.route The route
* @param {object} arg1.req The request
*
* @return {Object}
* @returns {object}
*/
answer: ({ route, req }) => {
// Input validation check
Expand Down
38 changes: 0 additions & 38 deletions src/routes/ping.schema.js
Original file line number Diff line number Diff line change
@@ -1,41 +1,3 @@
/**
* foo: {
* type: "string",
* pattern: "^[a-z0-9-]+$",
* maxLength: 25,
* minLength: 25,
* },
*
* limit: {
* type: "integer",
* minimum: 1,
* maximum: 100,
* default: 20,
* },
*
* bar: {
* type: "string",
* enum: ["lorem", "dolor", "bobby"],
* },
*
* ipsum: {
* type: ["integer", "null"],
* enum: ["lorem", "dolor", "bobby"],
* },
*
* id: {
* oneOf: [
* { type: "integer" },
* {
* type: "array",
* items: { type: "integer" },
* minItems: 1,
* uniqueItems: true,
* },
* ],
* },
*/

module.exports = {
headers: {
type: "object",
Expand Down

0 comments on commit f858c50

Please sign in to comment.