Initial Linting Config #3423
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Checks content for rules. Focused on new astro site | |
name: content_check | |
on: | |
pull_request: | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
check_content: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- uses: actions/checkout@v4 | |
# I want to lint only the files that have changed in the PR | |
# This is a bit tricky because we need to fetch the main branch to compare against | |
# Instead I am using the GitHub cli to fetch the changes in the PR | |
- name: Install GitHub CLI | |
run: sudo apt-get install gh | |
- name: Authenticate GitHub CLI | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token | |
- name: Set Pull Request Number | |
run: echo "PR_NUMBER=${{ github.event.pull_request.number }}" >> $GITHUB_ENV | |
- name: NPM Install | |
run: | | |
cd astro | |
npm ci | |
shell: bash | |
- name: ESLint | |
run: | | |
cd astro | |
bash ../src/scripts/lint-recent-files.sh | |
shell: /usr/bin/bash -e -o pipefail {0} | |
- name: Check for blog posts that have incorrect categories | |
run: | | |
exit `src/scripts/check-for-incorrect-categories.sh` | |
shell: bash | |
- name: No absolute URLs referencing FusionAuth.io | |
run: | | |
exit `src/scripts/check-for-absolute-urls.sh` | |
shell: bash | |
- name: Check for erroneous markdown references | |
run: | | |
exit `src/scripts/check-for-incorrect-markdown-references.sh` | |
shell: bash | |
- name: Make sure all docs have a full sentence in their description. | |
run: | | |
exit `src/scripts/check-for-full-sentences-in-docs-descriptions.sh` | |
shell: bash | |
- name: check for APIFields with no name | |
run: | | |
exit `src/scripts/check-for-api-fields-no-name.sh` | |
shell: bash | |
- name: check for the word 'edition' which we don't use any more, excluding files it is okay to have 'edition' in | |
run: | | |
exit `src/scripts/check-for-use-of-word-edition.sh` | |
shell: bash | |
- name: check for the proper casing of word 'plan' which should always be lowercase when prefixed by Community, Starter, Enterprise or Essentials | |
run: | | |
exit `src/scripts/check-for-use-proper-casing-of-plan.sh` | |
shell: bash | |
- name: check unsorted vale keywords. error to fix because this decreases merge conflicts | |
run: | | |
exit `src/scripts/check-vale-vocab-sorted.sh` | |
shell: bash |