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

custom context iteration issue #901

Closed
brettz9 opened this issue Aug 8, 2022 · 1 comment
Closed

custom context iteration issue #901

brettz9 opened this issue Aug 8, 2022 · 1 comment

Comments

@brettz9
Copy link
Collaborator

brettz9 commented Aug 8, 2022

Expected behavior

The sample should fail require-param (due to a @param missing).

Actual behavior

The issue passes.

(The issue is apparently due to an unnecessary check for a reduced node and some caching of.comment nodes (check of trackedJsDocs); since the JS node differs and the rule uses the JS node, this can create problems for some rules which look at more than the comment node.)

ESLint Config

// Format JS (or JSON) code here

ESLint sample

{
      code: `
      /**
       * Helper function to warp to a custom stage/level.
       *
       * Custom stages/levels must first be defined in the "tsconfig.json" file. See the documentation for
       * more details: https://isaacscript.github.io/main/custom-stages/
       *
       * @param name The name of the custom stage, corresponding to what is in the "tsconfig.json" file.
       * @param firstFloor Optional. Whether to go to the first floor or the second floor. For example, if
       *                   you have a custom stage emulating Caves, then the first floor would be Caves 1,
       *                   and the second floor would be Caves 2. Default is true.
       */
       export function setCustomStage(
         name: string,
         firstFloor = true,
         verbose = false,
       ): void {}
       `,
      ignoreReadme: true,
      options: [
        {
          contexts: [
            'any',
          ],
        },
      ],
      parser: require.resolve('@typescript-eslint/parser'),
    },

Environment

  • Node version: 14.19.1
  • ESLint version 8.16.0
  • eslint-plugin-jsdoc version: 39.3.5
@gajus
Copy link
Owner

gajus commented Oct 23, 2022

🎉 This issue has been resolved in version 39.3.21 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gajus gajus added the released label Oct 23, 2022
crapStone pushed a commit to Calciumdibromid/CaBr2 that referenced this issue Oct 24, 2022
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) | devDependencies | patch | [`39.3.14` -> `39.3.21`](https://renovatebot.com/diffs/npm/eslint-plugin-jsdoc/39.3.14/39.3.21) |

---

### Release Notes

<details>
<summary>gajus/eslint-plugin-jsdoc</summary>

### [`v39.3.21`](https://github.com/gajus/eslint-plugin-jsdoc/releases/tag/v39.3.21)

[Compare Source](gajus/eslint-plugin-jsdoc@v39.3.20...v39.3.21)

##### Bug Fixes

-   **`require-param`:** do not cache by comment node; fixes [#&#8203;901](gajus/eslint-plugin-jsdoc#901) ([867edc3](gajus/eslint-plugin-jsdoc@867edc3))

### [`v39.3.20`](https://github.com/gajus/eslint-plugin-jsdoc/releases/tag/v39.3.20)

[Compare Source](gajus/eslint-plugin-jsdoc@v39.3.19...v39.3.20)

##### Bug Fixes

-   **`require-returns-check`:** allow for missing catch or finalizer and missing case contents; fixes [#&#8203;924](gajus/eslint-plugin-jsdoc#924) ([4fabdd6](gajus/eslint-plugin-jsdoc@4fabdd6))

### [`v39.3.19`](https://github.com/gajus/eslint-plugin-jsdoc/releases/tag/v39.3.19)

[Compare Source](gajus/eslint-plugin-jsdoc@v39.3.18...v39.3.19)

##### Bug Fixes

-   **`require-param`:** be tolerant if `this` is not included as `[@param](https://github.com/param)`; fixes [#&#8203;919](gajus/eslint-plugin-jsdoc#919) ([c1f21f8](gajus/eslint-plugin-jsdoc@c1f21f8))

### [`v39.3.18`](https://github.com/gajus/eslint-plugin-jsdoc/releases/tag/v39.3.18)

[Compare Source](gajus/eslint-plugin-jsdoc@v39.3.17...v39.3.18)

##### Bug Fixes

-   **`require-returns-check`:** check child nodes of consequents; fixes [#&#8203;923](gajus/eslint-plugin-jsdoc#923) ([dc1f875](gajus/eslint-plugin-jsdoc@dc1f875))

### [`v39.3.17`](https://github.com/gajus/eslint-plugin-jsdoc/releases/tag/v39.3.17)

[Compare Source](gajus/eslint-plugin-jsdoc@v39.3.16...v39.3.17)

##### Bug Fixes

-   **`require-returns-check`:** throw statements to be exempted from final check if elsewhere in function; fixes [#&#8203;892](gajus/eslint-plugin-jsdoc#892) ([87c1c2a](gajus/eslint-plugin-jsdoc@87c1c2a))

### [`v39.3.16`](https://github.com/gajus/eslint-plugin-jsdoc/releases/tag/v39.3.16)

[Compare Source](gajus/eslint-plugin-jsdoc@v39.3.15...v39.3.16)

##### Bug Fixes

-   **`check-param-names`:** tolerate documented "this" param; fixes [#&#8203;919](gajus/eslint-plugin-jsdoc#919) ([5d20bdf](gajus/eslint-plugin-jsdoc@5d20bdf))

### [`v39.3.15`](https://github.com/gajus/eslint-plugin-jsdoc/releases/tag/v39.3.15)

[Compare Source](gajus/eslint-plugin-jsdoc@v39.3.14...v39.3.15)

##### Bug Fixes

-   **`require-returns-check`:** checks that all branches of final node return; fixes [#&#8203;892](gajus/eslint-plugin-jsdoc#892) ([bdd6af2](gajus/eslint-plugin-jsdoc@bdd6af2))

</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:eyJjcmVhdGVkSW5WZXIiOiIzMi4yNDEuOCIsInVwZGF0ZWRJblZlciI6IjMyLjI0MS4xMCJ9-->

Co-authored-by: cabr2-bot <cabr2.help@gmail.com>
Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1600
Reviewed-by: Epsilon_02 <epsilon_02@noreply.codeberg.org>
Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
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