Fix tagList highlight #13270
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
name: TypeScript Checks | |
on: | |
workflow_call: | |
pull_request: | |
types: [opened, synchronize] | |
branches-ignore: [staging, production] | |
paths: ['**.js', '**.ts', '**.tsx', 'package.json', 'package-lock.json', 'tsconfig.json'] | |
jobs: | |
typecheck: | |
if: ${{ github.actor != 'OSBotify' || github.event_name == 'workflow_call' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/composite/setupNode | |
- name: Type check with TypeScript | |
run: npm run typecheck | |
env: | |
CI: true | |
- name: Check for new JavaScript files | |
run: | | |
git fetch origin main --no-tags --depth=1 | |
count_new_js=$(git diff --name-only --diff-filter=A origin/main HEAD -- 'src/libs/*.js' 'src/hooks/*.js' 'src/styles/*.js' 'src/languages/*.js' | wc -l) | |
if [ "$count_new_js" -gt "0" ]; then | |
echo "ERROR: Found new JavaScript files in the /src/libs, /src/hooks, /src/styles, or /src/languages directories; use TypeScript instead." | |
exit 1 | |
fi |