Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude @example from tag-lines #742

Closed
TheJaredWilcurt opened this issue May 18, 2021 · 2 comments
Closed

Exclude @example from tag-lines #742

TheJaredWilcurt opened this issue May 18, 2021 · 2 comments

Comments

@TheJaredWilcurt
Copy link

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?

@brettz9
Copy link
Collaborator

brettz9 commented May 18, 2021

Yeah, I've filed #741 for that purpose.

@brettz9
Copy link
Collaborator

brettz9 commented May 18, 2021

Closing as dupe of #734

@brettz9 brettz9 closed this as completed May 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants