Skip to content

yutailang0119/action-textlint

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

action-textlint status

GitHub Action for textlint

This Action generates annotations from textlint Report JSON.
Support textlint to v12.2.0 or later.

Usage

An example workflow(.github/workflows/textlint.yml) to executing textlint follows:

name: textlint

on:
  pull_request:
    paths:
      - .github/workflows/textlint.yml
      - 'docs/**/*.md'

jobs:
  textlint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm install
      - name: run textlint
        id: run-textlint
        run: |
          echo "TEXTLINT_OUTPUT=$(./node_modules/.bin/textlint 'docs/**/*.md' -f json || true)" >> $GITHUB_OUTPUT
      - uses: yutailang0119/action-textlint@v4
        with:
          textlint-output: ${{ steps.run-textlint.outputs.TEXTLINT_OUTPUT }}
          ignore-warnings: true # Ignore Lint Warnings
        continue-on-error: false # If annotations contain error of severity, action-textlint exit 1.

Author

Yutaro Muta

References

License

action-textlint is available under the MIT license. See the LICENSE file for more info.