Skip to content

chore: add ESLint configuration and integrate linting scripts#7

Merged
maximedogawa merged 1 commit into
mainfrom
5-feature-add-lint-formatting-precommit
Apr 9, 2026
Merged

chore: add ESLint configuration and integrate linting scripts#7
maximedogawa merged 1 commit into
mainfrom
5-feature-add-lint-formatting-precommit

Conversation

@maximedogawa
Copy link
Copy Markdown
Collaborator

@maximedogawa maximedogawa commented Apr 9, 2026

  • Created a new ESLint configuration file (eslint.config.ts) with recommended rules for TypeScript and React.
  • Updated package.json to include linting and formatting scripts, and added lint-staged configuration for pre-commit hooks.
  • Added necessary ESLint and Prettier dependencies to devDependencies.

chore: add Rust formatting configurations

  • Added rustfmt.toml and .clippy.toml configuration files for Rust code formatting and linting in the src-tauri directory.

fix: minor code style adjustments and cleanups

  • Made minor adjustments to code formatting and style in various components and files for improved readability and consistency.
  • Adjusted string formatting and spacing in several components, including PhoneMockup, SetupWizard, SpecMockup, and others.

refactor: improve type handling and error messages

  • Refactored type handling in loopback.ts to ensure proper type inference.
  • Improved error messages and logging in telegram_service.rs for better debugging.

style: update CSS for better readability

  • Simplified CSS variable definitions in index.css for better readability.
  • Adjusted keyframe animations for consistency.

feat: enhance user interface text and descriptions

  • Updated text in various components to improve clarity and user experience, including LandingPage, DashboardPage, and SetupPage.

Summary by CodeRabbit

  • Chores

    • Established code quality and formatting infrastructure with ESLint, Prettier, and Husky.
    • Added pre-commit hooks to automatically validate code style, lint, and type-check before commits.
    • Configured Rust formatting standards via rustfmt and Clippy linting for the Tauri module.
    • Added npm scripts (lint, format) for manual code quality checks.
  • Style

    • Reformatted existing codebase to enforce consistent code style across TypeScript/JavaScript and Rust.

- Created a new ESLint configuration file (`eslint.config.ts`) with recommended rules for TypeScript and React.
- Updated `package.json` to include linting and formatting scripts, and added `lint-staged` configuration for pre-commit hooks.
- Added necessary ESLint and Prettier dependencies to `devDependencies`.

chore: add Rust formatting configurations

- Added `rustfmt.toml` and `.clippy.toml` configuration files for Rust code formatting and linting in the `src-tauri` directory.

fix: minor code style adjustments and cleanups

- Made minor adjustments to code formatting and style in various components and files for improved readability and consistency.
- Adjusted string formatting and spacing in several components, including `PhoneMockup`, `SetupWizard`, `SpecMockup`, and others.

refactor: improve type handling and error messages

- Refactored type handling in `loopback.ts` to ensure proper type inference.
- Improved error messages and logging in `telegram_service.rs` for better debugging.

style: update CSS for better readability

- Simplified CSS variable definitions in `index.css` for better readability.
- Adjusted keyframe animations for consistency.

feat: enhance user interface text and descriptions

- Updated text in various components to improve clarity and user experience, including `LandingPage`, `DashboardPage`, and `SetupPage`.
@maximedogawa maximedogawa self-assigned this Apr 9, 2026
@maximedogawa maximedogawa linked an issue Apr 9, 2026 that may be closed by this pull request
4 tasks
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 9, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ac88fdbe-bdbb-4421-85c3-18be7f83783d

📥 Commits

Reviewing files that changed from the base of the PR and between b3d609d and 1262391.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (18)
  • .husky/pre-commit
  • .prettierrc
  • eslint.config.ts
  • package.json
  • rustfmt.toml
  • src-tauri/.clippy.toml
  • src-tauri/rustfmt.toml
  • src-tauri/src/telegram_service.rs
  • src/components/PhoneMockup.tsx
  • src/components/SetupWizard.tsx
  • src/components/SpecMockup.tsx
  • src/components/TerminalPreview.tsx
  • src/components/WizardLayout.tsx
  • src/index.css
  • src/loopback.ts
  • src/pages/DashboardPage.tsx
  • src/pages/LandingPage.tsx
  • src/pages/SetupPage.tsx

📝 Walkthrough

Walkthrough

This pull request establishes a comprehensive code quality and formatting infrastructure. It introduces ESLint, Prettier, and Husky configurations for TypeScript/JavaScript alongside Rustfmt and Clippy configurations for Rust. The package.json is updated with lint scripts, pre-commit hooks, and lint-staged rules. Existing component and page files receive minor formatting adjustments.

Changes

Cohort / File(s) Summary
Development tooling configuration
.husky/pre-commit, .prettierrc, eslint.config.ts, rustfmt.toml, src-tauri/.clippy.toml, src-tauri/rustfmt.toml
Added ESLint, Prettier, Husky pre-commit hooks, and Rust formatter configurations with standardized rules (semicolons, double quotes, tab width 2 for JS/TS and 4 for Rust, 100-char line width, Unix line endings).
Package dependencies and scripts
package.json
Added npm scripts (lint, format, prepare) and lint-staged configuration for TypeScript/JavaScript/CSS/JSON files. Extended devDependencies with ESLint, Prettier, Husky, lint-staged, and typescript-eslint tooling.
React component and page formatting
src/components/PhoneMockup.tsx, src/components/SetupWizard.tsx, src/components/SpecMockup.tsx, src/components/TerminalPreview.tsx, src/components/WizardLayout.tsx, src/pages/DashboardPage.tsx, src/pages/LandingPage.tsx, src/pages/SetupPage.tsx
Adjusted JSX text wrapping and multi-line formatting to single-line declarations; removed explicit line breaks in content without altering logic or behavior.
Code quality and styling adjustments
src/loopback.ts, src/index.css, src-tauri/src/telegram_service.rs
Modified operator grouping in optional chaining expression (loopback.ts); reformatted CSS theme variables from multi-line to single-line; condensed Rust string constant formatting.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Hops with delight through formatted code,
Linting and prettier on the road,
With Husky's guard and Clippy's care,
Quality standards floating through the air!
─ A rabbit's blessing on this tidy affair

✨ 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 5-feature-add-lint-formatting-precommit

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.

@maximedogawa maximedogawa merged commit c729762 into main Apr 9, 2026
1 check was pending
@maximedogawa maximedogawa deleted the 5-feature-add-lint-formatting-precommit branch April 9, 2026 09:09
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.

[Feature] Add lint, formatting, precommit

1 participant