Skip to content

Comments

Format#53

Merged
interim17 merged 5 commits intomainfrom
format
Feb 23, 2026
Merged

Format#53
interim17 merged 5 commits intomainfrom
format

Conversation

@interim17
Copy link
Contributor

@interim17 interim17 commented Feb 20, 2026

Added prettier config based on cell-catalog, ran it.

Advances #51

@interim17 interim17 requested a review from Copilot February 20, 2026 21:26
@netlify
Copy link

netlify bot commented Feb 20, 2026

Deploy Preview for project-idea-board ready!

Name Link
🔨 Latest commit c39b0c7
🔍 Latest deploy log https://app.netlify.com/projects/project-idea-board/deploys/699cc2233761720008a69bc8
😎 Deploy Preview https://deploy-preview-53--project-idea-board.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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

This PR introduces a Prettier-based formatting setup (based on cell-catalog) and applies it across the TypeScript/TSX code to standardize code style as part of issue #51 (dev housekeeping).

Changes:

  • Added a .prettierrc.json using @trivago/prettier-plugin-sort-imports and configured import ordering.
  • Updated package.json to use Prettier v3 and added format / formatCheck scripts.
  • Ran formatting across TS/TSX files, including import ordering and minor whitespace/layout changes.

Reviewed changes

Copilot reviewed 19 out of 20 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
yarn.lock Lockfile updates reflecting Prettier/plugin dependency additions.
package.json Adds Prettier v3 + import-sorting plugin and new formatting scripts.
.prettierrc.json Introduces Prettier configuration and import sorting rules.
src/types/index.ts Prettier formatting for type exports.
src/templates/tags.tsx Import spacing + GraphQL query formatting.
src/templates/program.tsx Import ordering consistent with new config.
src/templates/index-page.tsx Import ordering/grouping adjusted.
src/templates/idea-post.tsx Import ordering + JSX formatting adjustments.
src/templates/dataset.tsx Import spacing adjustments.
src/templates/allenite.tsx Import ordering consistent with new config.
src/templates/about-page.tsx Import grouping/order adjusted.
src/pages/ideas/index.tsx Import ordering + indentation cleanup.
src/components/TagPopover.tsx Import order + trailing comma formatting.
src/components/SiteMetadata.tsx Prettier formatting of useStaticQuery(graphql\...`)` call.
src/components/PreviewCompatibleImage.tsx Import spacing adjustments.
src/components/MaterialsAndMethods.tsx Import spacing + trailing comma formatting.
src/components/Layout.tsx Import ordering/grouping + moved destructuring to match formatting.
src/components/IdeaRoll.tsx Import ordering + object/JSX formatting adjustments.
src/components/IconText.tsx Import spacing + alignment cleanup.
src/components/FullWidthImage.tsx Import spacing adjustments.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 56 to 68
@@ -62,7 +64,7 @@
"gatsby-plugin-postcss": "^6.13.1",
"netlify-cli": "^17.15.7",
"postcss": "^8.4.35",
"prettier": "^2.0.5",
"prettier": "^3.8.1",
"typescript": "^5.3.3",
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

prettier was bumped to ^3.8.1 (and a new plugin added) but package-lock.json still pins Prettier 2.8.8. If installs/CI use npm (e.g., npm ci), this will cause dependency drift or failures. Please update package-lock.json accordingly or remove it if the project is intended to be Yarn-only, so the repo has a single source of truth for dependency resolution.

Copilot uses AI. Check for mistakes.
package.json Outdated
Comment on lines 51 to 52
"format": "prettier \"src/**/*.{tsx,ts}\" --write",
"formatCheck": "prettier \"src/**/*.{tsx,ts}\" --check",

This comment was marked as outdated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

did this by expanding the glob with a bit more precision

Copy link
Contributor

@jessicasyu jessicasyu left a comment

Choose a reason for hiding this comment

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

Do you need to run prettier manually each time? Or can it be attached to a pre commit hook or something?

@@ -0,0 +1,8 @@
{
"plugins": ["@trivago/prettier-plugin-sort-imports"],
"printWidth": 80,
Copy link
Contributor

Choose a reason for hiding this comment

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

Assuming this is configuring line width: is 80 the convention? We've been using 88 or 100, because 80 was a bit too restrictive/short

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, I'm not sure what is considered standard, It's 80 in cell-catalog. I'm looking around now and seeing 100 some places (BFF), and 120 in other (vole-app, tfe), so 80 does seem small.

I might just go ahead with this for now and I'm happy to revisit it later. I do wonder if style/formatting guidelines are a good topic for reusable workflows?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As for pre-commit hooks we can attach it. POC for that is ongoing in cell-catalog we are trying to get lefthook to work in place of husky as it's friendlier to polyglot repos.

@interim17 interim17 merged commit 348a639 into main Feb 23, 2026
5 checks passed
@interim17 interim17 deleted the format branch February 23, 2026 21:21
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.

3 participants