Skip to content

The context.filename is undefined for inline lint in Cursor IDE #162

@david-vaclavek

Description

@david-vaclavek

Hello.

The context.filename is undefined for inline lint in Cursor IDE. I suppose it's related to the inline file lint in general.

My suggested fix is to replace

const filename = context.filename;

with

const fullFilePath = context.getFilename();
const cwd = context.getCwd();
const filename = path.relative(cwd, fullFilePath);

which works perfectly in my case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingquestionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions