Registry / testing / remark-lint-gherkin-one-feature-per-file

remark-lint-gherkin-one-feature-per-file

JSON →
library0.1.1jsnpmunverified

A remark-lint plugin that enforces each Gherkin (.feature) file contains exactly one feature. This is a small, focused rule for the unified ecosystem, currently at version 0.1.1. It works with remark-lint and the gherkin-utils parser. The plugin is designed to improve maintainability of Gherkin test scenarios by preventing multiple features from being defined in a single file. It is stable but early in development, with infrequent releases.

npm install remark-lint-gherkin-one-feature-per-file
INSTALL
IMPORT
SIG · REMARK-LINT-GHERKI
R
remark-lint-gherkin-one-feature-per-file
testingjavascriptv0.1.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

oneFeaturePerFile
import { oneFeaturePerFile } from 'remark-lint-gherkin-one-feature-per-file'
const oneFeaturePerFile = require('remark-lint-gherkin-one-feature-per-file')
ESM-only; no default export.

Shows how to lint a Gherkin file for the one-feature-per-file rule using remark-lint.

import { readSync } from 'to-vfile'; import { remark } from 'remark'; import remarkLint from 'remark-lint'; import { oneFeaturePerFile } from 'remark-lint-gherkin-one-feature-per-file'; const file = readSync('./example.feature'); const result = await remark() .use(remarkLint) .use(oneFeaturePerFile) .process(file); if (result.messages.length) { console.log('Lint warnings:', result.messages); }
Debug
Known issues
gotchaPlugin requires gherkin-utils parser installed separately.
fix
npm install gherkin-utils
affects: >=0.0.0
gotchaPlugin only works on files parsed with Gherkin parser; not compatible with markdown.
fix
Ensure files have .feature extension and are parsed via gherkin-utils.
affects: >=0.0.0
deprecatedPlugin version 0.x may have API changes before 1.0.0.
fix
Pin version or test upgrades carefully.
affects: >=0.0.0 <1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'gherkin-utils'
gherkin-utils not installed
fix
npm install gherkin-utils
TypeError: plugin.use is not a function
plugin used directly without remark-lint
fix
Use with .use(remarkLint).use(oneFeaturePerFile)
Upgrade
Version history
0.1.1latest on npm
Audit
Dependencies
remark-lintrequiredCore linting framework
unifiedoptionalUnified ecosystem required
gherkin-utilsrequiredParsing Gherkin syntax
Agent activity
2 hits · last 30 days
node
2
Resources
remark-lint-gherkin-one-feature-per-file — npm install remark-lint-gherkin-one-feature-per-file · libregistry