Skip to content

jsDocProcessor check examples buggy with typescript-eslint #1377

Open
@tunnckoCore

Description

@tunnckoCore

The projectService option in typescript eslint is weird enough but..

@example error: Fatal: Parsing error: /home/charlike/code/mid-april-2025/workspaces-filter/src/foo.ts/1_/home/charlike/code/mid-april-2025/workspaces-filter/src/foo.md/*.js was not found by the project service. Consider either including it in the tsconfig.json or including it in allowDefaultProject.eslint

Whatever i try to include these dummy md/js/example files it fails.

Any hints on integrating eslint-plugin-jsdoc with typescript?

I have a root tsconfig in which i have include that includes both ts and js files. I tried with projectService: true, i tried with { projectService: { allowDefaultProject: ["*.js"] } }, i tried adding *md/*.js ..

It's most likely because of how you build the dummy filename which in turn cannot be detected properly by typescript-eslint (or eslint, or settings or whatever) for some reason. Maaybe just make a random name or hash of the source of the example.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions