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

Add preserveMainDescriptionPostDelimiter option to check-line-alignment rule #731

Merged
merged 1 commit into from
May 13, 2021

Conversation

renatho
Copy link
Contributor

@renatho renatho commented May 13, 2021

This introduces the new option preserveMainDescriptionPostDelimiter for the check-line-alignment rule.

This new option will preserve the post delimiter (spacings after the *) in the main description when using the always option.

      /**
       * Function description
       *           description with post delimiter.
       *
       * @param {string} lorem Description.
       * @param {int}    sit   Description multi words.
       */

Notice that it just applies to always because the never always preserves the spacing. I thought about doing it as default to always too, but since we already released it in that way, I added a new option to avoid breaking changes.

This new option will preserve the left spacings in the main
description when using the `always` option.
@renatho renatho changed the title Add preserveMainDescriptionPostDelimiter option Add preserveMainDescriptionPostDelimiter option to check-line-alignment rule May 13, 2021
@brettz9 brettz9 merged commit 71e03da into gajus:master May 13, 2021
@renatho renatho deleted the add/preserve-post-delimiter-option branch May 13, 2021 17:20
@renatho
Copy link
Contributor Author

renatho commented May 13, 2021

@brettz9, thank you for the super quick merge! =)
Just confirming. Is there a plan to release it soon? And thank you for all your support in all these changes!

brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this pull request May 13, 2021
@gajus
Copy link
Owner

gajus commented May 13, 2021

🎉 This PR is included in version 34.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gajus gajus added the released label May 13, 2021
@brettz9
Copy link
Collaborator

brettz9 commented May 13, 2021

For some reason, when doing squashes and adding the Angular commit format needed for the automated semantic releases, I am not noticing there is a commit summary before it getting applied which negates the auto-release. I will try to be mindful of this in the future. Thanks very much for the feature!

brettz9 pushed a commit to brettz9/eslint-plugin-jsdoc that referenced this pull request May 14, 2021
feat(`check-line-alignment`): add `preserveMainDescriptionPostDelimiter` option to preserve left-hand side spacings in the main description when using the `always` option.

Co-authored-by: Renatho De Carli Rosa <renatho@automattic.com>
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this pull request May 14, 2021
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this pull request May 15, 2021
* tag-lines:
  Since the fixer may add asterisks as well as newlines, set `fixable` to `code` rather than `whitespace`
  docs: Indicate option is actually recommended
  - docs: minor clarification
  - Rename `noEndLine` to `noEndLines` since may normally be multiple lines after tags
  - Docs: Clarify `noEndLine`
  feat: new rule `tag-line`; fixes gajus#93
  chore(`generateRule`): add `line` by default in test errors
  chore: allow rule generation to put backticks on separate lines (to avoid default linting errors)
  fix(`check-param-names`): adjusts line numbers to be nearer problematic item
  fix(`no-missing-syntax`): pass in missing `comment`
  fix(`require-description`, `require-example`): for missing description, use tag line number
  docs(`no-bad-blocks`): add clarifying comment to valid example
  feat(`no-bad-blocks`): add `preventAllMultiasteriskBlocks` boolean option to allow reporting of any multi-asterisked multiline comments
  feat(`check-line-alignment`): add `preserveMainDescriptionPostDelimiter` option to preserve left-hand side spacings in the main description when using the `always` option.
  Revert "Add preserveMainDescriptionPostDelimiter option (gajus#731)"
  docs(`check-line-alignment`): make mention of at least a single space being added by either the "always" or "never" option
  chore: update devDeps.
  docs: update README
  Add preserveMainDescriptionPostDelimiter option (gajus#731)

# Conflicts:
#	README.md
#	src/iterateJsdoc.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants