Skip to content

chore: add Prettier config, format scripts, and .editorconfig#96

Merged
DataDave-Dev merged 1 commit into
mainfrom
chore/prettier-editorconfig
Jun 17, 2026
Merged

chore: add Prettier config, format scripts, and .editorconfig#96
DataDave-Dev merged 1 commit into
mainfrom
chore/prettier-editorconfig

Conversation

@DataDave-Dev

@DataDave-Dev DataDave-Dev commented Jun 17, 2026

Copy link
Copy Markdown
Owner

🇪🇸 Español

Agrega Prettier con config versionada para hacer cumplir el formato del código.

Cambios:

  • .prettierrc.json — config explícita (defaults que coinciden con el estilo actual: comillas dobles, punto y coma, 2 espacios, trailingComma: all, ancho 80).
  • .prettierignore — excluye builds, lockfile y assets WASM.
  • .editorconfig — alinea editores (LF, UTF-8, 2 espacios, newline final).
  • Scripts format y format:check en package.json.
  • Paso pnpm format:check en CI (antes de lint).
  • Reformateo único de toda la base (solo line-wrapping a 80 cols; sin cambios de comportamiento).

Validado: format:check, typecheck, lint, test (43 ✓) y build pasan.

Closes #67


🇬🇧 English

Adds Prettier with a checked-in config to enforce code formatting.

Changes:

  • .prettierrc.json — explicit config (defaults matching current style: double quotes, semicolons, 2-space, trailingComma: all, width 80).
  • .prettierignore — excludes builds, lockfile, and WASM assets.
  • .editorconfig — aligns editors (LF, UTF-8, 2-space, final newline).
  • format and format:check scripts in package.json.
  • pnpm format:check step in CI (before lint).
  • One-time reformat of the whole codebase (line-wrapping to 80 cols only; no behavior change).

Validated: format:check, typecheck, lint, test (43 ✓), and build all pass.

Closes #67

Summary by CodeRabbit

  • Style

    • Comprehensive code formatting standardization across the entire codebase, including JSX components, JSON configuration files, and Markdown documentation.
  • Chores

    • Integrated Prettier code formatter with explicit configuration for consistent code formatting standards.
    • Updated CI pipeline to include code formatting verification during build checks.
  • Documentation

    • Enhanced documentation formatting and improved table structures for better readability in README and contribution guidelines.

@ecc-tools

ecc-tools Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

ECC bundle files are already tracked in this repository. Skipping generation of another bundle PR.

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e3e88c5b-8ea2-413e-94b7-eb5430ca04ab

📥 Commits

Reviewing files that changed from the base of the PR and between 2f605c2 and bbe855d.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (52)
  • .agents/skills/weftmap/SKILL.md
  • .agents/skills/weftmap/agents/openai.yaml
  • .codex/AGENTS.md
  • .editorconfig
  • .github/ISSUE_TEMPLATE/bug_report.md
  • .github/workflows/ci.yml
  • .prettierignore
  • .prettierrc.json
  • CONTRIBUTING.es.md
  • CONTRIBUTING.md
  • README.es.md
  • README.md
  • package.json
  • src/app/[lang]/docs/layout.tsx
  • src/app/[lang]/layout.tsx
  • src/app/not-found.tsx
  • src/components/docs/Prose.tsx
  • src/components/docs/pages/AddingALanguage.tsx
  • src/components/docs/pages/ApiReference.tsx
  • src/components/docs/pages/Faq.tsx
  • src/components/docs/pages/GettingStarted.tsx
  • src/components/docs/pages/HowItWorks.tsx
  • src/components/docs/pages/Introduction.tsx
  • src/components/docs/pages/Languages.tsx
  • src/components/docs/pages/ReadingTheDiagram.tsx
  • src/components/layout/Footer.tsx
  • src/components/layout/Header.tsx
  • src/components/layout/ThemeToggle.tsx
  • src/components/sections/CallToAction.tsx
  • src/components/sections/Faq.tsx
  • src/components/sections/Features.tsx
  • src/components/sections/Hero.tsx
  • src/components/sections/HeroPreview.tsx
  • src/components/sections/HowItWorks.tsx
  • src/components/sections/SectionHeading.tsx
  • src/components/sections/Showcase.tsx
  • src/components/sections/SupportedLanguages.tsx
  • src/components/sections/UseCases.tsx
  • src/components/ui/CodeWorkspace.tsx
  • src/components/ui/Diagram.tsx
  • src/i18n/dictionaries/ar.json
  • src/i18n/dictionaries/en.json
  • src/i18n/dictionaries/es.json
  • src/i18n/dictionaries/fr.json
  • src/i18n/dictionaries/it.json
  • src/i18n/dictionaries/pt.json
  • src/i18n/i18n.test.ts
  • src/lib/analysis/analyzers/analyzers.test.ts
  • src/lib/analysis/analyzers/python.ts
  • src/lib/analysis/analyzers/shared.ts
  • src/lib/analysis/analyzers/sql.ts
  • src/lib/docs.ts

📝 Walkthrough

Walkthrough

Introduces Prettier formatting enforcement by adding .prettierrc.json, .prettierignore, .editorconfig, format/format:check scripts in package.json, and a pnpm format:check CI step. The formatter is then applied across all TypeScript, TSX, JSON, and Markdown files. One logic change lands in analyzers.test.ts: the SQL N:M bridge-table assertion now sorts edge endpoints before comparing.

Changes

Prettier Enforcement and Mass Format Application

Layer / File(s) Summary
Prettier config, scripts, .editorconfig, and CI step
.prettierrc.json, .prettierignore, .editorconfig, package.json, .github/workflows/ci.yml
Defines Prettier rules (double quotes, semicolons, trailing commas, 80-char width), ignore paths, LF/trailing-whitespace .editorconfig, adds format/format:check scripts plus prettier devDependency, and inserts pnpm format:check in CI before the lint step.
Analysis library formatting + SQL N:M test logic fix
src/lib/analysis/analyzers/shared.ts, src/lib/analysis/analyzers/python.ts, src/lib/analysis/analyzers/sql.ts, src/lib/analysis/analyzers/analyzers.test.ts, src/i18n/i18n.test.ts
Applies Prettier to LangSpec.resolveModule signature, parseFile, candidates array, and all SQL helper declarations. In analyzers.test.ts, reformats all assertion blocks; the only logic change is sorting [nm?.source, nm?.target] in the N:M bridge-table test to remove fixed-order sensitivity.
React component and UI JSX formatting
src/app/..., src/components/docs/..., src/components/layout/..., src/components/sections/..., src/components/ui/..., src/lib/docs.ts
Applies Prettier line-wrapping to JSX in all app layouts, documentation page components, layout shell components, landing-page section components, and the CodeWorkspace/Diagram UI components. No logic or rendered output changes.
i18n JSON, README, CONTRIBUTING, and agent docs formatting
src/i18n/dictionaries/*.json, README*.md, CONTRIBUTING*.md, .agents/..., .codex/AGENTS.md, .github/ISSUE_TEMPLATE/bug_report.md
Expands all six locale dictionaries' languageRows/useCases/faqs arrays to multi-line JSON, reformats README table alignment and emphasis markup, adds blank lines in CONTRIBUTING files, and normalizes quote style and spacing in agent skill docs.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

The vast majority of the diff is homogeneous Prettier output with no logic changes. The only substantive item to inspect is the SQL N:M sort fix in analyzers.test.ts and the new tooling config files.

Possibly related PRs

  • DataDave-Dev/weftmap#8: Introduced src/components/docs/Prose.tsx and src/lib/docs.ts (DOC_NAV), both of which receive formatting-only changes in this PR.
  • DataDave-Dev/weftmap#78: Added SQL/ER diagram support including TableNode in Diagram.tsx and the SQL analyzer in sql.ts—both files are reformatted here, and the SQL N:M test logic fix directly touches that analyzer's test coverage.

Poem

🐇 Hop, hop, hooray for consistent code today!
With semicolons placed and double quotes in line,
The .prettierrc keeps every diff so fine.
No trailing whitespace left to haunt the night,
pnpm format:check now guards the CI light! ✨

✨ 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 chore/prettier-editorconfig

Comment @coderabbitai help to get the list of available commands and usage tips.

@DataDave-Dev
DataDave-Dev merged commit cee9b1d into main Jun 17, 2026
0 of 2 checks passed
@DataDave-Dev
DataDave-Dev deleted the chore/prettier-editorconfig branch June 17, 2026 22:17
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.

Add Prettier config, format scripts, and .editorconfig

1 participant