Skip to content

Exclude @example from tag-lines #742

@TheJaredWilcurt

Description

@TheJaredWilcurt

I have a lot of code like this:

  /**
   * Generic validation method to ensure a specific key on a specific OS
   * object is either a string, or removed.
   *
   * @example
   * options = validateOptionalString(options, 'windows', 'comment');
   *
   * @param  {object} options          User's options
   * @param  {string} operatingSystem  'windows', 'linux', or 'osx'
   * @param  {string} key              The key within the OS object to be validated as an optional string
   * @return {object}                  Validated or mutated user options
   */
  validateOptionalString: function (options, operatingSystem, key) {
    //...
    return options;
  },

Notice that there is a clear separation between the method description, example, and param/return. The tag-lines rule treats @example the same as all other tags. But it looks messy without the extra return after the example.

Can we get a option for the tags to apply this to, maybe like how check-line-alignment does it?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions