Skip to content

Emit helpful message when background.service_worker is used without background.scripts/page #5252

@Rob--W

Description

@Rob--W

addons-linter was patched before to emit only a warning when background.service_worker is used without scripts/page (#5152). The warnings are still not very helpful.

Instead of a generic "/background/service_worker" is not supported.", we should print a helpful message that encourages the use of scripts. For more details on why and what, see my write-up for web-ext run at mozilla/web-ext#3101

The relevant implementation was last touched for #5152, at

this.collector.addWarning(
messages.manifestFieldUnsupported('/background/service_worker')
);
} else {
this.collector.addError(
messages.manifestFieldUnsupported('/background/service_worker')
);
this.isValid = false;
}

┆Issue is synchronized with this Jira Task

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions