-
-
Notifications
You must be signed in to change notification settings - Fork 167
Closed
Description
Expected behavior
Both interface links act the same way.
Actual behavior
Imported interface works as expected, while interface defined in the same file yields the error.
ESLint Config
import js from "@eslint/js";
import globals from "globals";
import tseslint from "typescript-eslint";
import jsdoc from "eslint-plugin-jsdoc";
import { defineConfig } from "eslint/config";
export default defineConfig([
{
files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
plugins: { js },
extends: ["js/recommended"],
},
{
files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
plugins: { jsdoc },
...jsdoc.configs["flat/recommended-typescript-error"],
},
{
files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
languageOptions: { globals: globals.node },
},
tseslint.configs.recommended,
{
rules: {
"jsdoc/no-undefined-types": "error",
},
},
]);
ESLint sample
// some.ts
export interface SomeInterface1 {
someProp: unknown;
}
// index.ts
import type { SomeInterface1 } from "./some";
export interface SomeInterface2 {
someProp: unknown;
}
/**
* {@link SomeInterface1.someProp} // No error
* {@link SomeInterface2.someProp} // jsdoc/no-undefined-types: The type 'SomeInterface2.someProp' is undefined.
* {@link SomeInterface2} // No error without specifying a property
* @returns something
*/
Environment
- Node version: 22.17.0
- ESLint version 9.30.0
eslint-plugin-jsdoc
version: 51.2.3