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

@license spdx ignore for private modules #884

Closed
dennismphil opened this issue Apr 25, 2022 · 2 comments
Closed

@license spdx ignore for private modules #884

dennismphil opened this issue Apr 25, 2022 · 2 comments

Comments

@dennismphil
Copy link

See some discussions here npm/npm#8773

Expected behavior

// code.js
/**
 * @license
 * Copyright 2022 Acme, Corp. All Rights Reserved.
 */

// package.json
{
   ...
   private: true,
   ...
}

shows a warning

Invalid JSDoc @license: "Copyright 2022 Acme, Corp. All Rights Reserved."; expected SPDX expression: https://spdx.org/licenses/.eslint[jsdoc/check-values](https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-check-values)

Actual behavior

/**
 * @license
 * Copyright 2022 Acme, Corp. All Rights Reserved.
 */

this should not show a warning

Environment

  • Node version: v17.9.0
  • ESLint version: v8.12.0
  • eslint-plugin-jsdoc version: 39.2.8
@gajus
Copy link
Owner

gajus commented Apr 26, 2022

🎉 This issue has been resolved in version 39.2.9 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gajus gajus added the released label Apr 26, 2022
@brettz9
Copy link
Collaborator

brettz9 commented Apr 26, 2022

You can use the licensePattern option to indicate where any valid expression (including an empty one) can be found.

See the tests added in f4a9249 (or look at the updated README).

The just released v39.2.9 improves the behavior of the option (to ensure it doesn't fail when there isn't a match), so you'll probably want to update to it.

That should address your question, I think, but feel free to comment further as needed.

crapStone pushed a commit to Calciumdibromid/CaBr2 that referenced this issue May 1, 2022
This PR contains the following updates:

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

---

### Release Notes

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

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

[Compare Source](gajus/eslint-plugin-jsdoc@v39.2.8...v39.2.9)

##### Bug Fixes

-   **`check-values`:** handle mismatched `licensePattern`; fixes [#&#8203;884](gajus/eslint-plugin-jsdoc#884) ([f4a9249](gajus/eslint-plugin-jsdoc@f4a9249))

</details>

---

### Configuration

📅 **Schedule**: 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).

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

3 participants