Skip to content

Commit 9e92718

Browse files
committed
fix(prefer-import-tag): handle inserting before early comment nodes; fixes #1549
1 parent 13fe027 commit 9e92718

File tree

5 files changed

+387
-499
lines changed

5 files changed

+387
-499
lines changed

docs/rules/prefer-import-tag.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,14 @@ The following patterns are considered problems:
294294
*/
295295
// "jsdoc/prefer-import-tag": ["error"|"warn", {"exemptTypedefs":true}]
296296
// Message: Inline `import()` found; using `@typedef`
297+
298+
/** @type {import('foo')} */
299+
let foo;
300+
// Message: Inline `import()` found; prefer `@import`
301+
302+
/** @type {import('foo')} */
303+
let foo;
304+
// Message: Inline `import()` found; prefer `@import`
297305
````
298306

299307

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"url": "http://gajus.com"
66
},
77
"dependencies": {
8-
"@es-joy/jsdoccomment": "~0.64.0",
8+
"@es-joy/jsdoccomment": "~0.65.2",
99
"are-docs-informative": "^0.0.2",
1010
"comment-parser": "1.4.1",
1111
"debug": "^4.4.3",
@@ -41,7 +41,7 @@
4141
"@types/estree": "^1.0.8",
4242
"@types/json-schema": "^7.0.15",
4343
"@types/mocha": "^10.0.10",
44-
"@types/node": "^24.6.0",
44+
"@types/node": "^24.6.1",
4545
"@types/semver": "^7.7.1",
4646
"@types/spdx-expression-parse": "^3.0.5",
4747
"@typescript-eslint/types": "^8.45.0",
@@ -58,7 +58,7 @@
5858
"glob": "^11.0.3",
5959
"globals": "^16.4.0",
6060
"husky": "^9.1.7",
61-
"jsdoc-type-pratt-parser": "^6.0.1",
61+
"jsdoc-type-pratt-parser": "^6.1.2",
6262
"json-schema": "^0.4.0",
6363
"json-schema-to-typescript": "^15.0.4",
6464
"lint-staged": "^16.2.3",
@@ -67,7 +67,7 @@
6767
"replace": "^1.2.2",
6868
"rimraf": "^6.0.1",
6969
"semantic-release": "^24.2.9",
70-
"typescript": "5.9.2",
70+
"typescript": "5.9.3",
7171
"typescript-eslint": "^8.45.0"
7272
},
7373
"engines": {

0 commit comments

Comments
 (0)