Fix linting and formatting inconsistencies across codebase

Open
#670 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Tech stack
eslint, javascript, webpack

Research direction

Start with the listed files, .prettierrc.yml, .eslintrc, and .prettierignore, then run yarn lint --fix to identify remaining issues. Check the ReScript-generated JSX separately and run bundle exec rubocop. Done means the JavaScript lint, RuboCop, and CI checks pass without warnings or offenses.

Written by the indexing model from the issue text.

Description

bug

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
Dominant language
JavaScript
Stars
1.7k
Forks
370
Avg merge
2d 15h
Merged PRs (30d)
6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from shakacode/react-webpack-rails-tutorial

All issues in shakacode/react-webpack-rails-tutorial

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.