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

tsdoc/syntax causes errors with JSDoc annotations #362

Closed
2 of 3 tasks
musjj opened this issue Jan 22, 2025 · 1 comment · Fixed by #363 or #357
Closed
2 of 3 tasks

tsdoc/syntax causes errors with JSDoc annotations #362

musjj opened this issue Jan 22, 2025 · 1 comment · Fixed by #363 or #357
Assignees
Labels
accepted The issue is accepted and a PR can be proposed. bug Something isn't working

Comments

@musjj
Copy link
Contributor

musjj commented Jan 22, 2025

Your environment

  • Environment name and version: Node.js 22.11.0
  • Operating System and version: NixOS 24.11
  • Package manager and version: npm 10.9.0

Describe the bug

While most of my code is in TypeScript, I still have a few JSDoc-annotated JS files for configs. For example:

prettier.config.mjs

/** @type {import("prettier").Config} */
export default {
  ...
};

This will cause the following lint error:

tsdoc-undefined-tag: The TSDoc tag "@type" is not defined in this configuration

I tried to look up for any solutions, but couldn't find any. Is there a reason why this lint is activated by default?

Project

None

Minimal reproduction

No response

Steps to reproduce

  1. Follow the default installation guide
  2. Add the following file:
    prettier.config.mjs
    /** @type {import("prettier").Config} */
    export default {};

Logs

Code of Conduct

I will submit a PR

  • I'd be willing to submit a PR for this issue.
@musjj musjj added bug Something isn't working triaging Issue is still being evaluated. PRs not yet accepted. labels Jan 22, 2025
@AndreaPontrandolfo
Copy link
Owner

@musjj it's currently targeting these files: [**/*{js,mjs,cjs,ts,mts,cts,jsx,tsx,mtsx,mjsx,astro}]

I will update this to not include JS files (let me know if you want to PR this yourself, otherwise i'll probably PR this this weekend).

@AndreaPontrandolfo AndreaPontrandolfo added accepted The issue is accepted and a PR can be proposed. bug Something isn't working and removed bug Something isn't working triaging Issue is still being evaluated. PRs not yet accepted. labels Jan 22, 2025
musjj added a commit to musjj/sheriff that referenced this issue Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted The issue is accepted and a PR can be proposed. bug Something isn't working
Projects
None yet
2 participants