-
Notifications
You must be signed in to change notification settings - Fork 3.9k
CI: Add "Rules of React" + React Compiler CI check and companion dev tool #70394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
roryabraham
merged 96 commits into
Expensify:main
from
margelo:@chrispader/react-compiler-rules-of-react-ci-linting
Sep 30, 2025
Merged
Changes from all commits
Commits
Show all changes
96 commits
Select commit
Hold shift + click to select a range
e6ff5e8
draft initial CI/script setup with AI
chrispader a835266
fix: ts and eslint errors
chrispader 3cfa7bd
docs: add empty line
chrispader c91375a
chore: simplify GH workflow
chrispader b6f2af5
feat: include reason for compilation skip
chrispader 04568f8
fix: compiler failure reason extraction
chrispader 434345a
run full check for testing
chrispader dc85cb3
fix: ts errors
chrispader 2c95f19
add glob pattern matching for excluded files and use in babel config
chrispader 9631868
chore: update scripts
chrispader 82e6ab9
refactor: improve and re-structure tracker tool
chrispader c177a15
fix: re-use code from tracker in devtool
chrispader 6f4bfd1
chore: update compliance GH workflow triggers
chrispader 01c6d6f
refactor: move files and update script
chrispader 3de444a
update import
chrispader 43eb4c6
chore: print reason for check-changed
chrispader c6dc1ac
update file path
chrispader da065cb
refactor: remove outputs to files and rename
chrispader 507a541
refactor compliance checker
chrispader 0f2e8dd
improve compliance checker
chrispader 474bfd2
improve logs
chrispader 9a1deb9
run full check
chrispader 0d34384
update docs
chrispader 19dfb8a
feat: use CLI tool for compliance checker CLI
chrispader 300bb5b
feat: allow multiple files in check command
chrispader 6617f12
remove devtool
chrispader d3ffce5
refactor: move compliance checker tool
chrispader b9b5a85
chore: remove unused directories from react-compiler-config.json
chrispader db68821
simplify script
chrispader 0c0432b
fix: produce unique failure results
chrispader 9db64d7
improve output formatting
chrispader c5c2532
update back to check-changed workflow script
chrispader ff6a490
fix: improve filtering and output
chrispader 53ec8e9
fix: improve changed files check
chrispader 26b4906
fix: logger emoji sticking to text
chrispader 48e7f57
Merge branch 'main' into @chrispader/react-compiler-rules-of-react-ci…
chrispader 35159ee
Merge branch 'main' into @chrispader/react-compiler-rules-of-react-ci…
chrispader 917431f
dummy change to trigger chefcks
chrispader dce2092
revert dummy change
chrispader 36eefcb
chore: update node version in workflow
chrispader 64f36e3
chore: setup-node action and checkout in GH workflow
chrispader 50609d7
fix: remove invalid character
chrispader 2e58a4e
fix: show and throw error if changed files could not be found
chrispader 51cb808
fix: improve remote/branch detection
chrispader b509c73
fix: add --remote flag and improve remote handling
chrispader dfcbce6
fix: make script work in CI
chrispader a00fa51
fix: run git fetch quietly
chrispader 49cdaa5
fix: add empty lines in log
chrispader a8ca87a
fix: logging
chrispader e28514f
feat: extract and improve react-compiler-config glob pattern handling
chrispader b7ec871
remove comments
chrispader d3e6838
remove react compiler error
chrispader 092b94c
fix: logging empty lines
chrispader d73655d
fix: convert shouldReactCompilerProcessFile script to CommonJS
chrispader e703d6b
Merge branch 'main' into @chrispader/react-compiler-rules-of-react-ci…
chrispader 1e62ca7
fix: improve CLI
chrispader 7f91e2e
add .mjs to React Compiler include patterns
chrispader b7030b3
Revert "fix: convert shouldReactCompilerProcessFile script to CommonJS"
chrispader 0144f0a
fix: simplify pattern matching for react-compiler
chrispader ae1f0ff
remove console.log
chrispader f2879fa
remove log
chrispader 51eb6f9
update docs
chrispader 9735c0a
Merge branch 'main' into @chrispader/react-compiler-rules-of-react-ci…
chrispader fc544d9
chore: remove `react-compiler-config.json` leftovers and only check `…
chrispader 2ec574b
chore: remove `workflow_call` trigger and add to `preDeploy` checks
chrispader 166095a
fix: remove redundant `npm ci` call in check
chrispader b18abc0
fix: annotate GH checkout action
chrispader ad51f79
chore: remove `IS_DESKTOP_BUILD` flag on `setupNode` action
chrispader 5ed0d71
fix: remove unnecessary comments
chrispader c3c83dd
fix: Logger emoji and line alignment
chrispader a71fa1f
Update .gitignore
chrispader 4763b85
refactor: simplify `runCompilerHealthcheck` function by removing `det…
chrispader 791d201
refactor: inline cli command check
chrispader 60db217
refactor: simplify failure summary
chrispader e589cf6
add dummy react compiler error change
chrispader 266b0c0
fix: improve glob pattern matching for react-compiler-healthcheck
chrispader 14c52c1
fix: use Set and Map and simplify logic alltogether
chrispader 3fb620b
refactor: extract git related functions to utils/Git.ts
chrispader 4e342fc
fix: invalid string validation
chrispader ba415b5
feat: use GithubUtils tool for fetching changed files
chrispader 35432c8
temp: log changed files
chrispader 1496faa
fix: promise/async handling
chrispader 7f18974
fix: add GITHUB_TOKEN and CI env vars
chrispader c116c0d
chore: add --fetch=1 flag to git fetch
chrispader 0ff90b0
fix: react-compiler-healthcheck source argument invalid
chrispader 5b7e7a2
fix: remove console.log
chrispader 5ccda6a
fix: remove react compiler error
chrispader 2c1a3fb
fix: add back `workflow_call` to allow using in `preDeploy` workflow
chrispader 0f1a81f
fix: add "subprocessors" word to `cspell.json`
chrispader 083d338
Merge branch 'main' into @chrispader/react-compiler-rules-of-react-ci…
chrispader 9ab4a8f
chore: add `secrets: inherit` to workflow call
chrispader 136c6f0
fix: markdown lint errors
chrispader 85684af
fix: TS errors
chrispader bb35f3b
Merge branch 'main' into @chrispader/react-compiler-rules-of-react-ci…
chrispader 9edd299
fix: add compiler compliance check to dependency of preDeploy `confir…
chrispader c9f3183
chore: gh-actions-build diff
chrispader File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| name: React Compiler Compliance Check | ||
|
|
||
| on: | ||
| workflow_call: | ||
| pull_request: | ||
| types: [opened, synchronize] | ||
| branches-ignore: [staging, production] | ||
| paths: ['**.tsx'] | ||
|
|
||
| concurrency: | ||
| group: ${{ github.ref == 'refs/heads/main' && format('{0}-{1}', github.ref, github.sha) || github.ref }}-react-compiler-compliance | ||
| cancel-in-progress: true | ||
| jobs: | ||
| react-compiler-compliance: | ||
| name: React Compiler Compliance | ||
| if: ${{ github.actor != 'OSBotify' }} | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| # v4 | ||
| - name: Checkout | ||
| uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 | ||
|
|
||
| - name: Setup Node | ||
| uses: ./.github/actions/composite/setupNode | ||
|
|
||
| - name: Run React Compiler Compliance Check | ||
| run: npm run react-compiler-compliance-check check-changed | ||
| env: | ||
| CI: true | ||
| GITHUB_TOKEN: ${{ github.token }} | ||
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.