Skip to content

Shipwright: avoid GritQL for TypeScript plank-form checks #1

Description

@dmytri

Shipwright guidance currently offers a Biome GritQL plugin as a parser-backed TypeScript plank-inventory/form checker. That suggestion is not feasible for the rule Shipshape requires.

Required rule:

  • find every @planks and @planks-provisional token
  • prove it is in a JSDoc block immediately attached to a declaration
  • join provisional references across source files to @captain scenarios in Gherkin files

Live checks against Biome 2.5.4 found:

  • leading JSDoc is CST trivia and is invisible to declaration GritQL matches
  • comment() does not compile through Biome JavaScript node mappings
  • a declaration regex sees body comments but not the attached leading docblock, which inverts the needed signal
  • Biome plugins do not support the required multi-file source-to-Gherkin join

JSDoc 4.0.5 is also not a TypeScript fallback: jsdoc -X packages/core/src/index.ts returns There are no input files to process.

Suggested guidance change:

  • use the TypeScript compiler API when TypeScript is already installed
  • use ts-morph when its higher-level JSDoc APIs justify a dependency
  • reserve Biome GritQL for syntax constraints that do not depend on comment trivia or cross-file non-JavaScript joins
  • require a live negative probe before naming a checker derivable

This was discovered during a real harbour refit after following the current GritQL recommendation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions