Skip to content

feat: add Prettier formatter config (#677)#730

Merged
anchapin merged 3 commits intomainfrom
feature/prettier-677
Mar 7, 2026
Merged

feat: add Prettier formatter config (#677)#730
anchapin merged 3 commits intomainfrom
feature/prettier-677

Conversation

@anchapin
Copy link
Owner

@anchapin anchapin commented Mar 7, 2026

Closes #677

Copilot AI review requested due to automatic review settings March 7, 2026 17:41
Copy link

@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.

Sorry @anchapin, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@anchapin anchapin force-pushed the feature/prettier-677 branch from 4af7b77 to 3a9d5f7 Compare March 7, 2026 17:42
Copy link
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

Adds Prettier to the repo and applies formatting updates to align frontend code and repo templates with the new formatter configuration.

Changes:

  • Added Prettier as a dev dependency and updated .prettierrc overrides
  • Reformatted multiple TypeScript/React files to match Prettier output
  • Added GitHub issue templates for questions, documentation, and configuration issues

Reviewed changes

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

Show a summary per file
File Description
package.json Adds Prettier as a dev dependency to enable formatting tooling
frontend/src/services/analytics.ts Prettier-driven formatting for exported types and trackButtonClick
frontend/src/hooks/useAnalytics.ts Prettier formatting + renames unused callback arg to _event
frontend/src/components/ConversionFlow/ConversionFlowManager.tsx Prettier formatting for destructuring, deps array, and whitespace
.prettierrc Adjusts overrides, removing explicit Python parser setting
.github/ISSUE_TEMPLATE/question.md Adds a “Question” issue template
.github/ISSUE_TEMPLATE/documentation.md Adds a “Documentation” issue template
.github/ISSUE_TEMPLATE/config.md Adds a “Configuration / Environment” issue template

Comment on lines 18 to 23
{
"files": "*.py",
"options": {
"parser": "python",
"tabWidth": 4
}
}
Copy link

Copilot AI Mar 7, 2026

Choose a reason for hiding this comment

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

Prettier does not format Python files without an appropriate plugin/parser; keeping a *.py override can be confusing and prettier runs over .py files may still fail with 'No parser could be inferred'. Consider either adding a Python Prettier plugin (and the corresponding parser setting) or removing/ignoring *.py from Prettier runs (e.g., via .prettierignore or limiting CLI globs).

Copilot uses AI. Check for mistakes.
- Add .prettierrc with TypeScript, React, and Python config
- Configure printWidth 100 for TypeScript, tabWidth 4 for Python
- Add prettier to root package.json devDependencies
- Fix formatting issues in 3 frontend files
- CI pipeline already has format-check job using pnpm format:check
@anchapin anchapin force-pushed the feature/prettier-677 branch from 3a9d5f7 to 55e40f3 Compare March 7, 2026 19:10
Co-authored-by: openhands <openhands@all-hands.dev>
@anchapin anchapin merged commit 499fc56 into main Mar 7, 2026
20 of 22 checks passed
@anchapin anchapin deleted the feature/prettier-677 branch March 7, 2026 19:31
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.

[P1] Add Prettier formatter config

3 participants