Gherkin feature linter written in TypeScript, based on the original gherkin-lint project. Provides linting for .feature files using configurable rules, with support for custom TypeScript rules and error levels (Error/Warn). Current stable version is 5.0.6. Release cadence is irregular. Key differentiators: TypeScript support for writing custom rules, pretty terminal output, fixed issues from the original library, and output directed to process.stdout.
npm install gherkin-lint-tsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to import and use the linter with a config object, linting .feature files and printing results.
Use await or .then() when calling lint().
Replace check() with lint().
Ensure the config file is in the root directory of your project.
Rewrite custom rules in TypeScript.
Specify 'indentation': { 'Feature': 'spaces', 'Scenario': 2 } in config.Replace 'new-line-at-eof' with 'eof-newline' in config.
Run 'npm install gherkin' or 'yarn add gherkin'.
Use import { lint } from 'gherkin-lint-ts'.Add a 'rules' object with at least one rule to .gherkin-lintrc.