Skip to content

feat: add Prettier integration (config only)#207

Merged
uelkerd merged 14 commits into
mainfrom
feat/prettier-integration
Sep 29, 2025
Merged

feat: add Prettier integration (config only)#207
uelkerd merged 14 commits into
mainfrom
feat/prettier-integration

Conversation

@uelkerd
Copy link
Copy Markdown
Owner

@uelkerd uelkerd commented Sep 28, 2025

Summary

  • Add Prettier configuration for consistent code formatting
  • Add package.json with Prettier dependencies and scripts
  • Include ESLint integration packages for seamless workflow
  • IMPORTANT: No existing files were formatted - pure configuration addition

Changes

  • website/.prettierrc - Prettier configuration file
  • website/package.json - Package configuration with Prettier dependencies

Fortress Compliance

2 files (under 5-file limit)
Configuration focused - no formatting changes to existing code
Small and reviewable - focused on setup only

Dependencies

  • prettier - Core formatting tool
  • eslint-config-prettier - Disable ESLint rules that conflict with Prettier
  • eslint-plugin-prettier - Run Prettier as ESLint rule

Scripts Added

  • format - Format all files with Prettier
  • format:check - Check if files are formatted correctly

Next Steps

After this PR merges, a separate PR can be created to apply Prettier formatting to existing files if desired.

🤖 Generated with Claude Code

Summary by Sourcery

Add Prettier integration to the website project, including configuration, dependencies, and formatting scripts

New Features:

  • Add .prettierrc Prettier configuration file
  • Introduce formatting scripts (format and format:check) in website/package.json
  • Add Prettier and ESLint integration dependencies for seamless formatting

Summary by CodeRabbit

  • Chores
    • Added a project-wide code formatting configuration for the website.
    • Added npm scripts to format code and to check formatting.
    • No user-facing changes.

uelkerd and others added 13 commits September 27, 2025 10:54
Ultra-granular split for Sourcery compatibility (30k chars < 150k limit):
- favicon.ico: Professional website favicon
- css/comprehensive-demo.css: Advanced demo styling with CSS variables

Part 3/4 of website files from feat/clean-demo-website.
Completes the website assets for visual branding and styling.

Original work attribution: PR #169 feat/clean-demo-website

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Consolidate duplicate CSS rules (.demo-container, .feature-card, #textInput)
- Fix aggressive universal selector in prefers-reduced-motion with specific classes
- Make .step-label selector more specific to avoid conflicts
- Merge duplicate @media (max-width: 768px) blocks for better maintainability
- Add variables.css with design system variables
- Add base.css with typography and global styles
- Add main.css as entry point for component imports
- Add buttons.css for button styles and interactions
- Add forms.css for form controls and input styling
- Add navigation.css for navbar and menu components
- Add cards.css for feature cards and content containers
- Add containers.css for layout containers and hero sections
- Add progress.css for progress indicators and pipeline components
- Add charts.css for data visualization and chart components
- Add animations.css for transitions and animation effects
- Add messages.css for error and success message styling
- Add responsive.css for media queries and responsive design
- Add comprehensive README.md explaining the modular CSS architecture
- Merge feat/website-assets branch with comprehensive improvements
- Resolve merge conflicts between main and website-assets branches
- Keep improved modular CSS architecture and code review fixes
- Include proper binary favicon.ico and component-based CSS structure
- Address all code review issues: mobile performance, duplicate rules, selectors
- Add .prettierrc configuration for code formatting
- Add package.json with Prettier dependencies and scripts
- Include eslint-config-prettier and eslint-plugin-prettier for integration
- NO formatting of existing files - pure configuration addition

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings September 28, 2025 10:34
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented Sep 28, 2025

Reviewer's Guide

Introduces Prettier integration by adding a .prettierrc configuration file and updating package.json with formatting scripts and necessary devDependencies for Prettier and ESLint integration, without formatting any existing files.

File-Level Changes

Change Details Files
Add Prettier configuration
  • Introduce .prettierrc file with default formatting rules
website/.prettierrc
Set up formatting scripts and dependencies
  • Create package.json with project metadata
  • Add devDependencies: prettier, eslint-config-prettier, eslint-plugin-prettier
  • Define npm scripts: format and format:check
  • Specify Node engine version and module type
website/package.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Sep 28, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Adds a Prettier configuration file at website/.prettierrc and two npm scripts (format, format:check) to website/package.json to run and verify Prettier formatting.

Changes

Cohort / File(s) Summary
Prettier config
website/.prettierrc
New Prettier configuration: semi: true, trailingComma: "es5", singleQuote: true, printWidth: 80, tabWidth: 2, useTabs: false.
Package scripts
website/package.json
Adds npm scripts: format (runs Prettier to format files) and format:check (runs Prettier in check mode).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

I hop through code with tidy feet,
Formatting lines so neat and sweet.
A Prettier paw, a script to check,
I groom the repo—what the heck! 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly conveys the primary change of adding Prettier integration focused solely on configuration, directly matching the added .prettierrc file and package.json scripts without applying formatting. It follows conventional “feat:” prefix usage, remains concise, and omits unnecessary detail or file lists. This clarity ensures that teammates quickly understand the PR’s intent at a glance.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/prettier-integration

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f18f155 and 2de7c34.

📒 Files selected for processing (1)
  • website/package.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • website/package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Sourcery review

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.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @uelkerd, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request establishes a foundational setup for consistent code formatting within the website directory by integrating Prettier. It introduces the necessary configuration file and package dependencies, including those for ESLint integration, and defines scripts for formatting and checking code. The key focus is on setting up the infrastructure without applying any immediate formatting changes to existing codebase, paving the way for future style enforcement.

Highlights

  • Prettier Configuration Added: Introduced a new .prettierrc file in the website directory to define consistent code formatting rules, including semicolon usage, trailing commas, single quotes, print width, and tab settings.
  • Prettier Dependencies and Scripts: Added a package.json file to the website directory, including prettier, eslint-config-prettier, and eslint-plugin-prettier as development dependencies. New format and format:check scripts were also added for applying and verifying formatting.
  • ESLint Integration: Included eslint-config-prettier and eslint-plugin-prettier to ensure seamless integration between ESLint and Prettier, preventing conflicts and allowing Prettier to run as an ESLint rule.
  • Configuration Only: This pull request is purely for configuration setup; no existing files were formatted. The changes lay the groundwork for future code formatting without altering current code style.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@deepsource-io
Copy link
Copy Markdown
Contributor

deepsource-io Bot commented Sep 28, 2025

Here's the code health analysis summary for commits 77e0041..2de7c34. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource Test coverage LogoTest coverage⚠️ Artifact not reportedTimed out: Artifact was never reportedView Check ↗
DeepSource Python LogoPython✅ SuccessView Check ↗
DeepSource Terraform LogoTerraform✅ SuccessView Check ↗
DeepSource Secrets LogoSecrets✅ SuccessView Check ↗
DeepSource Shell LogoShell✅ SuccessView Check ↗
DeepSource Docker LogoDocker✅ SuccessView Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds Prettier configuration to establish consistent code formatting standards for the project without modifying any existing code files. The changes focus purely on setup and tooling configuration.

  • Adds Prettier configuration with standard formatting rules
  • Includes package.json with Prettier dependencies and formatting scripts
  • Sets up ESLint integration packages for seamless workflow

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
website/package.json Package configuration with Prettier dependencies and formatting scripts
website/.prettierrc Prettier formatting configuration with standard rules

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread website/package.json Outdated
Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes and they look great!

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location> `website/package.json:4-6` </location>
<code_context>
+  "name": "samo-dl-website",
+  "version": "1.0.0",
+  "description": "SAMO-DL emotion detection platform frontend",
+  "main": "index.html",
+  "scripts": {
+    "format": "prettier --write .",
</code_context>

<issue_to_address>
**suggestion:** The 'main' field is typically used for Node.js entry points, not static sites.

Consider removing the 'main' field from package.json to prevent confusion, as it is not needed for static sites.

```suggestion
  "description": "SAMO-DL emotion detection platform frontend",
  "scripts": {
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread website/package.json
Comment on lines +4 to +6
"description": "SAMO-DL emotion detection platform frontend",
"main": "index.html",
"scripts": {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

suggestion: The 'main' field is typically used for Node.js entry points, not static sites.

Consider removing the 'main' field from package.json to prevent confusion, as it is not needed for static sites.

Suggested change
"description": "SAMO-DL emotion detection platform frontend",
"main": "index.html",
"scripts": {
"description": "SAMO-DL emotion detection platform frontend",
"scripts": {

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request is a great initiative to enforce consistent code formatting by integrating Prettier. The configuration in .prettierrc is solid and follows common practices. However, I've identified a few areas for improvement in package.json. The ESLint integration is currently incomplete as it's missing the core eslint dependency and a configuration file. Additionally, the main field is used unconventionally, and the format scripts could be more specific to avoid accidentally formatting unintended files. Addressing these points will ensure a robust and correct setup.

Comment thread website/package.json
Comment on lines +11 to +15
"devDependencies": {
"prettier": "^3.0.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.0"
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The ESLint integration is incomplete. You've added eslint-config-prettier and eslint-plugin-prettier, which is great for making ESLint and Prettier work together, but the main eslint package is missing from devDependencies. Without it, these packages have no effect.

Additionally, an ESLint configuration file (e.g., .eslintrc.json) is needed to configure ESLint and use these plugins.

I suggest adding eslint to the dependencies. You will also need to add an ESLint configuration file to the project.

  "devDependencies": {
    "eslint": "^8.57.0",
    "prettier": "^3.0.0",
    "eslint-config-prettier": "^9.0.0",
    "eslint-plugin-prettier": "^5.0.0"
  },

Comment thread website/package.json
"name": "samo-dl-website",
"version": "1.0.0",
"description": "SAMO-DL emotion detection platform frontend",
"main": "index.html",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The main field in package.json is typically used to define the entry point for a Node.js module, usually a JavaScript file. For a static website project where npm is used only for development tooling, this field is not necessary and can be misleading. It's better to remove it for clarity.

Comment thread website/package.json
Comment on lines +7 to +8
"format": "prettier --write .",
"format:check": "prettier --check .",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The Prettier scripts are currently targeting . which will attempt to format every file in the directory. While Prettier ignores some files by default (like node_modules), this is very broad and could format unintended files in the future (e.g., build artifacts, logs). It's better practice to use a more specific glob pattern to target only the files you intend to format.

    "format": "prettier --write \"**/*.{html,css,js,json,md}\"",
    "format:check": "prettier --check \"**/*.{html,css,js,json,md}\""

- Add Prettier formatting scripts (format, format:check)
- Keep all test-related scripts and dependencies
- Maintain unified package.json with both capabilities
- Merge contains previously approved changes from main

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@uelkerd uelkerd merged commit 3fa99b3 into main Sep 29, 2025
12 of 14 checks passed
@uelkerd uelkerd deleted the feat/prettier-integration branch September 29, 2025 12:39
@uelkerd uelkerd restored the feat/prettier-integration branch September 29, 2025 12:57
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.

2 participants