gajus / eslint-plugin-jsdoc

JSDoc specific linting rules for ESLint.
Other
1.07k stars 155 forks source link

support @import from TypeScript 5.5 #1218

Closed turadg closed 3 months ago

turadg commented 3 months ago

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch eslint-plugin-jsdoc@47.0.2 for the project I'm working on.

We used the TypeScript 5.5 nightly to get https://github.com/microsoft/TypeScript/pull/57207. That caused this linter to report an invalid tag.

Here's a fix to include the @import tag in typescript mode.

diff --git a/node_modules/eslint-plugin-jsdoc/dist/tagNames.js b/node_modules/eslint-plugin-jsdoc/dist/tagNames.js
index 4d27508..2d9aeb5 100644
--- a/node_modules/eslint-plugin-jsdoc/dist/tagNames.js
+++ b/node_modules/eslint-plugin-jsdoc/dist/tagNames.js
@@ -102,6 +102,8 @@ const jsdocTags = exports.jsdocTags = {
  */
 const typeScriptTags = exports.typeScriptTags = {
   ...jsdocTags,
+  // https://github.com/microsoft/TypeScript/issues/22160
+  import: [],
   // https://www.typescriptlang.org/tsconfig/#stripInternal
   internal: [],
   // https://devblogs.microsoft.com/typescript/announcing-typescript-5-0/#overload-support-in-jsdoc

I can make a PR if you like.

github-actions[bot] commented 3 months ago

:tada: This issue has been resolved in version 48.2.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: