refactor(core): consolidate inline visually-hidden styles into VisuallyHidden primitive #10618
This file contains hidden or 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
| # Copyright (c) Meta Platforms, Inc. and affiliates. | |
| name: Lint | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: {} | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Check for docsite-only changes | |
| if: github.event_name == 'pull_request' | |
| id: scope | |
| run: | | |
| git fetch origin ${{ github.base_ref }} --depth=50 | |
| MERGE_BASE=$(git merge-base HEAD origin/${{ github.base_ref }} 2>/dev/null || echo "") | |
| if [ -z "$MERGE_BASE" ]; then | |
| echo "docsite_only=false" >> $GITHUB_OUTPUT | |
| exit 0 | |
| fi | |
| CHANGED=$(git diff --name-only "$MERGE_BASE"...HEAD) | |
| NON_DOCSITE=$(echo "$CHANGED" | grep -v '^apps/docsite/' | head -1) | |
| if [ -z "$NON_DOCSITE" ]; then | |
| echo "docsite_only=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "docsite_only=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Skip for docsite-only changes | |
| if: steps.scope.outputs.docsite_only == 'true' | |
| run: echo "Docsite-only PR — skipping lint" | |
| - uses: pnpm/action-setup@v6 | |
| if: steps.scope.outputs.docsite_only != 'true' | |
| - uses: actions/setup-node@v6 | |
| if: steps.scope.outputs.docsite_only != 'true' | |
| with: | |
| node-version: 24 | |
| cache: 'pnpm' | |
| - run: pnpm install --frozen-lockfile | |
| if: steps.scope.outputs.docsite_only != 'true' | |
| - name: Clear ESLint cache | |
| if: steps.scope.outputs.docsite_only != 'true' | |
| run: rm -rf .eslintcache node_modules/.cache | |
| - name: Check repository guardrails | |
| if: steps.scope.outputs.docsite_only != 'true' | |
| run: pnpm check:repo | |
| - name: Run ESLint | |
| if: steps.scope.outputs.docsite_only != 'true' | |
| run: pnpm lint |