Skip to content

Commit 6bfef7e

Browse files
fergusbissetclaude
andcommitted
Fix markdown formatting to pass CI checks
- README.md: Add language to code blocks, use consistent list numbering - SECURITY.md: Fix table alignment, add language to code blocks, add blank line before fenced code - MIGRATION-PLAN.md: Fix table alignment, add blank lines around headings/lists/code blocks, remove trailing punctuation from headings 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 183fe46 commit 6bfef7e

File tree

3 files changed

+59
-23
lines changed

3 files changed

+59
-23
lines changed

MIGRATION-PLAN.md

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ This document outlines the step-by-step process to migrate from the original rep
44

55
## Overview
66

7-
| Item | From | To |
8-
|------|------|-----|
9-
| **Repository** | Original repository | `github.com/NHSDigital/fdp-react-design-system` |
10-
| **Package Name** | `@nhsdigital/fdp-design-system` | `@nhsdigital/fdp-design-system` |
11-
| **Registry** | GitHub Packages | npm public registry |
12-
| **Author** | Original author | FDP Product Design Team |
7+
| Item | From | To |
8+
| ---------------- | ------------------------------- | ----------------------------------------------- |
9+
| **Repository** | Original repository | `github.com/NHSDigital/fdp-react-design-system` |
10+
| **Package Name** | `@nhsdigital/fdp-design-system` | `@nhsdigital/fdp-design-system` |
11+
| **Registry** | GitHub Packages | npm public registry |
12+
| **Author** | Original author | FDP Product Design Team |
1313

1414
---
1515

@@ -18,24 +18,30 @@ This document outlines the step-by-step process to migrate from the original rep
1818
The NHSDigital template provides standardized CI/CD, security scanning, and compliance tooling.
1919

2020
### Step 1.1: Add NHSDigital remote and fetch template
21+
2122
```bash
2223
git remote add nhsdigital https://github.com/NHSDigital/fdp-react-design-system.git
2324
git fetch nhsdigital main
2425
```
2526

2627
### Step 1.2: Merge template (allowing unrelated histories)
28+
2729
```bash
2830
git merge nhsdigital/main --allow-unrelated-histories -m "Merge NHSDigital repository template"
2931
```
3032

3133
### Step 1.3: Resolve conflicts
34+
3235
Expected conflicts (template vs existing files):
36+
3337
- `.gitignore` - Merge both (keep our npm/node ignores, add template's report ignores)
3438
- `README.md` - Keep ours, but adopt template structure where appropriate
3539
- `.github/` workflows - Keep template's CI/CD structure, adapt for npm
3640

3741
### Step 1.4: Review and integrate template components
42+
3843
Template provides:
44+
3945
- `.github/workflows/` - CI/CD pipeline stages (commit, test, build, publish, deploy)
4046
- `.github/actions/` - Security scanning, linting, dependency checks
4147
- `.github/ISSUE_TEMPLATE/` - Standardized issue templates
@@ -51,25 +57,30 @@ Template provides:
5157
## Phase 2: Remove Unnecessary Dependencies
5258

5359
### Step 2.1: Remove Chromatic
60+
5461
```bash
5562
npm uninstall chromatic @chromatic-com/storybook
5663
```
5764

5865
Remove from `package.json` scripts:
66+
5967
- `"chromatic": "npx chromatic"`
6068
- `"chromatic:ci": "npx chromatic --exit-zero-on-changes"`
6169
- `"chromatic:review": "npx chromatic --auto-accept-changes"`
6270

6371
### Step 2.2: Remove GSAP
72+
6473
```bash
6574
npm uninstall gsap
6675
```
6776

6877
Update components to use fallbacks:
78+
6979
- `src/components/Parallax/ParallaxScene.tsx` - Already has native scroll fallback
7080
- `src/components/ProductRoadmap/ProductRoadmap.tsx` - Already has CSS fallback
7181

7282
Changes needed:
83+
7384
1. Remove GSAP import attempts from both components
7485
2. Use native scroll/CSS-only implementations
7586
3. Update component documentation to reflect no GSAP dependency
@@ -78,7 +89,7 @@ Changes needed:
7889

7990
## Phase 3: Remove Unnecessary Documentation
8091

81-
### Files to DELETE (agent work, tracking, aspirational):
92+
### Files to DELETE (agent work, tracking, aspirational)
8293

8394
```bash
8495
# Burndown/tracking docs
@@ -105,7 +116,8 @@ rm docs/roadmaps/lms-extensions.md
105116
rm docs/roadmaps/ai-interaction-roadmap.tsx
106117
```
107118

108-
### Files to REVIEW (decide based on current relevance):
119+
### Files to REVIEW (decide based on current relevance)
120+
109121
- `docs/roadmaps/ARCHITECTURE_SSR_NUNJUCKS_MIGRATION.mdx` - Keep architecture info, remove roadmap framing
110122
- `docs/slot-matrix-stories.md` - Keep if SlotMatrix is active
111123

@@ -114,6 +126,7 @@ rm docs/roadmaps/ai-interaction-roadmap.tsx
114126
## Phase 4: Remove Unnecessary Functionality
115127

116128
### Step 4.1: Remove FDP Internal Dashboards
129+
117130
Delete `src/components/FDP/` contents EXCEPT Subnav:
118131

119132
```bash
@@ -128,6 +141,7 @@ rm src/components/FDP/*.syntheticData.ts
128141
Update `src/components/FDP/index.ts` to only export Subnav (already the case).
129142

130143
### Step 4.2: Remove Development/Migration Scripts
144+
131145
Delete scripts that were for one-time migrations:
132146

133147
```bash
@@ -190,17 +204,21 @@ Update `package.json` to remove corresponding npm scripts.
190204
```
191205

192206
### Step 5.2: Update all internal package references
207+
193208
Search and replace throughout codebase:
209+
194210
- `@nhsdigital/fdp-design-system``@nhsdigital/fdp-design-system`
195211

196212
Files to update:
213+
197214
- `README.md` (all import examples)
198215
- `docs/` (all documentation)
199216
- `examples/nextjs/` (package.json and imports)
200217
- `examples/express-njk/` (if applicable)
201218
- Storybook stories with import examples
202219

203220
### Step 5.3: Update README.md
221+
204222
- Remove GitHub Packages authentication instructions
205223
- Add npm public registry installation: `npm install @nhsdigital/fdp-design-system`
206224
- Update repository URLs
@@ -211,6 +229,7 @@ Files to update:
211229
## Phase 6: Update CI/CD for npm Publishing
212230

213231
### Step 6.1: Adapt NHSDigital workflow for npm
232+
214233
The template provides `.github/workflows/cicd-2-publish.yaml`. Update to:
215234

216235
```yaml
@@ -238,6 +257,7 @@ jobs:
238257
```
239258
240259
### Step 6.2: Set up npm access
260+
241261
1. Create npm organization account for `@nhsdigital` (if not exists)
242262
2. Generate npm access token
243263
3. Add `NPM_TOKEN` secret to GitHub repository
@@ -247,9 +267,11 @@ jobs:
247267
## Phase 7: Final Cleanup and Verification
248268

249269
### Step 7.1: Update CLAUDE.md
270+
250271
Update with new repository info, package name, and commands.
251272

252273
### Step 7.2: Run full verification
274+
253275
```bash
254276
npm run lint
255277
npm run typecheck
@@ -259,13 +281,15 @@ npm run build:parity
259281
```
260282

261283
### Step 7.3: Test local installation
284+
262285
```bash
263286
npm pack
264287
# In a test project:
265288
npm install /path/to/nhsdigital-fdp-react-design-system-x.x.x.tgz
266289
```
267290

268291
### Step 7.4: Update git remote and push
292+
269293
```bash
270294
git remote set-url origin https://github.com/NHSDigital/fdp-react-design-system.git
271295
git push -u origin main
@@ -276,16 +300,19 @@ git push -u origin main
276300
## Phase 8: Post-Migration Tasks
277301

278302
### Step 8.1: Archive old repository
303+
279304
- Add deprecation notice to original repository
280305
- Point users to new repository
281306

282307
### Step 8.2: First npm publish
308+
283309
```bash
284310
npm version 1.0.0 # Or appropriate version for fresh start
285311
npm publish --access public
286312
```
287313

288314
### Step 8.3: Verify npm installation
315+
289316
```bash
290317
npm install @nhsdigital/fdp-design-system
291318
```
@@ -307,38 +334,45 @@ After the main migration is stable, extract SPC to its own repository:
307334
## Checklist
308335

309336
### Phase 1: Template Merge
337+
310338
- [x] Add NHSDigital remote
311339
- [x] Merge template with `--allow-unrelated-histories`
312340
- [x] Resolve merge conflicts
313341
- [x] Review and integrate template CI/CD
314342

315343
### Phase 2: Dependencies
344+
316345
- [x] Remove Chromatic
317346
- [x] Remove GSAP
318347
- [x] Update ParallaxScene to use fallback only
319348
- [x] Update ProductRoadmap to use fallback only
320349

321350
### Phase 3: Documentation
351+
322352
- [x] Delete 16 identified docs files
323353
- [x] Review 2 ambiguous files
324354

325355
### Phase 4: Functionality
356+
326357
- [x] Remove FDP internal dashboards (keep Subnav)
327358
- [x] Remove ~20 development/migration scripts
328359
- [x] Update package.json scripts
329360

330361
### Phase 5: Package Config
362+
331363
- [x] Update package name to `@nhsdigital/fdp-design-system`
332364
- [x] Update author to "FDP Product Design Team"
333365
- [x] Update license to MIT
334366
- [x] Update publishConfig for npm public
335367
- [x] Search/replace all package references
336368

337369
### Phase 6: CI/CD
370+
338371
- [x] Configure npm publish workflow
339372
- [ ] Set up NPM_TOKEN secret (requires manual setup in GitHub)
340373

341374
### Phase 7: Verification
375+
342376
- [x] Lint passes (`npm run lint`)
343377
- [x] SSR tests pass (59 test files, 220 tests)
344378
- [ ] Component tests (pre-existing ResizeObserver mock issues in GanttChart/SPC tests)
@@ -347,6 +381,7 @@ After the main migration is stable, extract SPC to its own repository:
347381
- [ ] Local pack/install test
348382

349383
### Phase 8: Go Live
384+
350385
- [ ] Push to NHSDigital repo
351386
- [ ] Publish to npm
352387
- [ ] Archive old repo

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,21 @@ If the npm package is not yet available, you can install from GitHub Packages:
2020

2121
1. Create or edit `.npmrc` in your project root:
2222

23-
```
24-
@nhsdigital:registry=https://npm.pkg.github.com
25-
```
23+
```text
24+
@nhsdigital:registry=https://npm.pkg.github.com
25+
```
2626

27-
2. Authenticate with GitHub Packages (requires a GitHub PAT with `read:packages` scope):
27+
1. Authenticate with GitHub Packages (requires a GitHub PAT with `read:packages` scope):
2828

29-
```bash
30-
npm login --registry=https://npm.pkg.github.com
31-
```
29+
```bash
30+
npm login --registry=https://npm.pkg.github.com
31+
```
3232

33-
3. Install the package:
33+
1. Install the package:
3434

35-
```bash
36-
npm install @nhsdigital/fdp-design-system
37-
```
35+
```bash
36+
npm install @nhsdigital/fdp-design-system
37+
```
3838

3939
## Basic Usage
4040

SECURITY.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
We actively support the following versions of the NHS FDP Design System with security updates:
66

7-
| Version | Supported |
8-
| ------- | ------------------ |
9-
| 0.0.x (alpha) | :white_check_mark: |
7+
| Version | Supported |
8+
| ------------- | ------------------ |
9+
| 0.0.x (alpha) | :white_check_mark: |
1010

1111
**Note:** This project is currently in alpha. Once we reach v1.0.0, we will maintain the current major version and the previous major version with security updates.
1212

@@ -76,7 +76,7 @@ npm install @nhsdigital/fdp-design-system@latest
7676

7777
If you're using components with inline styles or dynamic content, configure your CSP headers appropriately:
7878

79-
```
79+
```text
8080
Content-Security-Policy:
8181
default-src 'self';
8282
style-src 'self' 'unsafe-inline';
@@ -95,6 +95,7 @@ When using SSR components:
9595
- Never trust client-provided data in server components
9696

9797
Example:
98+
9899
```tsx
99100
// ❌ DON'T: Unsanitized user input
100101
<Header serviceName={userInput} />

0 commit comments

Comments
 (0)