Skip to content

False positive for API definition in web worker #150

@cybaea

Description

@cybaea

I experience a false positive source code warning in the community site scorecard tests. I get

This is not a popup window but an interface definition for Orama and I can't rename the external API. (Also, this is a web worker which doesn't have a document or activeDocument)

I am adding a // eslint-disable-next-line obsidianmd/prefer-active-doc directive with comments, but it feels like this particular usage of a class attribute called document should not trigger the positive.

interface OramaResultHit {
    // eslint-disable-next-line obsidianmd/prefer-active-doc -- Orama search results use the 'document' property name; this is a data property in a Web Worker, not a global DOM access.
    document: OramaDocument;
    id: string;
    score: number;
}

PS: Thanks for the community.obsidian.md site - it's awesome!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions