add linting and AGENTS.md - #30
Conversation
WalkthroughThe PR establishes code formatting and linting infrastructure by introducing EditorConfig, Prettier configuration with tooling, GitHub Actions workflows for automated linting, and developer documentation, along with minor formatting adjustments to existing files. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
README.md (1)
121-121: Address style issues identified in documentation.Several instances of redundant or verbose phrasing have been flagged by static analysis in table cells being reformatted:
- "originally created" → simplify to "created" (lines 121, 142, 163, 184, 208, 257)
- "exact same role" → simplify to "same role" (line 138)
- "etc)" → add period: "etc.)" (line 158)
These are low-cost fixes since you're already reformatting these lines. Addressing them will improve documentation clarity.
Also applies to: 138-138, 142-142, 158-158, 163-163, 184-184, 208-208, 257-257
AGENTS.md (1)
96-116: Add language specifier to code block.The directory structure code block at line 96 is missing a language specifier. This violates markdownlint rules (MD040).
Apply this diff to fix the code block:
-\`\`\` +\`\`\`plaintext lexicons/ app/certified/location.json com/atproto/repo/strongRef.json org/hypercerts/ claim/ activity.json collection.json contribution.json evaluation.json evidence.json measurement.json rights.json defs.json types/ # Generated - do not edit index.ts lexicons.ts types/ util.ts -\`\`\` +\`\`\`plaintext
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (11)
.editorconfig(1 hunks).github/workflows/lint.yml(1 hunks).github/workflows/test.yml(1 hunks).prettierignore(1 hunks).prettierrc(1 hunks)AGENTS.md(1 hunks)README.md(9 hunks)lexicons/com/atproto/repo/strongRef.json(1 hunks)lexicons/org/hypercerts/claim/contribution.json(0 hunks)lexicons/org/hypercerts/claim/rights.json(1 hunks)package.json(2 hunks)
💤 Files with no reviewable changes (1)
- lexicons/org/hypercerts/claim/contribution.json
🧰 Additional context used
🪛 LanguageTool
README.md
[style] ~121-~121: This phrase is redundant. Consider writing “created”.
Context: ...declared timestamp when this record was originally created | ...
(ORIGINALLY_CREATED)
[style] ~138-~138: ‘exact same’ might be wordy. Consider a shorter alternative.
Context: ...tContribution, then they would have the exact same role. | | | description | `...
(EN_WORDINESS_PREMIUM_EXACT_SAME)
[style] ~142-~142: This phrase is redundant. Consider writing “created”.
Context: ...declared timestamp when this record was originally created ...
(ORIGINALLY_CREATED)
[style] ~158-~158: In American English, abbreviations like “etc.” require a period.
Context: ...g measurement, hypercert, contribution, etc) | | evaluators | array | ✅ ...
(ETC_PERIOD)
[style] ~163-~163: This phrase is redundant. Consider writing “created”.
Context: ...declared timestamp when this record was originally created | ...
(ORIGINALLY_CREATED)
[style] ~184-~184: This phrase is redundant. Consider writing “created”.
Context: ...timestamp when this hypercert claim was originally created | ...
(ORIGINALLY_CREATED)
[style] ~208-~208: This phrase is redundant. Consider writing “created”.
Context: ...declared timestamp when this record was originally created | ...
(ORIGINALLY_CREATED)
[style] ~257-~257: This phrase is redundant. Consider writing “created”.
Context: ...declared timestamp when this record was originally created | | --- ## Notes - All t...
(ORIGINALLY_CREATED)
🪛 markdownlint-cli2 (0.18.1)
AGENTS.md
96-96: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🔇 Additional comments (10)
.github/workflows/test.yml (1)
19-20: LGTM!The quote style changes align with the new formatting standards being introduced across the repository. No functional impact on the workflow.
lexicons/com/atproto/repo/strongRef.json (1)
15-15: LGTM!The trailing newline addition aligns with the
.editorconfigsetting for consistent file formatting across the repository.lexicons/org/hypercerts/claim/rights.json (1)
11-16: LGTM!The multi-line formatting of the
requiredarray improves readability and aligns with the new Prettier configuration (printWidth: 80). No semantic changes..prettierignore (1)
1-9: LGTM!The ignore patterns are appropriate and comprehensive. Notably,
types/is correctly excluded since it contains auto-generated code, which aligns with the guidance in AGENTS.md..prettierrc (1)
1-10: LGTM!The Prettier configuration is well-structured and consistent with
.editorconfig. The choices (trailing commas, double quotes, 80-char printWidth, 2-space indent) follow modern best practices and provide clear formatting standards..editorconfig (1)
1-14: LGTM!The EditorConfig is comprehensive and follows conventions. The universal rules ensure consistent formatting (LF, UTF-8, 2-space indent, trim trailing whitespace), and the Makefile exception correctly uses tabs. Aligns well with
.prettierrcsettings.README.md (1)
27-28: LGTM!The formatting changes (quote style, table alignment) align well with the new Prettier configuration and improve consistency across the documentation.
Also applies to: 64-64, 84-84, 109-110, 135-136, 156-157, 177-178, 198-199, 251-252
AGENTS.md (1)
1-155: LGTM!AGENTS.md provides excellent guidance for contributors and AI assistants. The documentation clearly explains the auto-generated nature of the
types/directory, regeneration workflows, and project structure. This will be valuable for future maintenance and development.package.json (1)
38-40: Scripts are well-structured and follow npm conventions.The delegation pattern (lint → format:check) is clean and allows flexible usage: developers can run
npm run formatto auto-fix,npm run format:checkto validate, ornpm run lintas the enforcement target..github/workflows/lint.yml (1)
1-26: GitHub Actions workflow is properly configured and follows CI/CD best practices.The workflow correctly:
- Triggers on push and PR to main (lines 3-7)
- Uses current, stable action versions (checkout@v4, setup-node@v4) with Node.js 20 (lines 14-20)
- Enables npm caching to avoid redundant downloads (line 20)
- Uses
npm cifor deterministic dependency installation (line 23)- Delegates to the package.json lint script for consistency (line 26)
Summary by CodeRabbit
Chores
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.