Skip to content

Commit a9c82a8

Browse files
committed
updated linting script
1 parent a57894f commit a9c82a8

6 files changed

Lines changed: 149 additions & 246 deletions

File tree

.claude/commands/doc-feedback.md

Lines changed: 0 additions & 105 deletions
This file was deleted.

.claude/commands/lint.md

Lines changed: 0 additions & 28 deletions
This file was deleted.

.claude/skills/doc-feedback.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: reviewing-documentation
3+
description: Reviews documentation for quality, consistency, and style guide adherence. Use when reviewing changed docs or before publishing new content.
4+
---
5+
6+
# Documentation Feedback
7+
8+
## Workflow
9+
10+
1. **Get files to review**
11+
```bash
12+
git diff --name-only HEAD -- '*.mdx'
13+
git diff --name-only master...HEAD -- '*.mdx'
14+
```
15+
If `$ARGUMENTS` provided, review that path instead.
16+
17+
2. **Run linter first**
18+
```bash
19+
node scripts/lint-mdx.js $ARGUMENTS
20+
```
21+
22+
3. **Review against style guide** — See [content-instructions.md](../../content-instructions.md)
23+
24+
4. **Provide feedback** per file:
25+
- What's working well
26+
- Specific suggestions with line references
27+
- Linter issues (if any)
28+
29+
5. **Offer to fix** issues if requested
30+
31+
## Review checklist
32+
33+
```
34+
Review Progress:
35+
- [ ] Terminology consistent
36+
- [ ] Code examples complete and runnable
37+
- [ ] No placeholder values (foo, bar, example.com)
38+
- [ ] Headings descriptive and keyword-rich
39+
- [ ] Content scannable (headings, lists, white space)
40+
- [ ] Active voice, second person
41+
- [ ] Troubleshooting included where appropriate
42+
```

.claude/skills/lint.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: linting-mdx
3+
description: Runs deterministic MDX linter and helps fix formatting, structure, and Mintlify component issues. Use when checking documentation quality or before committing changes.
4+
---
5+
6+
# Lint MDX
7+
8+
Run the linter:
9+
10+
```bash
11+
node scripts/lint-mdx.js $ARGUMENTS
12+
```
13+
14+
Arguments: (none) = changed files, `all` = everything, or specify a path.
15+
16+
## Workflow
17+
18+
1. Run linter, present results
19+
2. If errors found, offer to fix them
20+
3. Prioritize errors over warnings
21+
22+
## References
23+
24+
- [mintlify-reference.md](../../mintlify-reference.md) — component syntax
25+
- [content-instructions.md](../../content-instructions.md) — writing guidelines

claude.md

Lines changed: 34 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -1,143 +1,64 @@
11
# Base Documentation
22

3-
Technical documentation for Base, an Ethereum L2 blockchain. Built with Mintlify.
3+
Technical documentation for Base (Ethereum L2). Built with Mintlify.
44

5-
## Quick Reference
5+
## Commands
66

77
| Command | Description |
88
|---------|-------------|
9-
| `mintlify dev` | Local dev server (http://localhost:3000) |
10-
| `mintlify install` | Reinstall dependencies |
11-
| `node scripts/lint-mdx.js` | Lint MDX files (deterministic) |
12-
| `/lint` | Run linter and get help fixing issues |
13-
| `/doc-feedback` | Review docs for quality and style guide adherence |
9+
| `mintlify dev` | Local dev server |
10+
| `/lint` | Lint MDX files and fix issues |
11+
| `/doc-feedback` | Review content quality |
1412

15-
## Repository Structure
13+
## Structure
1614

1715
```
18-
docs/ # All documentation content (MDX files)
19-
├── get-started/ # Introduction, quickstarts, builder support
20-
├── base-chain/ # Network info, node operations, tools
21-
├── base-account/ # Smart Wallet, account abstraction
22-
├── base-app/ # Agents, app development
23-
├── mini-apps/ # Mini app development guides
24-
├── onchainkit/ # React component library (versioned)
25-
├── cookbook/ # Use-case tutorials
26-
├── learn/ # Educational content (Solidity, Ethereum)
27-
├── images/ # Assets organized by topic
28-
├── snippets/ # Reusable MDX components
29-
└── docs.json # Navigation and site configuration
30-
storybook/ # Component demos (Chromatic deployment)
16+
docs/
17+
├── get-started/ # Intro, quickstarts
18+
├── base-chain/ # Network, nodes, tools
19+
├── base-account/ # Smart Wallet SDK
20+
├── base-app/ # Agent development
21+
├── mini-apps/ # MiniKit guides
22+
├── onchainkit/ # React components (versioned)
23+
├── cookbook/ # Tutorials
24+
├── learn/ # Solidity, Ethereum basics
25+
├── images/ # Assets by topic
26+
├── snippets/ # Reusable MDX components
27+
└── docs.json # Navigation config
3128
```
3229

33-
## Documentation Sections
34-
35-
| Section | Path | Content Type |
36-
|---------|------|--------------|
37-
| Get Started | `get-started/` | Intro, quickstarts, AI prompting |
38-
| Base Chain | `base-chain/` | Network, nodes, tools, security |
39-
| Base Account | `base-account/` | Smart Wallet SDK, integrations |
40-
| Base App | `base-app/` | Agent development |
41-
| Mini Apps | `mini-apps/` | Mini app guides, MiniKit |
42-
| OnchainKit | `onchainkit/` | React components (versioned) |
43-
| Cookbook | `cookbook/` | Practical tutorials |
44-
| Learn | `learn/` | Solidity, Ethereum fundamentals |
45-
46-
## Content Standards
47-
48-
### File Format
49-
50-
Every MDX file requires frontmatter:
30+
## Content Rules
5131

32+
**Frontmatter** (required):
5233
```yaml
5334
---
54-
title: "Clear, keyword-rich title"
55-
description: "Concise value description"
35+
title: "Keyword-rich title"
36+
description: "Value description"
5637
---
5738
```
5839

59-
### Writing Rules
60-
61-
- American English spelling
62-
- Sentence case for headings
63-
- Second person ("you") for instructions
64-
- Active voice, present tense
65-
- No H1 in body (title comes from frontmatter)
66-
67-
### Code Blocks
68-
69-
- Always specify language: ` ```typescript ` not ` ``` `
70-
- Add filename or title: ` ```typescript page.tsx ` or ` ```typescript title="Example" `
71-
- Blocks >7 lines: add `lines` for line numbers
72-
- Use `highlight={1-2,5}` for emphasis
73-
- Use `wrap` to prevent horizontal scroll
74-
75-
### Components
76-
77-
Use sparingly and correctly:
40+
**Writing**: American English, sentence case headings, second person ("you"), active voice.
7841

79-
**Callouts** (for important info only):
80-
- `<Note>` - supplementary info
81-
- `<Tip>` - best practices
82-
- `<Warning>` - critical cautions
83-
- `<Info>` - neutral context
84-
- `<Check>` - success confirmation
42+
**Code blocks**: Always specify language. Add filename or title. Use `highlight={}` for emphasis.
8543

86-
**Structure**:
87-
- `<Steps>` with `<Step title="...">` - procedures
88-
- `<Tabs>` with `<Tab title="...">` - platform-specific content
89-
- `<CodeGroup>` - same concept in multiple languages
90-
- `<AccordionGroup>` with `<Accordion title="...">` - progressive disclosure
44+
**Components**: See [mintlify-reference.md](mintlify-reference.md) for syntax.
9145

92-
**Media**:
93-
- All images wrapped in `<Frame>`
94-
- `<img>` must have `alt` attribute
95-
96-
**API Docs**:
97-
- `<ParamField path|body|query|header="..." type="...">` - parameters
98-
- `<ResponseField name="..." type="...">` - responses
99-
100-
### Comments
101-
102-
Use MDX syntax, not HTML:
103-
```mdx
104-
{/* Correct */}
105-
<!-- Wrong -->
106-
```
46+
**Images**: Wrap in `<Frame>`, include `alt` attribute.
10747

10848
## Navigation
10949

110-
All navigation is defined in `docs.json`:
111-
112-
- **Tabs**: Top-level sections (Get Started, Base Chain, etc.)
113-
- **Groups**: Subsections within tabs
114-
- **Pages**: Individual MDX files
115-
116-
When adding pages:
117-
1. Create MDX file in appropriate directory
118-
2. Add path to `docs.json` in correct group
119-
120-
When removing pages:
121-
1. Delete MDX file
122-
2. Remove from `docs.json`
123-
3. Add redirect in `docs.json` redirects section
124-
125-
## Git
126-
127-
- **Primary branch**: `master`
128-
- **Auto-deploy**: Mintlify GitHub App deploys on push to master
50+
Edit `docs.json` to add/remove pages. Add redirects when removing pages.
12951

130-
## Key Reference Files
52+
## References
13153

13254
| File | Purpose |
13355
|------|---------|
134-
| `docs.json` | Site navigation and config |
135-
| `content-instructions.md` | Detailed writing guidelines |
136-
| `mintlify-reference.md` | Component syntax reference |
137-
| `scripts/lint-mdx.js` | Deterministic MDX linter |
56+
| [content-instructions.md](content-instructions.md) | Writing guidelines |
57+
| [mintlify-reference.md](mintlify-reference.md) | Component syntax |
58+
| [scripts/README.md](scripts/README.md) | Linter usage |
13859

13960
## Before Committing
14061

141-
1. Run `/lint` and fix any errors
142-
2. If removing docs, add redirects in `docs.json`
143-
3. Verify internal links work
62+
1. Run `/lint` and fix errors
63+
2. Add redirects for removed pages
64+
3. Verify links work

0 commit comments

Comments
 (0)