Skip to content

Commit a92aa8a

Browse files
committed
docs: fix inconsistencies and omissions in internal docs
1 parent 4bff07e commit a92aa8a

9 files changed

Lines changed: 21 additions & 19 deletions

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@
412412
### 📝 Documentation
413413

414414
- Refined the rule feature system docs and renamed the term-based patterns document.
415-
- Renamed `import-paths.md` to `path-aliases.md`.
415+
- Renamed `import-paths.md` to `repo-path-aliases.md`.
416416
- Updated JSX type aliases and `unwrap` documentation.
417417

418418
### 🏗️ Internal
@@ -907,7 +907,7 @@
907907
### 📝 Documentation
908908

909909
- Added `[NEEDS VERIFICATION]` markers to spec diffs for React Compiler aligned rules.
910-
- Added Issue Labels Design Doc and migration scripts.
910+
- Added Repo Issue Labels Doc and migration scripts.
911911
- Added a `Hint` component to the website and used it on the home page.
912912

913913
### 🏗️ Internal

apps/website/content/docs/changelog.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ title: Changelog
414414
### 📝 Documentation
415415

416416
- Refined the rule feature system docs and renamed the term-based patterns document.
417-
- Renamed `import-paths.md` to `path-aliases.md`.
417+
- Renamed `import-paths.md` to `repo-path-aliases.md`.
418418
- Updated JSX type aliases and `unwrap` documentation.
419419

420420
### 🏗️ Internal
@@ -909,7 +909,7 @@ title: Changelog
909909
### 📝 Documentation
910910

911911
- Added `[NEEDS VERIFICATION]` markers to spec diffs for React Compiler aligned rules.
912-
- Added Issue Labels Design Doc and migration scripts.
912+
- Added Repo Issue Labels Doc and migration scripts.
913913
- Added a `Hint` component to the website and used it on the home page.
914914

915915
### 🏗️ Internal
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Issue Labels Design
1+
# Repo Issue Labels
22

33
Label taxonomy for `Rel1cx/eslint-react` issues and pull requests.
44

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Path Aliases
1+
# Repo Path Aliases
22

33
This monorepo uses TypeScript `paths` aliases to avoid deep relative imports.
44

docs/rule-feature-system.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const RULE_FEATURES = ["EXP"]; // static-components: experimental detection
4848

4949
## How Features Drive Presets
5050

51-
Feature metadata is the source of truth; preset files are maintained manually. The `scripts/20-check-rules.ts` script (run via `node --run check:rules`) verifies config consistency—registered rules are accounted for, config keys are valid, and preset hierarchies hold—but it does not check `RULE_FEATURES` flags. Keeping `disable-type-checked` and `disable-experimental` aligned with `RULE_FEATURES` is currently a manual step.
51+
Feature metadata is the source of truth for badges and categorization, but the preset files themselves are maintained manually. The `scripts/20-check-rules.ts` script (run via `node --run check:rules`) verifies config consistency—registered rules are accounted for, config keys are valid, and preset hierarchies hold—but it does not check `RULE_FEATURES` flags. Keeping `disable-type-checked` and `disable-experimental` aligned with `RULE_FEATURES` is currently a manual step.
5252

5353
Rules marked `TSC` are disabled in `disable-type-checked.ts`:
5454

docs/rule-implementation-patterns-term-based.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export function create(context: RuleContext<MessageID, []>): RuleListener {
2525

2626
Used by: `no-access-state-in-setstate`, `no-class-component`, `no-component-will-*`, `no-create-ref`, `no-forward-ref`, `no-missing-context-display-name`, `no-misused-capture-owner-stack`, `no-set-state-in-component-*`, `no-unsafe-component-will-*`, `no-use-context`, `use-memo`, `context-name`, `id-name`, `ref-name`, `no-leaked-timeout`, `no-leaked-interval`, `no-leaked-resize-observer`, `no-leaked-intersection-observer`, `no-leaked-fetch` (first check), `no-leaked-event-listener` (first check).
2727

28-
Rules that currently omit the text precheck but still use term-based visitors: `no-children-count`, `no-children-for-each`, `no-children-only`, `no-children-to-array`, `no-direct-mutation-state`.
28+
Rules that currently omit the text precheck but still use term-based visitors: `no-children-count`, `no-children-for-each`, `no-children-map`, `no-children-only`, `no-children-to-array`, `no-clone-element`, `no-direct-mutation-state`.
2929

3030
### Multi-term check
3131

docs/rule-implementation-patterns.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,4 +162,4 @@ Use `ruleTester` for basic tests and `ruleTesterWithTypes` for rules requiring t
162162

163163
## Path Aliases
164164

165-
Both plugins use `@/` for intra-package imports and `#/` for workspace-root test utilities. See [`path-aliases.md`](./path-aliases.md) for details.
165+
Both plugins use `@/` for intra-package imports and `#/` for workspace-root test utilities. See [`repo-path-aliases.md`](./repo-path-aliases.md) for details.

docs/rule-relations-table.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,18 @@
4747
| `react-x/no-duplicate-key` | `react-x/no-array-index-key` | Disallows using an item's index in the array as its key |
4848
| `react-x/no-duplicate-key` | `react-x/no-implicit-key` | Prevents implicitly passing the `key` prop to components |
4949
| `react-x/no-duplicate-key` | `react-x/no-missing-key` | Disallows missing `key` on items in list rendering |
50-
| `react-x/no-implicit-children` | `react-x/no-implicit-key` | Prevents implicitly passing the `key` prop to components. |
51-
| `react-x/no-implicit-children` | `react-x/no-implicit-ref` | Prevents implicitly passing the `ref` prop to components. |
52-
| `react-x/no-implicit-key` | `react-x/no-implicit-children` | Prevents implicitly passing the `children` prop to components. |
53-
| `react-x/no-implicit-key` | `react-x/no-implicit-ref` | Prevents implicitly passing the `ref` prop to components. |
54-
| `react-x/no-implicit-ref` | `react-x/no-implicit-children` | Prevents implicitly passing the `children` prop to components. |
55-
| `react-x/no-implicit-ref` | `react-x/no-implicit-key` | Prevents implicitly passing the `key` prop to components. |
50+
| `react-x/no-implicit-children` | `react-x/no-implicit-key` | Prevents implicitly passing the `key` prop to components |
51+
| `react-x/no-implicit-children` | `react-x/no-implicit-ref` | Prevents implicitly passing the `ref` prop to components |
52+
| `react-x/no-implicit-key` | `react-x/no-implicit-children` | Prevents implicitly passing the `children` prop to components |
53+
| `react-x/no-implicit-key` | `react-x/no-implicit-ref` | Prevents implicitly passing the `ref` prop to components |
54+
| `react-x/no-implicit-ref` | `react-x/no-implicit-children` | Prevents implicitly passing the `children` prop to components |
55+
| `react-x/no-implicit-ref` | `react-x/no-implicit-key` | Prevents implicitly passing the `key` prop to components |
5656
| `react-x/no-missing-component-display-name` | `react-x/no-missing-context-display-name` | Enforces that all contexts have a `displayName` that can be used in DevTools |
5757
| `react-x/no-missing-context-display-name` | `react-x/no-missing-component-display-name` | Enforces that all components have a `displayName` that can be used in DevTools |
5858
| `react-x/no-missing-key` | `react-x/no-array-index-key` | Disallows using an item's index in the array as its key |
5959
| `react-x/no-missing-key` | `react-x/no-duplicate-key` | Prevents duplicate `key` props on sibling elements when rendering lists |
6060
| `react-x/no-missing-key` | `react-x/no-implicit-key` | Prevents implicitly passing the `key` prop to components |
61-
| `react-x/no-nested-component-definitions` | `react-x/no-nested-lazy-component-declarations` | Disallows nesting lazy component declarations inside other components |
61+
| `react-x/no-nested-component-definitions` | `react-x/no-nested-lazy-component-declarations` | Disallows nesting lazy component declarations inside other components or hooks |
6262
| `react-x/no-nested-component-definitions` | `react-x/static-components` | Validates that components are static, not recreated every render |
6363
| `react-x/no-nested-lazy-component-declarations` | `react-x/no-nested-component-definitions` | Disallows nesting component definitions inside other components |
6464
| `react-x/no-nested-lazy-component-declarations` | `react-x/static-components` | Validates that components are static, not recreated every render |

docs/rule-rename-checklist.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Checklist for renaming or moving rules in `eslint-plugin-react-x` and `@eslint-r
99
- [ ] Rename `src/rules/<old-name>/<old-name>.ts``src/rules/<new-name>/<new-name>.ts`
1010
- [ ] Rename `src/rules/<old-name>/<old-name>.spec.ts``src/rules/<new-name>/<new-name>.spec.ts`
1111
- [ ] Rename `src/rules/<old-name>/<old-name>.mdx``src/rules/<new-name>/<new-name>.mdx`
12+
- [ ] Rename `src/rules/<old-name>/CHANGELOG.md``src/rules/<new-name>/CHANGELOG.md`
1213

1314
### A2. Rule Implementation
1415

@@ -57,7 +58,7 @@ Checklist for renaming or moving rules in `eslint-plugin-react-x` and `@eslint-r
5758

5859
- [ ] `pnpm tsc --noEmit`
5960
- [ ] `pnpm vitest run src/rules/<new-name>/<new-name>.spec.ts`
60-
- [ ] `grep -r "<old-name>" packages/` — no leftover references
61+
- [ ] `grep -r --exclude-dir=node_modules --exclude-dir=dist "<old-name>" plugins/ packages/` — no leftover references
6162

6263
---
6364

@@ -81,6 +82,7 @@ Checklist for renaming or moving rules in `eslint-plugin-react-x` and `@eslint-r
8182
- Copy tests from the source plugin.
8283
- Update the import: `import rule, { RULE_NAME } from "./<rule-name>/<rule-name>";`.
8384
- [ ] Create `src/rules/<rule-name>/<rule-name>.mdx` following the template below.
85+
- [ ] Create `src/rules/<rule-name>/CHANGELOG.md` (copy from the source plugin or start fresh).
8486

8587
### B3. Plugin Registration (`eslint-plugin-react-x/src/plugin.ts`)
8688

@@ -99,7 +101,7 @@ Checklist for renaming or moving rules in `eslint-plugin-react-x` and `@eslint-r
99101

100102
- [ ] Remove the import and `rules` map entry from the source plugin's `src/plugin.ts`.
101103
- [ ] Remove the rule key from the source plugin's configs.
102-
- [ ] Keep or delete the original `.ts` / `.spec.ts` / `.mdx` files as appropriate.
104+
- [ ] Keep or delete the original `.ts` / `.spec.ts` / `.mdx` / `CHANGELOG.md` files as appropriate.
103105

104106
### B7. CHANGELOG
105107

@@ -111,7 +113,7 @@ Checklist for renaming or moving rules in `eslint-plugin-react-x` and `@eslint-r
111113

112114
- [ ] `pnpm tsc --noEmit` in all affected packages.
113115
- [ ] `pnpm vitest run src/rules/<rule-name>/<rule-name>.spec.ts`
114-
- [ ] `grep -r "react-<source>/<rule-name>" packages/`no stale references
116+
- [ ] `grep -r --exclude-dir=node_modules --exclude-dir=dist "react-<source>/<rule-name>" plugins/ packages/`no stale references
115117

116118
---
117119

0 commit comments

Comments
 (0)