{"id":46231,"library":"remark-lint-gherkin-allowed-tags","title":"remark-lint-gherkin-allowed-tags","description":"remark-lint plugin (v0.1.1) that restricts Gherkin (Cucumber .feature file) tags to a user-specified allowlist. Enforces tag discipline in BDD scenarios by flagging any tag not in the configured array. Ships TypeScript types. Part of the unifiedjs-gherkin ecosystem. Similar to remark-lint-gherkin-forbidden-tags but uses a positive allowlist model. MIT license. Low release cadence.","status":"active","version":"0.1.1","language":"javascript","source_language":"en","source_url":"https://github.com/occar421/unifiedjs-gherkin","tags":["javascript","typescript"],"install":[{"cmd":"npm install remark-lint-gherkin-allowed-tags","lang":"bash","label":"npm"},{"cmd":"yarn add remark-lint-gherkin-allowed-tags","lang":"bash","label":"yarn"},{"cmd":"pnpm add remark-lint-gherkin-allowed-tags","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency for lint rule infrastructure","package":"remark-lint","optional":false},{"reason":"used to walk Gherkin AST nodes","package":"unist-util-visit","optional":false}],"imports":[{"note":"ESM-only; CommonJS require may fail unless using dynamic import.","wrong":"const remarkLintGherkinAllowedTags = require('remark-lint-gherkin-allowed-tags')","symbol":"default","correct":"import remarkLintGherkinAllowedTags from 'remark-lint-gherkin-allowed-tags'"},{"note":"Default export only; named import does not exist.","wrong":"import { remarkLintGherkinAllowedTags } from 'remark-lint-gherkin-allowed-tags'","symbol":"remarkLintGherkinAllowedTags","correct":"import remarkLintGherkinAllowedTags from 'remark-lint-gherkin-allowed-tags'"},{"note":"Type import from remark-lint, not from this package; this package does not re-export types.","symbol":"type Rule","correct":"import type { Rule } from 'remark-lint'"}],"quickstart":{"code":"import { remark } from 'remark'\nimport remarkLint from 'remark-lint'\nimport remarkLintGherkinAllowedTags from 'remark-lint-gherkin-allowed-tags'\n\nconst file = await remark()\n  .use(remarkLint)\n  .use(remarkLintGherkinAllowedTags, { allowed: ['@smoke', '@regression'] })\n  .process(`Feature: Test\\n  @unexpected_tag\\n  Scenario: Demo\\n    Given a step`)\n\nconsole.log(String(file).includes('warning') ? 'Has warnings' : 'No warnings')","lang":"typescript","description":"Sets up remark-lint with the plugin allowing only @smoke and @regression tags, then processes a Gherkin snippet with an unexpected tag to trigger a warning."},"warnings":[{"fix":"Ensure tags are only placed on recognized AST nodes; step tags are ignored.","message":"Plugin checks tags on Scenario, Scenario Outline, Examples, and Feature — but NOT on tags attached to Steps.","severity":"gotcha","affected_versions":"<=0.1.1"},{"fix":"Provide tags exactly as they appear in the feature file, including the leading `@`.","message":"The `allowed` option must be an array of strings, each starting with `@` — tags without `@` will never match and will always be flagged.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Install remark-lint@^9.0.0.","message":"Plugin requires peer dependency `remark-lint` v9+; older versions may silently fail to apply the rule.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"search_vec":"'allow':5 'allowlist':24,62 'array':39 'bdd':29 'cadenc':68 'configur':38 'cucumb':15 'disciplin':27 'ecosystem':49 'enforc':25 'featur':16 'file':17 'flag':32 'forbidden':56 'gherkin':4,14,48,55 'javascript':69 'licens':65 'lint':3,9,54 'low':66 'mit':64 'model':63 'part':43 'plugin':10 'posit':61 'releas':67 'remark':2,8,53 'remark-lint':7 'remark-lint-gherkin-allowed-tag':1 'remark-lint-gherkin-forbidden-tag':52 'restrict':13 'scenario':30 'ship':40 'similar':50 'specifi':23 'tag':6,18,26,34,57 'type':42 'typescript':41,70 'unifiedj':47 'unifiedjs-gherkin':46 'use':59 'user':22 'user-specifi':21 'v0.1.1':11","created_at":"2026-06-07T12:58:55.766291+00:00","updated_at":"2026-06-07T12:58:55.766291+00:00","problems":[{"fix":"Install with npm install remark-lint-gherkin-allowed-tags --save-dev and ensure package.json has type: module or use .mjs extension.","cause":"Package not installed or not resolved correctly in ESM context.","error":"Error: Cannot find module 'remark-lint-gherkin-allowed-tags'"},{"fix":"Use import { remark } from 'remark'; and call .process() with await.","cause":"Using old remark v12 API incorrectly, or missing await when processing.","error":"TypeError: remark().use is not a function"},{"fix":"Ensure remark-lint is installed and applied before this plugin: .use(remarkLint).use(remarkLintGherkinAllowedTags).","cause":"Plugin not properly loaded: missing or misconfigured peer dependency remark-lint.","error":"clean is not a function (undefined)"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/occar421/unifiedjs-gherkin/tree/main/packages/remark-lint-gherkin-allowed-tags#readme","github":"https://github.com/occar421/unifiedjs-gherkin","docs":null,"changelog":null,"pypi":null,"npm":"remark-lint-gherkin-allowed-tags","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}