Skip to content

Switch from @require to @match #685

@arsinclair

Description

@arsinclair

The linter reports that:

Using @include is potentially unsafe and may be obsolete in Manifest v3. Please switch to @match

Using @match directives is considered more safe, however they don't support Regex, only globbing.

So for bandcamp importer, it would be something like this

--- // @include      /^https:\/\/[^/]+\/(?:(?:(?:album|track))\/[^/]+|music)$/
--- // @include      /^https:\/\/([^.]+)\.bandcamp\.com((?:\/(?:(?:album|track))\/[^/]+|\/|\/music)?)$/
--- // @include      /^https?:\/\/web\.archive\.org\/web\/\d+\/https?:\/\/[^/]+(?:\/(?:album|track)\/[^/]+\/?|\/music\/?|\/?)$/
+++ // @match        https://*/*/album/*
+++ // @match        https://*/*/track/*
+++ // @match        https://*/*/music*
+++ // @match        https://*.bandcamp.com/album/*
+++ // @match        https://*.bandcamp.com/track/*
+++ // @match        https://*.bandcamp.com/music*
+++ // @match        https://*.bandcamp.com/
+++ // @match        https://web.archive.org/web/*/https://*/album/*
+++ // @match        https://web.archive.org/web/*/https://*/track/*
+++ // @match        https://web.archive.org/web/*/https://*/music*
+++ // @match        https://web.archive.org/web/*/https://*/

Question: should we move towards matching or should we silence the eslint warning, until (if) Manifest v3 removes the support? What are your thoughts?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions