From a6f4460cc0ebe333d87fd9c02f24db5fd879da40 Mon Sep 17 00:00:00 2001 From: double beep <38133098+double-beep@users.noreply.github.com> Date: Sat, 3 Aug 2024 13:36:01 +0000 Subject: [PATCH] feat: add support for the `@tag` header --- lib/data/compat-headers.ts | 1 + tests/lib/rules/compat-headers.ts | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/lib/data/compat-headers.ts b/lib/data/compat-headers.ts index f45dab0..df4861e 100644 --- a/lib/data/compat-headers.ts +++ b/lib/data/compat-headers.ts @@ -157,6 +157,7 @@ export const compatMap: { { type: 'tampermonkey', versionConstraint: '>=3.8' }, { type: 'violentmonkey', versionConstraint: '>=2.1.6.2' } ], + tag: [{ type: 'tampermonkey', versionConstraint: '>=5.3' }], // OpenUserJS collaborator: [], diff --git a/tests/lib/rules/compat-headers.ts b/tests/lib/rules/compat-headers.ts index 916d7b5..8851f8f 100644 --- a/tests/lib/rules/compat-headers.ts +++ b/tests/lib/rules/compat-headers.ts @@ -61,6 +61,16 @@ ruleTester.run('compat-headers', compatHeaders, { tampermonkey: '*' } } + }, + { + code: `// ==UserScript== +// @tag productivity +// ==/UserScript==`, + settings: { + userscriptVersions: { + tampermonkey: '5.3.2' + } + } } ], invalid: [