react-webpack-rails-tutorial icon indicating copy to clipboard operation
react-webpack-rails-tutorial copied to clipboard

Fix linting and formatting inconsistencies across codebase

Open justin808 opened this issue 3 months ago • 0 comments

Background

During the Babel to SWC migration (#666), we discovered several files with formatting inconsistencies that don't match the project's Prettier and ESLint configurations.

Files with Formatting Issues

The following files have formatting that doesn't match current linter rules:

  • client/app/packs/server-bundle.js - Uses double quotes instead of single quotes
  • config/webpack/clientWebpackConfig.js - Missing proper file ending
  • config/webpack/commonWebpackConfig.js - Inconsistent line wrapping and trailing commas
  • config/webpack/development.js - Extra blank lines
  • client/app/bundles/comments/rescript/RescriptShow/ror_components/RescriptShow.jsx - ReScript-generated file with double quotes

Proposed Solution

Create a focused PR to:

  1. Run yarn lint --fix across the entire codebase
  2. Fix any linting errors that can't be auto-fixed
  3. Ensure all files conform to .prettierrc.yml and .eslintrc rules
  4. Consider updating .prettierignore to exclude ReScript-generated files if needed

Why Separate PR?

  • Keeps PRs focused on specific changes
  • Makes code review easier
  • Separates functional changes from formatting changes
  • Establishes a clean baseline for future linting

Acceptance Criteria

  • [ ] All files pass yarn lint without warnings
  • [ ] All files pass bundle exec rubocop without offenses
  • [ ] Formatting is consistent across the codebase
  • [ ] CI linting checks pass

justin808 avatar Oct 03 '25 07:10 justin808