Registry / testing / remark-lint-gherkin-name-length

remark-lint-gherkin-name-length

JSON →
library0.1.1jsnpmunverified

remark-lint plugin to enforce maximum name length of Gherkin elements. Version 0.1.1 is the initial stable release, intended for linting Gherkin feature files within a remark pipeline. It checks that names of features, scenarios, and steps do not exceed a configurable maximum length, improving readability and consistency. This plugin complements other remark-lint and remark-gherkin packages, focusing specifically on length constraints rather than general Gherkin syntax. Development appears to be early-stage with no frequent updates.

npm install remark-lint-gherkin-name-length
INSTALL
IMPORT
SIG · REMARK-LINT-GHERKI
R
remark-lint-gherkin-name-length
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.

default
import remarkLintGherkinNameLength from 'remark-lint-gherkin-name-length'
const remarkLintGherkinNameLength = require('remark-lint-gherkin-name-length')
ESM-only package; CommonJS require will fail. Use dynamic import if needed.
remarkLintGherkinNameLength
import remarkLintGherkinNameLength from 'remark-lint-gherkin-name-length'
import { remarkLintGherkinNameLength } from 'remark-lint-gherkin-name-length'
The package exports a single function as default, not as a named export.
preset
import { preset } from 'remark-lint-gherkin-name-length'
import preset from 'remark-lint-gherkin-name-length/preset'
The preset is a named export from the main module, not a separate path.

Shows how to use remark-lint-gherkin-name-length to lint a Gherkin feature string, setting a maxLength option and processing with remark.

import { remark } from 'remark'; import remarkLint from 'remark-lint'; import remarkLintGherkinNameLength from 'remark-lint-gherkin-name-length'; const file = await remark() .use(remarkLint) .use(remarkLintGherkinNameLength, { maxLength: 70 }) .process(`Feature: A long feature name that exceeds the maximum allowed length`); const messages = file.messages; if (messages.length > 0) { console.log('Lint errors:', messages); } else { console.log('No lint errors'); }
Debug
Known issues
gotchaThe package requires remark-lint to be included in the remark pipeline; otherwise, the plugin does nothing.
fix
Ensure you have installed and used remark-lint before this plugin.
affects: >=0.0.0
gotchaThe plugin only works with Gherkin files parsed by remark-gherkin; it will not lint regular markdown.
fix
Use remark-gherkin parser before this plugin in the pipeline.
affects: >=0.0.0
breakingPackage is ESM-only; using require() throws an error.
fix
Use import or dynamic import() instead of require().
affects: >=0.1.0
deprecatedThe preset export may change in future versions; usage is experimental.
fix
Prefer configuring the plugin directly with options rather than relying on the preset.
affects: 0.1.0
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module not supported
Using CommonJS require() on an ESM-only package.
fix
Convert your project to ESM (set type: module in package.json) or use dynamic import: const remarkLintGherkinNameLength = (await import('remark-lint-gherkin-name-length')).default;
TypeError: plugin is not a function
The plugin is not recognized by remark because remark-lint is missing or not applied first.
fix
Add .use(remarkLint) before .use(remarkLintGherkinNameLength) in the remark pipeline.
Module not found: Can't resolve 'remark-lint-gherkin-name-length'
Package not installed or wrong import path.
fix
Run npm install remark-lint-gherkin-name-length and ensure import path is correct.
Upgrade
Version history
0.1.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
remark-lint-gherkin-name-length — npm install remark-lint-gherkin-name-length · libregistry