js-linter-configs icon indicating copy to clipboard operation
js-linter-configs copied to clipboard

eslint-config-adidas-typescript: disable valid-jsdoc

Open guoyunhe opened this issue 4 years ago • 2 comments

In TypeScript project, sometimes the function can explain itself very well and here is no need to document parameters and returns:

/**
 * ID should only contain letters, numbers, dashes and dots
 */
export function validateId(id: string): boolean | undefined {
  if (id.length === 0) {
    return
  }

  const match = id.match(/[A-Za-z0-9\-.]*/)

  if (match && match.length && match[0] === id) {
    return true
  }

  return false
}

guoyunhe avatar Feb 14 '20 09:02 guoyunhe