Skip to content

chore: use oxlint instead of eslint#503

Merged
Brentlok merged 2 commits intomainfrom
update-deps
Apr 21, 2026
Merged

chore: use oxlint instead of eslint#503
Brentlok merged 2 commits intomainfrom
update-deps

Conversation

@Brentlok
Copy link
Copy Markdown
Contributor

@Brentlok Brentlok commented Apr 21, 2026

Summary by CodeRabbit

  • Chores
    • Bumped developer tooling (formatter and build tooling) to newer releases for improved formatting and build reliability.
    • Migrated linting infrastructure to a modern toolchain and updated lint scripts accordingly.
    • Cleaned up inline lint suppression comments and updated lint configs to align with current standards.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3f70fce0-bb6c-41ac-b26d-644800265c0d

📥 Commits

Reviewing files that changed from the base of the PR and between 75432fa and 956ac33.

📒 Files selected for processing (2)
  • packages/uniwind/src/core/web/cssListener.ts
  • packages/uniwind/src/metro/metro-css-patches.ts
✅ Files skipped from review due to trivial changes (1)
  • packages/uniwind/src/metro/metro-css-patches.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/uniwind/src/core/web/cssListener.ts

📝 Walkthrough

Walkthrough

This PR migrates linting from ESLint to oxlint: dev dependency bumps, ESLint config removal, new .oxlintrc.json added, lint scripts updated, and numerous inline ESLint suppression comments adjusted or removed; no functional code changes.

Changes

Cohort / File(s) Summary
Root tooling
dprint.json, package.json
Bumped dprint and turbo; removed eslint and eslint-config-codemask; added oxlint and oxlint-tsgolint.
Lint configs & scripts
packages/uniwind/eslint.config.ts, packages/uniwind/.oxlintrc.json, packages/uniwind/package.json
Deleted old ESLint config, added .oxlintrc.json (typeAware + custom rules/ignorePatterns), and switched package lint scripts to oxlint.
Lint directive removals / replacements
packages/uniwind/src/core/config/config.common.ts, packages/uniwind/src/core/logger.ts, packages/uniwind/src/core/native/parsers/transforms.ts, packages/uniwind/src/core/native/store.ts, packages/uniwind/src/core/web/cssListener.ts, packages/uniwind/src/hoc/withUniwind.native.tsx, packages/uniwind/src/metro/addMetaToStylesTemplate.ts, packages/uniwind/src/metro/logger.ts, packages/uniwind/src/metro/metro-css-patches.ts, packages/uniwind/src/metro/processor/css.ts, packages/uniwind/src/metro/processor/functions.ts, packages/uniwind/src/metro/utils/common.ts, packages/uniwind/src/metro/utils/serialize.ts, packages/uniwind/src/types.ts
Removed many ESLint-disable comments, replaced some with oxlint-disable-next-line where applicable, and renamed unused parameters (prefixed with _) to avoid inline suppressions. No runtime or API changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐇 I hopped through comments, quiet and spry,

Swapped rules and underscored what passed by,
No runtime stirred, just linters anew,
A neat little hop — cleaner code, whoo-hoo! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: replacing ESLint with oxlint as the linting tool across the project, including dependency updates, configuration file migration, and rule comment updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch update-deps

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (3)
packages/uniwind/src/core/web/cssListener.ts (1)

53-58: Returning a no-op from inside forEach is dead code.

Array.prototype.forEach ignores callback return values, so return () => {} on line 57 just exits the current iteration; the empty function is never used. A bare return is equivalent and clearer.

♻️ Proposed tweak
             if (!mediaQuery) {
-                return () => {}
+                return
             }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/uniwind/src/core/web/cssListener.ts` around lines 53 - 58, The
forEach callback in cssListener.ts is returning a no-op function which is never
used because Array.prototype.forEach ignores return values; update the loop in
the method that calls classNames.split(' ') so that when
classNameMediaQueryListeners.get(className) is falsy you use a bare return to
skip the iteration (or switch to a for...of and use continue/collect listeners
as needed), and ensure any intended listener functions are actually
collected/returned by referencing classNameMediaQueryListeners and the
surrounding method name so the empty function is not erroneously produced.
packages/uniwind/.oxlintrc.json (2)

17-28: ignorePatterns doesn't cover **/*.d.ts broadly.

The individual *.d.ts entries (types.d.ts, no-types.d.ts, src/metro/index.d.ts, src/vite/index.d.ts) suggest intent to skip declaration files. A single **/*.d.ts pattern would cover current + future declaration files and is easier to maintain. Optional.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/uniwind/.oxlintrc.json` around lines 17 - 28, The ignorePatterns
currently lists specific declaration files (types.d.ts, no-types.d.ts,
src/metro/index.d.ts, src/vite/index.d.ts) which is brittle; update the
"ignorePatterns" array in .oxlintrc.json to replace those individual entries
with a single glob pattern "**/*.d.ts" so all current and future TypeScript
declaration files are ignored consistently while keeping other entries (dist,
specs, jest.config.js, tests, babel.config.cjs) unchanged.

15-15: Confirm intent of disabling typescript/no-implied-eval globally.

Disabling no-implied-eval repo-wide silences a real security signal (setTimeout("code"), new Function(...) etc.). If it's being turned off to suppress a specific false positive, consider scoping it with inline directives instead.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/uniwind/.oxlintrc.json` at line 15, You've globally disabled the
typescript/no-implied-eval rule which mutes an important security check; either
confirm this intent or revert the global rule and instead apply scoped
exceptions where necessary by leaving the rule enabled and adding per-file or
per-line disables for the specific false positives (use inline
eslint-disable-next-line or eslint-disable comments targeting
typescript/no-implied-eval) or change the config to "warn" rather than "off";
update the .oxlintrc.json entry for typescript/no-implied-eval accordingly and
remove the global "off" if you choose scoped suppressions.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/uniwind/src/core/web/cssListener.ts`:
- Line 131: Replace the malformed oxlint disable directive string in
packages/uniwind/src/core/web/cssListener.ts: locate the comment "//
oxlint-disable-next-line typescript-eslint(strict-boolean-expressions)" and
change it to use the rule name with a slash, i.e. "// oxlint-disable-next-line
typescript/strict-boolean-expressions" so the suppression matches the
.oxlintrc.json rule key and takes effect.

In `@packages/uniwind/src/metro/metro-css-patches.ts`:
- Line 29: Update the oxlint disable directives to use the plugin/rule
forward-slash format: replace the directive token
"typescript-eslint(unbound-method)" in the oxlint-disable-next-line comment in
metro-css-patches.ts with "typescript/unbound-method", and likewise replace
"typescript-eslint(strict-boolean-expressions)" in the oxlint-disable-next-line
comment in cssListener.ts (around the existing disable at the same site) with
"typescript/strict-boolean-expressions" so the linter recognizes and suppresses
those rules correctly.

---

Nitpick comments:
In `@packages/uniwind/.oxlintrc.json`:
- Around line 17-28: The ignorePatterns currently lists specific declaration
files (types.d.ts, no-types.d.ts, src/metro/index.d.ts, src/vite/index.d.ts)
which is brittle; update the "ignorePatterns" array in .oxlintrc.json to replace
those individual entries with a single glob pattern "**/*.d.ts" so all current
and future TypeScript declaration files are ignored consistently while keeping
other entries (dist, specs, jest.config.js, tests, babel.config.cjs) unchanged.
- Line 15: You've globally disabled the typescript/no-implied-eval rule which
mutes an important security check; either confirm this intent or revert the
global rule and instead apply scoped exceptions where necessary by leaving the
rule enabled and adding per-file or per-line disables for the specific false
positives (use inline eslint-disable-next-line or eslint-disable comments
targeting typescript/no-implied-eval) or change the config to "warn" rather than
"off"; update the .oxlintrc.json entry for typescript/no-implied-eval
accordingly and remove the global "off" if you choose scoped suppressions.

In `@packages/uniwind/src/core/web/cssListener.ts`:
- Around line 53-58: The forEach callback in cssListener.ts is returning a no-op
function which is never used because Array.prototype.forEach ignores return
values; update the loop in the method that calls classNames.split(' ') so that
when classNameMediaQueryListeners.get(className) is falsy you use a bare return
to skip the iteration (or switch to a for...of and use continue/collect
listeners as needed), and ensure any intended listener functions are actually
collected/returned by referencing classNameMediaQueryListeners and the
surrounding method name so the empty function is not erroneously produced.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 695d098a-070c-4430-9878-a2c29f2a908f

📥 Commits

Reviewing files that changed from the base of the PR and between 1f90dd0 and 75432fa.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (19)
  • dprint.json
  • package.json
  • packages/uniwind/.oxlintrc.json
  • packages/uniwind/eslint.config.ts
  • packages/uniwind/package.json
  • packages/uniwind/src/core/config/config.common.ts
  • packages/uniwind/src/core/logger.ts
  • packages/uniwind/src/core/native/parsers/transforms.ts
  • packages/uniwind/src/core/native/store.ts
  • packages/uniwind/src/core/web/cssListener.ts
  • packages/uniwind/src/hoc/withUniwind.native.tsx
  • packages/uniwind/src/metro/addMetaToStylesTemplate.ts
  • packages/uniwind/src/metro/logger.ts
  • packages/uniwind/src/metro/metro-css-patches.ts
  • packages/uniwind/src/metro/processor/css.ts
  • packages/uniwind/src/metro/processor/functions.ts
  • packages/uniwind/src/metro/utils/common.ts
  • packages/uniwind/src/metro/utils/serialize.ts
  • packages/uniwind/src/types.ts
💤 Files with no reviewable changes (11)
  • packages/uniwind/src/core/native/store.ts
  • packages/uniwind/src/types.ts
  • packages/uniwind/src/metro/logger.ts
  • packages/uniwind/src/core/logger.ts
  • packages/uniwind/src/metro/processor/css.ts
  • packages/uniwind/src/hoc/withUniwind.native.tsx
  • packages/uniwind/src/metro/utils/serialize.ts
  • packages/uniwind/src/metro/utils/common.ts
  • packages/uniwind/src/metro/processor/functions.ts
  • packages/uniwind/eslint.config.ts
  • packages/uniwind/src/core/native/parsers/transforms.ts

Comment thread packages/uniwind/src/core/web/cssListener.ts Outdated
Comment thread packages/uniwind/src/metro/metro-css-patches.ts Outdated
@Brentlok Brentlok merged commit bf79ad8 into main Apr 21, 2026
2 checks passed
@Brentlok Brentlok deleted the update-deps branch April 21, 2026 10:08
@github-actions
Copy link
Copy Markdown
Contributor

🚀 This pull request is included in v1.6.3. See Release v1.6.3 for release notes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant