Commit Graph

1536 Commits

Author SHA1 Message Date
Aiden Bai ae1900252e perf(native): port no-chain-state-updates 2026-08-31 14:43:51 -07:00
Aiden Bai d41d738877 perf(native): port no-initialize-state 2026-08-31 11:04:14 -07:00
Aiden Bai aecf1e8658 perf(native): port module browser global rule 2026-08-31 08:11:13 -07:00
Aiden Bai cf33a33fc2 perf(native): port prop callback effect rule 2026-08-31 06:46:15 -07:00
Aiden Bai 8e12d86e34 perf(native): port render state rules 2026-08-31 05:48:42 -07:00
Aiden Bai 61e9e361dc perf(native): port effect state rules 2026-08-31 03:41:18 -07:00
Aiden Bai 859184b681 perf(native): port async correctness rules 2026-08-31 00:24:41 -07:00
Aiden Bai 4e8788b6d3 perf(native): port React correctness rules 2026-08-30 23:27:14 -07:00
Aiden Bai f889a4b86a perf(native): port component correctness rules 2026-08-30 21:35:24 -07:00
Aiden Bai 7c2491244c perf(native): port lifecycle state rules 2026-08-30 19:21:54 -07:00
Skosh adc3a91291 fix: handle direct fbt component returns (#1730)
* fix(rn-no-raw-text): suppress diagnostic for components returning only transparent text wrappers

Components whose entire return value is a transparent text wrapper (<fbt>, <fbs>, or <Fragment>) are now classified as text-producing components. This prevents false positives when such components are consumed inside <Text> elements.

Fixes #1729

Co-authored-by: Skosh <skoshx@users.noreply.github.com>

* test(rn-no-raw-text): add regression tests for issue #1729

Co-authored-by: Skosh <skoshx@users.noreply.github.com>

* chore: add changeset for issue #1729 fix

Co-authored-by: Skosh <skoshx@users.noreply.github.com>

* test: update regression tests to reflect #1729 fix limitation

Co-authored-by: Skosh <skoshx@users.noreply.github.com>

* fix: handle direct fbt component returns

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Skosh <skoshx@users.noreply.github.com>
Co-authored-by: Aiden Bai <aiden@million.dev>
2026-08-30 18:28:17 -07:00
Aiden Bai ba8ab39d03 perf(native): port state and server rules 2026-08-30 18:05:42 -07:00
Skosh e1d4c51abf fix: allow fbt content in verified text wrappers (#1723)
* fix(rn-no-raw-text): exempt fbt children of text-wrapping custom components

The rule now checks auto-detected and imported text wrappers when
evaluating transparent wrapper boundaries, not just built-in text
components. This fixes a false positive where `<fbt>` (a compile-time
translation tag) inside a custom component that renders `<Text>` was
incorrectly reported as a crash.

Closes #1722

Co-authored-by: Skosh <skoshx@users.noreply.github.com>

* chore: add changeset for #1722

Co-authored-by: Skosh <skoshx@users.noreply.github.com>

* fix(rn-no-raw-text): verify fbt text wrappers

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Skosh <skoshx@users.noreply.github.com>
Co-authored-by: Aiden Bai <aiden@million.dev>
2026-08-30 17:06:43 -07:00
Skosh 6adf55ed88 fix: keep required Expo Metro config subpaths (#1728)
* fix: remove @expo/metro-config from redundant dependency check

The rule incorrectly flagged @expo/metro-config as redundant, suggesting
to use expo/metro-config instead. While expo does re-export the main entry
point, it does NOT re-export subpaths like babel-transformer.

Projects that import @expo/metro-config/babel-transformer (documented by
Expo for extending the Babel transformer) cannot use expo/metro-config/
babel-transformer as it does not exist. The suggested fix is impossible
to follow for subpath imports.

Since the static check cannot distinguish between main entry and subpath
usage, and Expo SDK upgrades keep both packages in lockstep, the version
drift risk is minimal. Removing this entry prevents false positives.

Closes #1726

Co-authored-by: Skosh <skoshx@users.noreply.github.com>

* chore: add changeset for expo/metro-config fix

Co-authored-by: Skosh <skoshx@users.noreply.github.com>

* fix: keep required Expo Metro config subpaths

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Skosh <skoshx@users.noreply.github.com>
Co-authored-by: Aiden Bai <aiden@million.dev>
2026-08-30 16:34:34 -07:00
Aiden Bai 5d6b3d114a perf(native): port render stability rules 2026-08-30 16:09:37 -07:00
Aiden Bai 0f59a3b84d fix: run test-noise rules in application directories (#1725) 2026-08-30 15:57:38 -07:00
Aiden Bai 96747a6e93 perf(native): port React optimization rules 2026-08-30 15:23:05 -07:00
Aiden Bai 9a5c9efc5b perf(native): port unsafe JSON parse rule 2026-08-30 13:31:19 -07:00
Aiden Bai 7edf53bf38 perf(native): port list and server rules 2026-08-30 12:43:10 -07:00
Aiden Bai a8fcfd99a5 perf(native): port accessibility and state rules 2026-08-30 10:37:34 -07:00
Aiden Bai eed7939cad perf(native): port server and platform rules 2026-08-30 08:20:07 -07:00
Aiden Bai 323f7bb413 perf(native): port framework and accessibility rules 2026-08-30 07:52:02 -07:00
Aiden Bai 00384b6d3e perf(native): port synchronous XHR rule 2026-08-30 06:34:55 -07:00
Aiden Bai 6b1b260383 perf(native): port effect and interaction rules 2026-08-30 04:43:57 -07:00
Aiden Bai 115fe8223b perf(native): port animation and React Native rules 2026-08-30 03:27:40 -07:00
Aiden Bai 2b37125adf perf(native): port render and platform rules 2026-08-30 01:10:58 -07:00
Aiden Bai c4f1987c07 perf(native): port input correctness rules 2026-08-30 00:30:27 -07:00
Skosh ac87f7d7f6 fix(core): preserve settings from adopted lint configs (#1695)
* fix: adopt settings from existing .oxlintrc.json

- Read settings from adopted lint configs via readAdoptedLintConfigSettings
- Merge adopted settings (e.g. tailwindcss.entryPoint) with react-doctor settings
- Exclude react-doctor settings from adoption to avoid circular override
- Add comprehensive tests for settings adoption and merging
- Add user-tailwind-config fixture to verify Tailwind settings adoption

Fixes #1694

Co-authored-by: Skosh <skoshx@users.noreply.github.com>

* chore: add changeset for settings adoption fix

Co-authored-by: Skosh <skoshx@users.noreply.github.com>

* fix(core): preserve adopted lint settings

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Skosh <skoshx@users.noreply.github.com>
Co-authored-by: Aiden Bai <aiden@million.dev>
2026-08-29 22:57:22 -07:00
Skosh 72a4f4684c fix(ci): prevent pull request cache writes (#1688)
* fix(ci): harden workflows against cache poisoning and document unsigned tags

- Restrict TURBO_TOKEN/TURBO_TEAM to main-branch pushes only across
  ci.yml, code-quality.yml, and react-doctor.yml. First-party PR branches
  no longer have cache write access (preventing cache poisoning attacks).
  PRs run with a cold cache.

- Add SECURITY comments in action-version-bump.yml explaining that tags
  are unsigned and recommending SHA pinning for hardened CI.

- Update install-github-workflow.ts template to include security note
  about @v2 floating major tag and SHA pinning recommendation.

Closes #1685

Co-authored-by: Skosh <skoshx@users.noreply.github.com>

* fix(ci): make pull request cache read-only

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Skosh <skoshx@users.noreply.github.com>
Co-authored-by: Aiden Bai <aiden@million.dev>
2026-08-29 22:53:52 -07:00
Aiden Bai 71800cc5d7 test(cli): cover staged rule parity (#1719) 2026-08-29 22:53:36 -07:00
Skosh 21339857fa test(core): cover directory barrel reachability (#1703)
* test: add comprehensive tests for barrel file directory imports

- Add tests for tsconfig path alias resolution to index.ts
- Add tests for baseUrl resolution to index.ts
- Add tests for relative directory imports to index.ts
- Add Next.js-specific test with auto-detected entries
- Add direct resolver tests to verify directory resolution

Tests confirm that barrel files imported via directory paths (e.g., @/features/foo -> foo/index.ts) are correctly resolved and not flagged as unused.

Related to issue #1699

Co-authored-by: Skosh <skoshx@users.noreply.github.com>

* test: add moduleResolution bundler test for directory imports

Test confirms that directory imports work correctly with moduleResolution: bundler setting (used by Next.js).

Co-authored-by: Skosh <skoshx@users.noreply.github.com>

* test(core): cover directory barrel reachability

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Skosh <skoshx@users.noreply.github.com>
Co-authored-by: Aiden Bai <aiden@million.dev>
2026-08-29 22:34:11 -07:00
Skosh 0557145cf3 fix(cli): check root workflow before recommending CI (#1697)
* fix: check root directory for CI config instead of project count

Multi-project scans were unconditionally recommending GitHub Actions
even when  already existed at the
repository root. The logic checked individual project directories for
the workflow, which would fail in monorepos where the workflow lives
at the root.

Fixed by checking whether CI is configured at the root directory
(where the scan is running) instead of:
1. Unconditionally for multi-project scans (projectScans.length > 1)
2. Per-project directory checks that miss root-level workflows

Closes #1696

Co-authored-by: Skosh <skoshx@users.noreply.github.com>

* chore: add changeset for CI recommendation fix

Co-authored-by: Skosh <skoshx@users.noreply.github.com>

* chore: format code

Co-authored-by: Skosh <skoshx@users.noreply.github.com>

* fix(cli): measure CI recommendations

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Skosh <skoshx@users.noreply.github.com>
Co-authored-by: Aiden Bai <aiden@million.dev>
2026-08-29 22:21:32 -07:00
Skosh 17eeeb5367 fix(rules): recognize member hook state consumption (#1717)
* fix(rerender-state-only-in-handlers): recognize state consumed via member expression hook calls

State consumed by hook calls through member expressions (e.g. styles.useVariants({ state }))
was incorrectly flagged as unused. This commonly occurs with react-native-unistyles,
where state selects style variants via StyleSheet.useVariants().

The rule now checks both direct identifier calls (useX) and member expression calls
(obj.useX) when collecting custom hook arguments, following the existing pattern used
throughout the codebase.

Fixes #1716

Co-authored-by: Skosh <skoshx@users.noreply.github.com>

* chore: add changeset for member expression hook fix

Co-authored-by: Skosh <skoshx@users.noreply.github.com>

* test: add edge case for non-hook member expressions

Co-authored-by: Skosh <skoshx@users.noreply.github.com>

* fix(rules): preserve state setter bindings

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Skosh <skoshx@users.noreply.github.com>
Co-authored-by: Aiden Bai <aiden@million.dev>
2026-08-29 22:13:41 -07:00
Aiden Bai 78a27be6d6 perf(native): port duplicate JSX project rule 2026-08-29 22:04:31 -07:00
Aiden Bai c25eae4034 perf(native): port unused dependency project rules 2026-08-29 22:02:31 -07:00
Aiden Bai 35c6b03a1f perf(native): port circular dependency analysis 2026-08-29 22:02:31 -07:00
Aiden Bai bc8bbc57e2 perf(native): port unused export project rules 2026-08-29 22:02:31 -07:00
Aiden Bai 290bb75169 perf(native): port retained security scans 2026-08-29 22:02:00 -07:00
Skosh 990daafa62 fix(core): resolve local Expo Metro config wrappers (#1718)
* chore: add changeset for expo-metro-config fix

Co-authored-by: Skosh <skoshx@users.noreply.github.com>

* fix(core): resolve local Expo Metro config wrappers

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Skosh <skoshx@users.noreply.github.com>
Co-authored-by: Aiden Bai <aiden@million.dev>
2026-08-29 21:50:56 -07:00
Aiden Bai 013f7373f9 fix(action): clean npm output from JSON reports (#1714) 2026-08-29 21:16:01 -07:00
Aiden Bai a6365e37e1 perf(native): port React rules and project analysis 2026-08-29 19:19:17 -07:00
Aiden Bai 40b9d79703 fix(core): resolve typed Expo config plugins (#1713) 2026-08-29 19:04:42 -07:00
Aiden Bai 29b3276b82 fix(native): sync production rule allowlist 2026-08-29 17:40:15 -07:00
Aiden Bai 3cb69037d7 perf(native): port React correctness rules 2026-08-29 16:35:55 -07:00
Aiden Bai 70b75f1710 perf(native): port JavaScript performance rules 2026-08-29 14:43:47 -07:00
Aiden Bai d9b689197e perf(native): port effect cleanup rules 2026-08-29 13:06:36 -07:00
Aiden Bai 694d2178e0 perf(native): port event and render rules 2026-08-29 11:33:43 -07:00
Aiden Bai 5961ca8d1e perf(native): port state and accessibility rules 2026-08-29 09:34:31 -07:00
Aiden Bai 259b10176f perf(native): port MobX correctness rules 2026-08-29 08:12:17 -07:00
Aiden Bai babc3ecd69 perf(native): port shader interface rules 2026-08-29 07:43:42 -07:00