-
-
Notifications
You must be signed in to change notification settings - Fork 163
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
fix(check-tag-names
): work with the constructor tag
#899
Conversation
@@ -10,6 +10,12 @@ describe('jsdocUtils', () => { | |||
it('returns the primary tag name', () => { | |||
expect(jsdocUtils.getPreferredTagName({}, 'jsdoc', 'return')).to.equal('returns'); | |||
}); | |||
it('works with the constructor tag', () => { | |||
expect(jsdocUtils.getPreferredTagName({}, 'jsdoc', 'constructor')).to.equal('class'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without the src
change, this test fails with expected [Function Object] to equal 'class'
.
}); | ||
}); | ||
it('works with tags that clash with prototype properties', () => { | ||
expect(jsdocUtils.getPreferredTagName({}, 'jsdoc', 'toString')).to.equal('toString'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without the src
change, this test fails with expected [Function toString] to equal 'toString'
.
🎉 This PR is included in version 39.3.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) | devDependencies | patch | [`39.3.4` -> `39.3.6`](https://renovatebot.com/diffs/npm/eslint-plugin-jsdoc/39.3.4/39.3.6) | --- ### Release Notes <details> <summary>gajus/eslint-plugin-jsdoc</summary> ### [`v39.3.6`](https://github.com/gajus/eslint-plugin-jsdoc/releases/tag/v39.3.6) [Compare Source](gajus/eslint-plugin-jsdoc@v39.3.5...v39.3.6) ##### Bug Fixes - ensure `TSDeclareFunction` is checked by default where function contexts are expected; closes [#​897](gajus/eslint-plugin-jsdoc#897) ([25d2a7f](gajus/eslint-plugin-jsdoc@25d2a7f)) ### [`v39.3.5`](https://github.com/gajus/eslint-plugin-jsdoc/releases/tag/v39.3.5) [Compare Source](gajus/eslint-plugin-jsdoc@v39.3.4...v39.3.5) ##### Bug Fixes - **`check-tag-names`:** constructor tag and tagNamePreference ([#​899](gajus/eslint-plugin-jsdoc#899)) ([4f8d242](gajus/eslint-plugin-jsdoc@4f8d242)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xNTEuMiIsInVwZGF0ZWRJblZlciI6IjMyLjE1MS4yIn0=--> Co-authored-by: cabr2-bot <cabr2.help@gmail.com> Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1495 Reviewed-by: 6543 <6543@noreply.codeberg.org> Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org> Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
This makes it so the
check-tag-names
rule works when JSDoc tag names matchObject.prototype
properties (like@constructor
).Fixes #898.