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

imports-as-dependencies: prints error on missing package.json even if not active #1117

Closed
g1thuser opened this issue Jun 7, 2023 · 1 comment · Fixed by #1118
Closed

Comments

@g1thuser
Copy link

g1thuser commented Jun 7, 2023

Expected behavior

No error output on missing package.json at least if it is not active

Actual behavior

An error is always printed, if package.json is not found although imports-as-dependencies is not configured. Although the error is catched and only printed it breaks parsing the eslint output.

A similar issue is reported here. As this was not fixed so far I implemented a workaround to create an empty package.json in the parent folder of all my projects. This works for eslint-plugin-import but not for eslint-plugin-jsdoc as eslint-plugin-jsdoc is only looking in the current working directory for package.json.

ESLint Config

{
  plugins: ["jsdoc"],
  rules: {
    "jsdoc/check-access": "error",
    "jsdoc/check-alignment": "error",
    "jsdoc/check-indentation": "error",
    "jsdoc/check-param-names": "error",
     ... (*)
  }
}

(*) but not "jsdoc/imports-as-dependencies": "error",

Environment

  • Node version: 20.2.0
  • ESLint version 8.42.0
  • eslint-plugin-jsdoc version: 46.2.5
@github-actions
Copy link

github-actions bot commented Jun 7, 2023

🎉 This issue has been resolved in version 46.2.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

crapStone pushed a commit to Calciumdibromid/CaBr2 that referenced this issue Jun 16, 2023
This PR contains the following updates:

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

---

### Release Notes

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

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

[Compare Source](gajus/eslint-plugin-jsdoc@v46.2.5...v46.2.6)

##### Bug Fixes

-   **`imports-as-dependencies`:** do not log missing package.json when rule is not active; fixes [#&#8203;1117](gajus/eslint-plugin-jsdoc#1117) ([3a5dd7d](gajus/eslint-plugin-jsdoc@3a5dd7d))

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

[Compare Source](gajus/eslint-plugin-jsdoc@v46.2.4...v46.2.5)

##### Bug Fixes

-   **`imports-as-dependencies`:** support Node builtins; fixes [#&#8203;1112](gajus/eslint-plugin-jsdoc#1112) ([ab00592](gajus/eslint-plugin-jsdoc@ab00592))

</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, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMTUuMiIsInVwZGF0ZWRJblZlciI6IjM1LjExOC4wIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCJ9-->

Co-authored-by: cabr2-bot <cabr2.help@gmail.com>
Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1933
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
2 participants