FLUID-6247: Update fluid-eslint-config settings to enforce consistent JSDocs formatting.

Metadata

Source
FLUID-6247
Type
Improvement
Priority
Minor
Status
Closed
Resolution
Fixed
Assignee
Antranig Basman
Reporter
Tony Atkins [RtF]
Created
2018-02-13T05:29:49.152-0500
Updated
2024-07-22T10:35:16.292-0400
Versions
N/A
Fixed Versions
N/A
Component
  1. fluid-eslint-config

Description

As discussed on recent architecture meetings, I would like to update the fluid-eslint-config package we use to store our shared ESLint settings to validate JSDocs, as follows:

  1. JSDocs are not required for all functions, but where they are present, they must be valid.
  2. We should consistently use "param" instead of "arg" or "argument".
  3. We should consistently use "return" instead of "returns".
  4. We should consistently use uppercase param types, as in "Boolean" vs. "boolean".
  5. All parameters should have a description.
  6. Return content should be required if the function returns, and disallowed if the function does not return anything.
  7. The return should have a description.
  8. The return should have a type.
  9. The implicit rules should be enforced, such as requiring all parameters to be documented, and in the correct order.

As part of testing this, I would also submit a related pull against Infusion to ensure that it meets the new standards.

Comments