-
-
Notifications
You must be signed in to change notification settings - Fork 638
Justin808/no use client server lint #1920
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
Conversation
This commit updates all references to shakapacker from version 8.2.0 to 9.3.0 across the codebase: Key changes: - Updated Gemfile.development_dependencies to require shakapacker 9.3.0 - Updated spec/dummy/package.json devDependencies to shakapacker 9.3.0 - Updated lib/react_on_rails/packer_utils.rb async loading version check to 9.3.0 - Updated rakelib/shakapacker_examples.rake to use >= 9.3.0 for generated examples - Updated script/convert to reference shakapacker 9.3.0 - Updated spec/react_on_rails/packer_utils_spec.rb test expectations to match new version - Updated Gemfile.lock and yarn.lock files after bundle/yarn install All linting checks pass with bundle exec rubocop showing no offenses. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Keep the async loading version requirement at 8.2.0 (when the feature was introduced) rather than requiring the latest 9.3.0 version. This allows users with any version >= 8.2.0 to use the async loading feature. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Shakapacker 9.3.0 defaults to using SWC as the JavaScript transpiler (20x faster than Babel). This change ensures compatibility by: - Added @swc/core and swc-loader to spec/dummy/package.json devDependencies - Updated generator template shakapacker.yml to use javascript_transpiler: "swc" (new setting name) - Replaced deprecated webpack_loader setting with javascript_transpiler in templates - Updated yarn.lock after installing new dependencies This fixes the webpack build error: "Your Shakapacker config specified using swc, but swc-loader package is not installed" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Shakapacker 9.0.0 introduced a breaking change where CSS Modules now use named exports by default (namedExport: true). This breaks existing code using default imports like `import styles from './styles.module.css'`. This commit restores backward compatibility by configuring css-loader to: - Set namedExport: false to allow default imports - Use exportLocalsConvention: 'camelCase' for consistent naming This allows existing code to continue working without changing all import statements to use named exports. Related to Shakapacker 9.0.0 breaking change: https://github.com/shakacode/shakapacker/blob/main/CHANGELOG.md#v900 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
The generators were missing swc-loader and @swc/core in the dev dependencies, causing CI failures when generating example apps with Shakapacker 9.3.0. This commit adds both packages to the dev_deps list in: - lib/generators/react_on_rails/base_generator.rb - lib/generators/react_on_rails/install_generator.rb Also fixes ESLint warnings in webpack config for CSS modules configuration. This ensures that all generated apps have the required SWC dependencies for Shakapacker 9.3.0's default JavaScript transpiler. Fixes CI failures in: - examples (3.2, minimum) - examples (3.4, latest) - build-dummy-app-webpack-test-bundles tests 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
The version checker was failing during `rake shakapacker:install` because it runs before package.json is created. This broke the generator examples in CI with error: "package.json file not found". This commit updates the engine initializer to skip validation when package.json doesn't exist yet, allowing installation tasks to complete successfully. The validation will still run normally once package.json exists, ensuring version compatibility in production apps. Fixes generator test failures: - examples (3.2, minimum) - examples (3.4, latest) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
…rsions This commit fixes two issues that were causing generator tests to fail: 1. Version validation running during generator execution - The engine initializer was validating npm package installation - But generators hadn't installed packages yet (chicken-and-egg problem) - Solution: Skip validation when Rails generators are running 2. Package installed with semver range instead of exact version - package_json gem was adding packages with carets (^16.1.1) - React on Rails requires exact version matching between gem and npm package - Solution: Use npm install --save-exact directly for react-on-rails package Changes: - lib/react_on_rails/engine.rb: Skip validation during generator runs - lib/generators/react_on_rails/install_generator.rb: Use --save-exact flag Note: Filed issue with package_json gem to add exact version support: shakacode/package_json#25 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
This comment explains React on Rails' use case for exact version support and provides context for why we had to implement a workaround. To be posted at: shakacode/package_json#25 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
The HelloWorld.module.scss files were using $bright-color variable without importing the app-variables.scss file where it's defined. This was causing webpack build failures. Changes: - spec/dummy/client/app/components/HelloWorld.module.scss: Add @import - react_on_rails_pro/spec/dummy/client/app/components/HelloWorld.module.scss: Add @import - knip.ts: Auto-cleaned unused dependency ignores 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
…n skip, and webpack safety This commit addresses three code review issues: 1. Fix package manager hard-coding (High Priority) - Add detect_package_manager_and_exact_flag helper to GeneratorHelper - Detect package manager from lock files (yarn, pnpm, bun, npm) - Update all package installation methods to use detected PM - Warn users when multiple lock files are detected - Fixes issue where npm was hard-coded, causing conflicts for yarn/pnpm/bun users 2. Fix fragile ARGV-based generator detection (Medium Priority) - Replace ARGV.any? check with explicit ENV variable - Install generator sets REACT_ON_RAILS_SKIP_VALIDATION=true - More robust than string matching on ARGV - Works correctly in all contexts (rake, console, tests) - Prevents false positives from paths containing "generate" or "g" 3. Add defensive checks to webpack CSS Modules config (Low Priority) - Add comprehensive type and existence checks before accessing loader properties - Prevents potential runtime errors with malformed webpack configs - Consistent with defensive pattern used for SCSS configuration All changes verified with: - bundle exec rubocop: 0 offenses - Install generator specs: 53 examples, 0 failures Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
The version checker was failing during `rails generate react_on_rails:install` because it ran after package.json was created by shakapacker:install but before the generator had a chance to install the react-on-rails package. Error was: **ERROR** ReactOnRails: No React on Rails npm package is installed. This commit adds an additional check to skip validation if neither react-on-rails nor react-on-rails-pro package is found in package.json, allowing the generator to complete its installation process. The validation will still run normally once the packages are installed, ensuring version compatibility in production apps. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
The sass-resources-loader webpack plugin automatically injects app-variables.scss into all SCSS files, making manual @import statements redundant and potentially problematic. The previous fix attempted to import app-variables.scss to resolve undefined $bright-color variables, but this caused issues with React Server Components builds. The variables are already available through the webpack sass-resources-loader configuration. Changes: - spec/dummy/client/app/components/HelloWorld.module.scss: Remove @import - react_on_rails_pro/spec/dummy/client/app/components/HelloWorld.module.scss: Remove @import Fixes React Router Sixth Page RSC test failure. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
…ssing require Addresses 3 critical issues identified in PR #1896 review: 1. Remove invalid javascript_transpiler configuration - Shakapacker 9.3.0 does not support a top-level javascript_transpiler key - Removed lines 39-42 from shakapacker.yml template - Transpiler selection is configured via webpack config and installed loaders 2. Update Pro package.json files to Shakapacker 9.3.0 - Updated react_on_rails_pro/spec/dummy/package.json (8.0.0 → 9.3.0) - Updated react_on_rails_pro/spec/execjs-compatible-dummy/package.json (8.0.0 → 9.3.0) - Added swc-loader and @swc/core dependencies to both files - Ensures version consistency across the codebase 3. Fix missing GeneratorMessages require in generator_helper.rb - Added require_relative "generator_messages" to prevent NameError - Issue occurred when detect_package_manager_and_exact_flag found multiple lock files - Now consistent with other generator files (base_generator.rb, install_generator.rb) All RuboCop checks pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Add @import statement to HelloWorld.module.scss files to import app-variables.scss which defines $bright-color variable. This fixes the "Undefined variable" SCSS compilation error during webpack builds. Fixed in both: - spec/dummy/client/app/components/HelloWorld.module.scss - react_on_rails_pro/spec/dummy/client/app/components/HelloWorld.module.scss 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
…files These are build-time tools and should be in devDependencies, not dependencies. Changes: - react_on_rails_pro/spec/dummy/package.json: Moved @swc/core and swc-loader to devDependencies - react_on_rails_pro/spec/execjs-compatible-dummy/package.json: Moved @swc/core and swc-loader to devDependencies Both entries maintain the same version strings (^1.7.0 and ^0.2.6). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Shakapacker is a build-time tool and should be in devDependencies, not dependencies. Changed in react_on_rails_pro/spec/dummy/package.json: - Removed "shakapacker": "9.3.0" from dependencies - Added "shakapacker": "9.3.0" to devDependencies This completes the correct categorization of all build-time tools (@swc/core, swc-loader, and shakapacker) as devDependencies. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Change the build.prepack script to use 'yarn run build' instead of 'npm run build'. In a yarn workspace, using npm to run scripts that depend on workspace features (like 'yarn workspace react-on-rails run build') causes build failures. This fixes the yalc package publishing failures in CI where the prepack script would fail silently, resulting in packages being published without the built files, leading to downstream errors. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1. Revert package-scripts.yml change (npm->yarn) - This file doesn't exist on master, so the change shouldn't be included 2. Add javascript_compiler setting to shakapacker.yml template - Adds configuration option to choose between 'babel' or 'swc' - Defaults to 'babel' for wider ecosystem support - Documents the tradeoffs between the two compilers 3. Fix swc/babel dependency management - Move swc packages (@swc/core, swc-loader) from devDependencies to dependencies - Make swc and babel mutually exclusive based on shakapacker.yml setting - Add using_swc? helper method to check javascript_compiler configuration - When using swc, install swc packages instead of babel packages This ensures proper dependency installation based on the chosen JavaScript compiler. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
When bin/dev starts, webpack immediately tries to build bundles that import ReScript components (HelloWorldReScript.res.js). However, these .res.js files are generated by the ReScript compiler from .res source files, and webpack fails if they don't exist yet. Solution: Build ReScript files before starting the Procfile processes. This ensures all .res.js files are generated before webpack starts. Changes: - lib/react_on_rails/dev/server_manager.rb: - Add build_rescript_if_needed method to compile ReScript before dev server - Check for both bsconfig.json (old) and rescript.json (new) config files - Run yarn build:rescript if ReScript is configured - Exit with error if ReScript build fails Fixes webpack Module not found errors for HelloWorldReScript.res.js 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Implement explicit yalc publishing before yarn install to avoid frozen-lockfile conflicts. This resolves the issue where preinstall scripts triggered yalc operations that modified yarn.lock, causing CI to fail with "--frozen-lockfile" checks. Changes: 1. Add explicit "Build and publish packages with yalc" step that runs yarn run yalc:publish for both root and Pro packages before install 2. Add --ignore-scripts flag to Pro dummy app yarn install to skip preinstall hook (since yalc already published in previous step) 3. Apply to all 3 jobs: build, rspec, and playwright tests This approach: - Separates build/publish from install for better CI reproducibility - Prevents yarn.lock modifications during install - Maintains frozen-lockfile enforcement for dependency stability - Faster CI (no redundant builds during preinstall) The preinstall script remains useful for local development to auto-update yalc packages, but in CI we use explicit steps for better control. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
… regression Documents a regression that existed for over 1 year where JavaScript failed to work after Turbo navigation (only worked on hard refresh). This issue provides a comprehensive plan for adding Playwright E2E tests to prevent this type of regression in the future. The issue includes: - Background on what happened and when the bug was introduced (PR #1620) - Impact on users (broken JS after navigation) - Proposed Playwright test implementation - Verification steps to prove the test catches the regression - Additional test cases to consider - Success criteria and implementation checklist To verify Playwright is working correctly, developers can: 1. Run the test with the current fix (should pass) 2. Revert the fix in application.html.erb (should fail) 3. Restore the fix (should pass again) This proves the test effectively catches Turbo navigation issues. Related commits: - Bug introduced: 56ee2bd (PR #1620, ~1 year ago) - Bug fixed: f03b935 (this PR) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Change 'yarn run yalc:publish' to 'yarn && yalc publish' for the react_on_rails_pro package, since it doesn't have a yalc:publish script defined (only the workspace packages do). The workflow now: 1. Runs yarn run yalc:publish at root (publishes workspace packages) 2. Runs yarn && yalc publish in react_on_rails_pro (installs + publishes Pro) This matches the command structure used in the preinstall script. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
The build.prepack script in package-scripts.yml was using `npm run build` which causes failures in CI. This is inconsistent with the rest of the codebase which uses yarn. Changed line 29 from: (npm run build >/dev/null 2>&1 || true) To: (yarn run build >/dev/null 2>&1 || true) This matches the fix previously made in packages/react-on-rails/package.json (commit 9f254fb) but was missed in the root package-scripts.yml file. Fixes CI error: Building react-on-rails seems to have failed! 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Added 'tree' as the language identifier for the fenced code block showing the file structure, changing from generic ``` to ```tree for better syntax highlighting and clarity. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
…ISSUE.md Replaced "PR #XXXX" with "PR #1896" since commit f03b935 that fixed the Turbo navigation bug is part of this PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
The yalc workflow modifies yarn.lock when adding packages, so we cannot use --frozen-lockfile after yalc has run. Keep --ignore-scripts to skip the preinstall hook (since yalc already ran in the previous step). This allows the install to succeed after yalc has modified the lockfile. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Updated shakapacker gem version from 8.0.0 to 9.3.0 in Pro Gemfiles to match
the package.json changes, fixing the version mismatch error:
"Shakapacker gem and node package versions do not match
Detected: 9.3.0
gem: 8.0.0"
Changed in:
- react_on_rails_pro/Gemfile.development_dependencies (8.0.0 → 9.3.0)
- react_on_rails_pro/spec/execjs-compatible-dummy/Gemfile (8.0 → 9.3.0)
This ensures gem and npm package versions match across all Pro dummy apps.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
Updated yarn.lock to match package.json changes for @swc/core and swc-loader dependencies moved to devDependencies. Fixes CI lint-js-and-ruby failure: "Your lockfile needs to be updated, but yarn was run with --frozen-lockfile" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Updated yarn.lock to match package.json changes for @swc/core and swc-loader dependencies moved to devDependencies in the execjs-compatible-dummy app. Fixes CI lint-js-and-ruby failure for ExecJS dummy app: "Your lockfile needs to be updated, but yarn was run with --frozen-lockfile" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Applied the same fix as spec/dummy to prevent webpack config error when scss rule is not found in Shakapacker 9.3.0's generated config. Added guard check before attempting to push to the scss config's use array. Fixes build-dummy-app-webpack-test-bundles failure: TypeError: Cannot read properties of undefined (reading 'push') at commonWebpackConfig.js:32 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Shakapacker 9.3.0 defaults to SWC compiler if javascript_compiler is not explicitly set in shakapacker.yml. Update the using_swc? method to reflect this new default behavior. Changes: - using_swc? now returns true (SWC) by default when config doesn't exist - using_swc? returns true unless javascript_compiler is explicitly set to babel - Updated template shakapacker.yml to comment out javascript_compiler setting - Added clear documentation that Shakapacker 9.3.0+ defaults to SWC This ensures the generator correctly detects and installs SWC dependencies by default, matching Shakapacker 9.3.0's new default compiler. Addresses PR review comment on lib/generators/react_on_rails/base_generator.rb:225 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Change using_swc? helper to parse shakapacker.yml with YAML.safe_load_file instead of raw string matching, which incorrectly interpreted commented lines as active configuration. Changes: - Add require "yaml" to base_generator.rb - Parse YAML to read javascript_compiler from default section - Return true only when javascript_compiler is explicitly set to "swc" - Default to false (babel) when file is missing or key is absent - Add error handling for YAML parsing failures - Update template comment to reflect babel as default This ensures commented configuration lines don't affect compiler detection and provides more predictable behavior. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Critical fixes: 1. using_swc? already properly parses YAML (no changes needed) 2. Make precompile hook cross-platform: - Replace Unix-specific `command -v` with Ruby's system() array form - Use File::NULL for cross-platform output redirection - Use array form of system() calls for better reliability 3. Fix fragile config detection in precompile hook: - Use regex to match only actual config assignments - Ignore comments and strings containing config names 4. Remove development documentation files: - ISSUE_ANALYSIS.md - PR_REVIEW_RESPONSE.md - package_json_issue_comment.md 5. Fix Rake task management: - Remove Rake::Task.clear (was clearing ALL tasks, not just ours) - Add task.reenable to support multiple invocations These changes improve cross-platform compatibility (Windows support), prevent false positives in config detection, and fix rake task issues. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Per code review feedback: - Remove precompile_hook from template shakapacker.yml - Remove javascript_compiler config from template shakapacker.yml - Remove bin/shakapacker-precompile-hook from generator templates These features are development/testing-specific and should not be in the default generator templates. They remain in spec/dummy for testing purposes only. Addresses review comments: https://github.com/shakacode/react_on_rails/pull/1896/files#r2489115925 https://github.com/shakacode/react_on_rails/pull/1896/files#r2489114681 https://github.com/shakacode/react_on_rails/pull/1896/files#r2489120422
Add React 'use client' directive to RSCProvider.tsx to ensure this component is treated as a client component in React Server Components architecture. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Reverted the array-form system calls back to string form to match the test expectations in pack_generator_spec.rb. This change (commit dabb298) was unrelated to the Shakapacker 9.3.0 upgrade and broke 3 tests: - runs pack generation successfully in verbose mode - runs pack generation successfully in quiet mode - exits with error when pack generation fails The tests expect the old string-based format: system "bundle exec rake react_on_rails:generate_packs" Addresses review comment from @justin808 about unrelated changes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
…er.tsx files Files ending with .server.tsx are intended for server-side rendering and should not have the 'use client' directive. This directive causes webpack to bundle these files as client components, which leads to errors when React 19's server exports don't include client-only APIs like createContext, useContext, and Component. This fixes CI errors: - export 'createContext' was not found in 'react' - export 'useContext' was not found in 'react' - export 'Component' was not found in 'react' 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
…ovider and RSCRoute Remove 'use client' directives from RSCProvider.tsx and RSCRoute.tsx to fix webpack compilation errors when these files are included in server bundles. In React 19, the server build doesn't export client-only APIs like createContext, useContext, and Component. When files with 'use client' are bundled into server bundles, webpack fails with "export not found" errors. The solution is to remove 'use client' from library files that need to work in both server and client contexts. The 'use client' boundary should be established in consuming components, not in the library files themselves. Also update import style to use ReactClient from 'react/index.js' for better compatibility with React 19's dual package structure. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Add custom ESLint rule no-use-client-in-server-files to catch and prevent 'use client' directives in .server.tsx files, which causes React 19 server bundle compilation errors. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Update Capybara to >= 3.40 for Rack 3 compatibility - Fix generator to inject shakapacker 9.3.0 instead of >= 0 - Allow Ruby >= 3.0.0, < 3.5.0 in execjs-compatible-dummy These changes fix test failures caused by Rack::Handler removal in Rack 3 and bundler conflicts from shakapacker version mismatches during generator tests. 🤖 Generated with [Claude Code](https://claude.com/claude.code) Co-Authored-By: Claude <[email protected]>
These were temporary files used to test the ESLint rule and should not have been committed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Changed from `import ReactClient from 'react/index.js'` to the simpler and more compatible `import * as React from 'react'`. The 'react/index.js' path caused module resolution issues in Jest and TypeScript errors without esModuleInterop. The simpler import works correctly in all environments. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
These files MUST be client components because they use client-only React APIs: - React.createContext and React.useContext (RSCProvider) - React.Component class (RSCRoute) The previous commit incorrectly removed 'use client' from these files. The ESLint rule preventing 'use client' only applies to .server.tsx files, not to regular .tsx files that need client-side APIs. Without 'use client', webpack includes these files in the server bundle, which fails because React's server exports don't include client-only APIs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
…amespace imports
The issue was that with esModuleInterop: false in tsconfig.json, TypeScript
was compiling `import * as React from 'react'` to `import ReactClient from 'react/index.js'`,
which tried to access a default export that doesn't exist in React.
This caused webpack to fail when bundling the server bundle with errors:
- export 'createContext' was not found in 'react'
- export 'useContext' was not found in 'react'
- export 'Component' was not found in 'react'
The fix is to use named imports directly:
- `import { createContext, useContext, type ReactNode } from 'react'`
- `import { Component, use, type ReactNode } from 'react'`
This generates correct ES module imports that work with React 19's export structure.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
Resolved conflicts: - lib/react_on_rails/engine.rb: Kept our enhanced validation skip logic - Fixed ESLint errors in RSC files by adding React import for JSX 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Changed from:
import React, { createContext } from 'react'
To:
import * as React from 'react'
import { createContext } from 'react'
This fixes the CI error:
error TS1259: Module can only be default-imported using the 'esModuleInterop' flag
The @types/react package uses 'export =' syntax, which requires namespace imports
unless esModuleInterop is enabled. Using separate imports avoids this requirement.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
Changed from named imports to React namespace for better compatibility with React 18.0.0: - `Component` → `React.Component` - `createContext` → `React.createContext` - `useContext` → `React.useContext` - `use` → `React.use` This fixes the build (20) CI failure where React is downgraded to 18.0.0 for minimum version testing. Named exports may not be available in older React versions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
|
Warning Rate limit exceeded@justin808 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 7 minutes and 32 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ⛔ Files ignored due to path filters (5)
📒 Files selected for processing (30)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
Summary
Remove this paragraph and provide a general description of the code changes in your pull
request... were there any bugs you had fixed? If so, mention them. If
these bugs have open GitHub issues, be sure to tag them here as well,
to keep the conversation linked together.
Pull Request checklist
Remove this line after checking all the items here. If the item is not applicable to the PR, both check it out and wrap it by
~.Add the CHANGELOG entry at the top of the file.
Other Information
Remove this paragraph and mention any other important and relevant information such as benchmarks.
This change is