Skip to content

💡 RFC: Hooking into the check process at the end to extend Astro checks. (@astrojs/check) #1046

@KTrain5169

Description

@KTrain5169

Background & Motivation

I've seen plugins that check for mistakes or specific things (most often when dealing with MDX).

It would be nice to be able to hook into the checking process to be able to check for additional things such as grammatical errors for documentation pages, etc...

Proposed Solution

Possible solutions

  • Creating an API that can be consumed by integrations into the check package

Alternatives considered

  • Running the integration at build time
  • Running the integration at dev time
  • Having the integration be separate

Risks, downsides, and/or tradeoffs

Whilst all of the the above wouldn't require the @astrojs/check package to be installed, it also comes at a sacrifice of either having to build the site, which is enormous for just wanting to validate something, or having an entirely separate script, which would have to be chained together with @astrojs/check and potentially be harder to implement(?), and wouldn't be able to benefit from the current checking code. Plus it makes the scripts section of a package.json too bloated which isn't desirable (my eyes hurt after looking at them).

Detailed Design

No response

Help make it happen!

  • I am willing to submit a PR to implement this change.
  • I am willing to submit a PR to implement this change, but would need some guidance.
  • I am not willing to submit a PR to implement this change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageIssue needs to be triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions