@dloizides/frontend-devtools 2.3.0 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,185 +1,199 @@
1
- # Changelog
2
-
3
- All notable changes to `@dloizides/frontend-devtools` are documented here.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
-
8
- ## [2.3.0] - 2026-10-28
9
-
10
- OBS-1 "Every app ships metrics, production-grade logs and alerts with working links", D-OBS-15 "Front-end budgets, warn only".
11
-
12
- ### Added
13
- - `./lighthouse` subpath: `budgetAssertions` (LCP < 2500 ms, TBT < 200 ms, CLS < 0.1, script transfer < 300 KB, all `warn`), `mobileSettings` (Lighthouse's mid-range phone profile) and `withBudgets(config)`, which merges both into an app's `lighthouserc.js`; keys the app sets win.
14
-
15
- ## [2.2.0] - 2026-10-23
16
-
17
- FOCUS-1 "Every screen names its initial focus", D-FOCUS-2 "Lint rule and ledger".
18
-
19
- ### Added
20
- - `explicit-initial-focus`: flags a file that builds a menu of 2+ buttons (HTML strings or `createElement('button')`) with no `MENU_DEFAULT_ATTR` / `data-menu-default` / `dataset.menuDefault` / `initialFocus`, and a JSX `*Dialog` / `*Modal` / `role="dialog"` in a file with no `autoFocus`, `initialFocus(Ref)` or `.focus()` call. Options: `minControls`, `dialogPattern`, `selfFocusing`.
21
- - `focusConfig` + `FOCUS_RULE_NAMES` (opt-in, not part of `recommendedConfig` or `gameConfig`).
22
-
23
- ## [2.1.0] - 2026-10-20
24
-
25
- QUAL-ADOPT-1 "Fail lint/arch tests when an app re-implements an existing package" (TS half).
26
-
27
- ### Added
28
- - `no-reimplemented-package`: flags app code that re-implements a shared package (hand-rolled analytics/Umami -> `@dloizides/analytics-web`, `X-BFF-Csrf` header or `bffCsrf` -> `@dloizides/bff-web-client`, `forgotPasswordRequest` -> `@dloizides/auth-web`, `utils/logger` -> `@dloizides/logging-web`). Pairs live in one registry, `src/rules/reimplemented-packages-registry.js`. Tests, e2e and package sources are exempt; `allow` adds path fragments.
29
- - `reuseConfig` + `REUSE_RULE_NAMES` (opt-in, not part of `recommendedConfig`).
30
-
31
- ## [2.0.0] - 2026-10-20
32
-
33
- D-PAT-15 "Move initI18n out of frontend-devtools so it is dev-only".
34
-
35
- ### Removed (BREAKING)
36
- - `initI18n` and `InitI18nOptions`: import them from `@dloizides/i18n` (>= 1.1.0), same signature: `import { initI18n } from '@dloizides/i18n';`.
37
- - The root entry (`@dloizides/frontend-devtools`): it exported only `initI18n`. Use the `/eslint` and `/test-results` subpaths.
38
- - The `i18next` and `react-i18next` optional peer dependencies.
39
-
40
- ## [1.10.0] - 2026-10-19
41
-
42
- PATTERN-1.12 "TS rule packs + house rules in frontend-devtools" (D-PAT-12 "Whole rule packs as warnings, one shared approach").
43
-
44
- ### Added
45
- - `patternPacksConfig`: the recommended rules of `@tanstack/eslint-plugin-query`, `eslint-plugin-react-you-might-not-need-an-effect`, `eslint-plugin-boundaries` and `eslint-plugin-sonarjs`, every rule at `warn`, plus the house rules.
46
- - `query-key-factory` (PAT-QUERY-KEY-1 "queryKey only from a key factory"): flags an inline array/string/template `queryKey`; key-factory files (`*Keys.ts`), tests and generated code are exempt; `allow` adds path fragments.
47
- - `HOUSE_PATTERN_RULE_NAMES`.
48
-
49
- ## [1.9.0] - 2026-10-19
50
-
51
- PATTERN-1.4 "TypeScript pattern rules as ESLint rules", `no-raw-backend-fetch` (PAT-API-1 "web apps call the backend through the shared client") hardening.
52
-
53
- ### Changed
54
- - `no-raw-backend-fetch` no longer reports `fetch` of a literal absolute `http(s)://host/...` URL (third-party), or of a value produced by `URL.createObjectURL(...)` / `new FileReader().result` (direct, or via a single `const`).
55
- - `no-raw-backend-fetch` registers no visitors when the parsed AST is not an ESTree `Program` (non-JS languages under an unscoped `apiConfig`).
56
-
57
- ### Tests
58
- - `apiConfigUnscoped.test.ts`: `apiConfig` without `files` lints `.js`/`.mjs`/`.cjs`, build output and a 2000-deep nested file without throwing, and still reports under `src/`.
59
-
60
- ## [1.8.0] - 2026-10-19
61
-
62
- PATTERN-1.4 "TypeScript pattern rules as ESLint rules", row PAT-API-1 "web apps call the backend through the shared client".
63
-
64
- ### Added
65
-
66
- - `no-raw-backend-fetch`: reports `fetch(` / `window.fetch(` / `globalThis.fetch(` / `self.fetch(` and value imports of `axios`
67
- (`import`, `require`, `import()`) in `src/**`. Exempt: `src/server/`, `src/http/`, `src/lib/http/`, `packages/*-client/`,
68
- `/generated/`, service worker files, `app/+html.*`, tests, `data:`/`blob:` URLs, `import type` from axios. Option `{ allow: string[] }`.
69
- - `apiConfig` flat-config preset (`API_RULE_NAMES`) at `error`; included in `recommendedConfig`.
70
-
71
- ## [1.7.0] - 2026-10-19
72
-
73
- NAV-1 "Every game menu works with arrow keys and controller", phase 3.
74
-
75
- ### Added
76
-
77
- - `game-menu-focusable`: reports a `click` / `pointerdown` / `pointerup` listener or `onclick =` on an element created as
78
- `div` / `span` / `li` / `img` whose variable never gets `tabIndex` / `role` (property or `setAttribute`), and every
79
- `stopPropagation()` inside a `keydown` / `onkeydown` handler (inline, named function or const). No options, no autofix.
80
- - `gameConfig` flat-config preset (`GAME_RULE_NAMES`): enables `game-menu-focusable` at `error`. Not part of
81
- `recommendedConfig`; game repos opt in.
82
-
83
- ### Changed
84
-
85
- - `testdoc-results.v1.schema.json` copy synced to Dloizides.Testing 7fbf809 (adds the optional `features` array).
86
-
87
- ## [1.5.0] - 2026-10-07
88
-
89
- KEFI-ACT-1 "Same attendee actions everywhere" (generalized: one row-action source per entity, every portal).
90
-
91
- ### Added
92
-
93
- - `single-row-action-source`: reports `<RowActionGroup actions>` from `@dloizides/ui-buttons` built in the same file
94
- (inline array, array-bound identifier, `useMemo` returning an array, local builder function, `RowActionSpec[]`
95
- annotated local). Imported builders/sets and props pass. No options, no autofix.
96
- - `rowActionsConfig` and `recommendedConfig` flat-config blocks (`recommendedConfig` = comments + row actions, all `error`).
97
-
98
- ## [1.4.0] - 2026-10-07
99
-
100
- COMMENTS-1 "No code comments; only short doc comments on public members", decision D-CMT-4 "One-line summary, no call chains".
101
-
102
- ### Changed
103
-
104
- - `doc-comment-max-lines`: the description (lines other than `@param` / `@returns`) is capped at ONE line
105
- (`summaryMaxLines`, default 1), every doc line at 120 chars (`lineMaxChars`), and a line containing an arrow
106
- (U+2192 or `->`) or starting `Flow:` is reported (`callChain`). Matches `.claude/hooks/review-violations.js` docBlock().
107
- The 3-line total cap is unchanged. One report per block; banned tags take precedence.
108
-
109
- ## [1.3.0] - 2026-10-06
110
-
111
- COMMENTS-1 "No code comments; only short doc comments on public members" (decisions D-CMT-1, D-CMT-3).
112
-
113
- ### Added
114
-
115
- - `no-comments`: reports every comment that is not a `/**` doc block and not a tool directive
116
- (`eslint-*`, `@ts-*`, `prettier-ignore`, `istanbul`/`c8`, `/// <reference>`, `#__PURE__`,
117
- `webpackChunkName`, shebang). `allow: string[]` adds directive regexes. Suggestion only, no autofix.
118
- - `doc-comment-public-only`: a doc block must sit on an exported declaration (incl. `export { x }`,
119
- `export default x`, `module.exports`, ambient `declare module`) or a public member of one;
120
- `private` / `protected` / `#` members and local declarations are reported.
121
- - `doc-comment-max-lines`: doc body capped at `max` (default 3) content lines; block tags other than
122
- `allowedTags` (default `@param`, `@returns`) are reported. JSDoc type-annotation blocks
123
- (`@type`, `@typedef`, ...) are exempt from both doc rules.
124
- - `commentsConfig` flat-config block (the three rules at `error`) and `COMMENT_RULE_NAMES`, exported
125
- from `/eslint`. Not adopted by any app yet: each repo opts in as step 1 of its COMMENTS-CLEAN sweep.
126
-
127
- ## [1.1.0] - 2026-07-13
128
-
129
- Both changes come out of the ES-04 (agora-web) build, which surfaced two ways the
130
- rule pack misbehaved against a freshly scaffolded app.
131
-
132
- ### Fixed
133
-
134
- - **`no-null-check`: the autofixer no longer corrupts files.** It rewrote
135
- `x === undefined` → `!isValueDefined(x)` *without importing `isValueDefined`*,
136
- so `eslint --fix` emitted source referencing an undeclared global. Running
137
- `lint:fix` on agora-web rewrote ~20 files and produced 67 `no-unsafe-call` /
138
- `strict-boolean-expressions` errors. A fixer that produces broken code is worse
139
- than no fixer — `lint:fix` is the first thing anyone runs.
140
-
141
- The fixer now inserts `import { isValueDefined } from '@dloizides/utils';` (the
142
- path is configurable via the pre-existing but previously **unused**
143
- `utilImportPath` option) when the file has no binding for the guard, and skips
144
- the autofix entirely in the module that defines or re-exports it. Proven with
145
- `Linter.verifyAndFix` multipass tests — the actual `--fix` code path.
146
-
147
- ⚠️ The package's own test suite had *codified* the bug: it asserted the
148
- import-less output was correct. Those expectations were wrong and are updated.
149
-
150
- ### Changed
151
-
152
- - **`smart-max-lines`: `functionWarn` is now opt-in (default: off).** ESLint has
153
- no per-report severity, so a `functionWarn` report is emitted at the severity
154
- the *rule* is configured with. Every app configured the rule as `'error'` and
155
- passed `functionWarn: 30` — which made the real, enforced limit **30 lines**
156
- while the docs promised **50**. The rule lied about its own threshold.
157
-
158
- Out of the box the only enforced thresholds are now `componentMax` (200) and
159
- `functionMax` (50) — exactly what the documentation has always promised.
160
- `functionWarn` remains available as an explicit *stricter second threshold*,
161
- and its schema/message now say plainly that it reports at the rule's severity
162
- rather than as a warning.
163
-
164
- Migration: drop `functionWarn: 30` from your ESLint config. This only relaxes
165
- linting (30 → 50), so it cannot introduce new failures.
166
-
167
- ## [1.0.0] - 2026-06-14
168
-
169
- ### Added
170
-
171
- - Initial extraction of the shared RN-web dev tooling duplicated across
172
- erevna-web, katalogos-web, and kefi-web.
173
- - **ESLint custom rule pack** (17 rules) exported as `plugin` / `rules` /
174
- `legacyPlugins`, also available under the `@dloizides/frontend-devtools/eslint`
175
- subpath. Rule names preserved byte-for-byte so existing config keys and
176
- `eslint-disable-next-line <rule>` comments keep working:
177
- `enforce-function-style`, `enforce-module-structure`, `enforce-route-preload`,
178
- `enforce-test-colocation`, `enum-file-isolation`, `i18n-interpolation`,
179
- `i18n-param-names`, `no-barrel-companion-file`, `no-duplicate-nav-prefix`,
180
- `no-duplicate-shared-patterns`, `no-generated-models-barrel-value-import`,
181
- `no-null-check`, `no-optional-undefined`, `no-product-imports-in-shared`,
182
- `prefer-const-enum`, `require-stable-hook-args`, `smart-max-lines`.
183
- - **`initI18n(options)`** — parameterized i18next + react-i18next init factory.
184
- Carries the `import/no-named-as-default-member` disable so apps stop repeating
185
- it. The app owns its `locales/*.json` strings and the active language.
1
+ # Changelog
2
+
3
+ All notable changes to `@dloizides/frontend-devtools` are documented here.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [2.5.0] - 2026-11-16
9
+
10
+ MODC-1 "Module C unified console", D-MC-46 "AC-MC-14: the lint rule flags our backend hosts".
11
+
12
+ ### Added
13
+ - `no-raw-backend-fetch` option `backendHosts` (exact hostnames or `*.suffix`): an absolute literal URL to one of our backend hosts is reported instead of being treated as third-party. Default `[]` keeps 2.4.0 behaviour.
14
+
15
+ ## [2.4.0] - 2026-11-03
16
+
17
+ UI-COMPOSE-1 "Extract shared UI from the start; compose small single-purpose parts", D-COMPOSE-2 "Single responsibility, few props, compose with slots".
18
+
19
+ ### Added
20
+ - `max-component-props` rule (default cap 12, `frozen` names may only shrink) and the opt-in `composeConfig` pack.
21
+
22
+ ## [2.3.0] - 2026-10-28
23
+
24
+ OBS-1 "Every app ships metrics, production-grade logs and alerts with working links", D-OBS-15 "Front-end budgets, warn only".
25
+
26
+ ### Added
27
+ - `./lighthouse` subpath: `budgetAssertions` (LCP < 2500 ms, TBT < 200 ms, CLS < 0.1, script transfer < 300 KB, all `warn`), `mobileSettings` (Lighthouse's mid-range phone profile) and `withBudgets(config)`, which merges both into an app's `lighthouserc.js`; keys the app sets win.
28
+
29
+ ## [2.2.0] - 2026-10-23
30
+
31
+ FOCUS-1 "Every screen names its initial focus", D-FOCUS-2 "Lint rule and ledger".
32
+
33
+ ### Added
34
+ - `explicit-initial-focus`: flags a file that builds a menu of 2+ buttons (HTML strings or `createElement('button')`) with no `MENU_DEFAULT_ATTR` / `data-menu-default` / `dataset.menuDefault` / `initialFocus`, and a JSX `*Dialog` / `*Modal` / `role="dialog"` in a file with no `autoFocus`, `initialFocus(Ref)` or `.focus()` call. Options: `minControls`, `dialogPattern`, `selfFocusing`.
35
+ - `focusConfig` + `FOCUS_RULE_NAMES` (opt-in, not part of `recommendedConfig` or `gameConfig`).
36
+
37
+ ## [2.1.0] - 2026-10-20
38
+
39
+ QUAL-ADOPT-1 "Fail lint/arch tests when an app re-implements an existing package" (TS half).
40
+
41
+ ### Added
42
+ - `no-reimplemented-package`: flags app code that re-implements a shared package (hand-rolled analytics/Umami -> `@dloizides/analytics-web`, `X-BFF-Csrf` header or `bffCsrf` -> `@dloizides/bff-web-client`, `forgotPasswordRequest` -> `@dloizides/auth-web`, `utils/logger` -> `@dloizides/logging-web`). Pairs live in one registry, `src/rules/reimplemented-packages-registry.js`. Tests, e2e and package sources are exempt; `allow` adds path fragments.
43
+ - `reuseConfig` + `REUSE_RULE_NAMES` (opt-in, not part of `recommendedConfig`).
44
+
45
+ ## [2.0.0] - 2026-10-20
46
+
47
+ D-PAT-15 "Move initI18n out of frontend-devtools so it is dev-only".
48
+
49
+ ### Removed (BREAKING)
50
+ - `initI18n` and `InitI18nOptions`: import them from `@dloizides/i18n` (>= 1.1.0), same signature: `import { initI18n } from '@dloizides/i18n';`.
51
+ - The root entry (`@dloizides/frontend-devtools`): it exported only `initI18n`. Use the `/eslint` and `/test-results` subpaths.
52
+ - The `i18next` and `react-i18next` optional peer dependencies.
53
+
54
+ ## [1.10.0] - 2026-10-19
55
+
56
+ PATTERN-1.12 "TS rule packs + house rules in frontend-devtools" (D-PAT-12 "Whole rule packs as warnings, one shared approach").
57
+
58
+ ### Added
59
+ - `patternPacksConfig`: the recommended rules of `@tanstack/eslint-plugin-query`, `eslint-plugin-react-you-might-not-need-an-effect`, `eslint-plugin-boundaries` and `eslint-plugin-sonarjs`, every rule at `warn`, plus the house rules.
60
+ - `query-key-factory` (PAT-QUERY-KEY-1 "queryKey only from a key factory"): flags an inline array/string/template `queryKey`; key-factory files (`*Keys.ts`), tests and generated code are exempt; `allow` adds path fragments.
61
+ - `HOUSE_PATTERN_RULE_NAMES`.
62
+
63
+ ## [1.9.0] - 2026-10-19
64
+
65
+ PATTERN-1.4 "TypeScript pattern rules as ESLint rules", `no-raw-backend-fetch` (PAT-API-1 "web apps call the backend through the shared client") hardening.
66
+
67
+ ### Changed
68
+ - `no-raw-backend-fetch` no longer reports `fetch` of a literal absolute `http(s)://host/...` URL (third-party), or of a value produced by `URL.createObjectURL(...)` / `new FileReader().result` (direct, or via a single `const`).
69
+ - `no-raw-backend-fetch` registers no visitors when the parsed AST is not an ESTree `Program` (non-JS languages under an unscoped `apiConfig`).
70
+
71
+ ### Tests
72
+ - `apiConfigUnscoped.test.ts`: `apiConfig` without `files` lints `.js`/`.mjs`/`.cjs`, build output and a 2000-deep nested file without throwing, and still reports under `src/`.
73
+
74
+ ## [1.8.0] - 2026-10-19
75
+
76
+ PATTERN-1.4 "TypeScript pattern rules as ESLint rules", row PAT-API-1 "web apps call the backend through the shared client".
77
+
78
+ ### Added
79
+
80
+ - `no-raw-backend-fetch`: reports `fetch(` / `window.fetch(` / `globalThis.fetch(` / `self.fetch(` and value imports of `axios`
81
+ (`import`, `require`, `import()`) in `src/**`. Exempt: `src/server/`, `src/http/`, `src/lib/http/`, `packages/*-client/`,
82
+ `/generated/`, service worker files, `app/+html.*`, tests, `data:`/`blob:` URLs, `import type` from axios. Option `{ allow: string[] }`.
83
+ - `apiConfig` flat-config preset (`API_RULE_NAMES`) at `error`; included in `recommendedConfig`.
84
+
85
+ ## [1.7.0] - 2026-10-19
86
+
87
+ NAV-1 "Every game menu works with arrow keys and controller", phase 3.
88
+
89
+ ### Added
90
+
91
+ - `game-menu-focusable`: reports a `click` / `pointerdown` / `pointerup` listener or `onclick =` on an element created as
92
+ `div` / `span` / `li` / `img` whose variable never gets `tabIndex` / `role` (property or `setAttribute`), and every
93
+ `stopPropagation()` inside a `keydown` / `onkeydown` handler (inline, named function or const). No options, no autofix.
94
+ - `gameConfig` flat-config preset (`GAME_RULE_NAMES`): enables `game-menu-focusable` at `error`. Not part of
95
+ `recommendedConfig`; game repos opt in.
96
+
97
+ ### Changed
98
+
99
+ - `testdoc-results.v1.schema.json` copy synced to Dloizides.Testing 7fbf809 (adds the optional `features` array).
100
+
101
+ ## [1.5.0] - 2026-10-07
102
+
103
+ KEFI-ACT-1 "Same attendee actions everywhere" (generalized: one row-action source per entity, every portal).
104
+
105
+ ### Added
106
+
107
+ - `single-row-action-source`: reports `<RowActionGroup actions>` from `@dloizides/ui-buttons` built in the same file
108
+ (inline array, array-bound identifier, `useMemo` returning an array, local builder function, `RowActionSpec[]`
109
+ annotated local). Imported builders/sets and props pass. No options, no autofix.
110
+ - `rowActionsConfig` and `recommendedConfig` flat-config blocks (`recommendedConfig` = comments + row actions, all `error`).
111
+
112
+ ## [1.4.0] - 2026-10-07
113
+
114
+ COMMENTS-1 "No code comments; only short doc comments on public members", decision D-CMT-4 "One-line summary, no call chains".
115
+
116
+ ### Changed
117
+
118
+ - `doc-comment-max-lines`: the description (lines other than `@param` / `@returns`) is capped at ONE line
119
+ (`summaryMaxLines`, default 1), every doc line at 120 chars (`lineMaxChars`), and a line containing an arrow
120
+ (U+2192 or `->`) or starting `Flow:` is reported (`callChain`). Matches `.claude/hooks/review-violations.js` docBlock().
121
+ The 3-line total cap is unchanged. One report per block; banned tags take precedence.
122
+
123
+ ## [1.3.0] - 2026-10-06
124
+
125
+ COMMENTS-1 "No code comments; only short doc comments on public members" (decisions D-CMT-1, D-CMT-3).
126
+
127
+ ### Added
128
+
129
+ - `no-comments`: reports every comment that is not a `/**` doc block and not a tool directive
130
+ (`eslint-*`, `@ts-*`, `prettier-ignore`, `istanbul`/`c8`, `/// <reference>`, `#__PURE__`,
131
+ `webpackChunkName`, shebang). `allow: string[]` adds directive regexes. Suggestion only, no autofix.
132
+ - `doc-comment-public-only`: a doc block must sit on an exported declaration (incl. `export { x }`,
133
+ `export default x`, `module.exports`, ambient `declare module`) or a public member of one;
134
+ `private` / `protected` / `#` members and local declarations are reported.
135
+ - `doc-comment-max-lines`: doc body capped at `max` (default 3) content lines; block tags other than
136
+ `allowedTags` (default `@param`, `@returns`) are reported. JSDoc type-annotation blocks
137
+ (`@type`, `@typedef`, ...) are exempt from both doc rules.
138
+ - `commentsConfig` flat-config block (the three rules at `error`) and `COMMENT_RULE_NAMES`, exported
139
+ from `/eslint`. Not adopted by any app yet: each repo opts in as step 1 of its COMMENTS-CLEAN sweep.
140
+
141
+ ## [1.1.0] - 2026-07-13
142
+
143
+ Both changes come out of the ES-04 (agora-web) build, which surfaced two ways the
144
+ rule pack misbehaved against a freshly scaffolded app.
145
+
146
+ ### Fixed
147
+
148
+ - **`no-null-check`: the autofixer no longer corrupts files.** It rewrote
149
+ `x === undefined` → `!isValueDefined(x)` *without importing `isValueDefined`*,
150
+ so `eslint --fix` emitted source referencing an undeclared global. Running
151
+ `lint:fix` on agora-web rewrote ~20 files and produced 67 `no-unsafe-call` /
152
+ `strict-boolean-expressions` errors. A fixer that produces broken code is worse
153
+ than no fixer — `lint:fix` is the first thing anyone runs.
154
+
155
+ The fixer now inserts `import { isValueDefined } from '@dloizides/utils';` (the
156
+ path is configurable via the pre-existing but previously **unused**
157
+ `utilImportPath` option) when the file has no binding for the guard, and skips
158
+ the autofix entirely in the module that defines or re-exports it. Proven with
159
+ `Linter.verifyAndFix` multipass tests — the actual `--fix` code path.
160
+
161
+ ⚠️ The package's own test suite had *codified* the bug: it asserted the
162
+ import-less output was correct. Those expectations were wrong and are updated.
163
+
164
+ ### Changed
165
+
166
+ - **`smart-max-lines`: `functionWarn` is now opt-in (default: off).** ESLint has
167
+ no per-report severity, so a `functionWarn` report is emitted at the severity
168
+ the *rule* is configured with. Every app configured the rule as `'error'` and
169
+ passed `functionWarn: 30` — which made the real, enforced limit **30 lines**
170
+ while the docs promised **50**. The rule lied about its own threshold.
171
+
172
+ Out of the box the only enforced thresholds are now `componentMax` (200) and
173
+ `functionMax` (50) — exactly what the documentation has always promised.
174
+ `functionWarn` remains available as an explicit *stricter second threshold*,
175
+ and its schema/message now say plainly that it reports at the rule's severity
176
+ rather than as a warning.
177
+
178
+ Migration: drop `functionWarn: 30` from your ESLint config. This only relaxes
179
+ linting (30 → 50), so it cannot introduce new failures.
180
+
181
+ ## [1.0.0] - 2026-06-14
182
+
183
+ ### Added
184
+
185
+ - Initial extraction of the shared RN-web dev tooling duplicated across
186
+ erevna-web, katalogos-web, and kefi-web.
187
+ - **ESLint custom rule pack** (17 rules) exported as `plugin` / `rules` /
188
+ `legacyPlugins`, also available under the `@dloizides/frontend-devtools/eslint`
189
+ subpath. Rule names preserved byte-for-byte so existing config keys and
190
+ `eslint-disable-next-line <rule>` comments keep working:
191
+ `enforce-function-style`, `enforce-module-structure`, `enforce-route-preload`,
192
+ `enforce-test-colocation`, `enum-file-isolation`, `i18n-interpolation`,
193
+ `i18n-param-names`, `no-barrel-companion-file`, `no-duplicate-nav-prefix`,
194
+ `no-duplicate-shared-patterns`, `no-generated-models-barrel-value-import`,
195
+ `no-null-check`, `no-optional-undefined`, `no-product-imports-in-shared`,
196
+ `prefer-const-enum`, `require-stable-hook-args`, `smart-max-lines`.
197
+ - **`initI18n(options)`** — parameterized i18next + react-i18next init factory.
198
+ Carries the `import/no-named-as-default-member` disable so apps stop repeating
199
+ it. The app owns its `locales/*.json` strings and the active language.
package/README.md CHANGED
@@ -132,6 +132,21 @@ a prop passed in. Fix: build row actions once per entity with `defineRowActions`
132
132
  `*RowActions` module; a table may only omit an action with a reason. Enabled at `error`
133
133
  by `recommendedConfig` and `rowActionsConfig`.
134
134
 
135
+ #### `no-raw-backend-fetch`
136
+
137
+ PAT-API-1: app code calls the backend through the shared client or generated hooks, never
138
+ raw `fetch()` or `axios`. An absolute literal URL (`https://host/...`) is treated as a
139
+ third-party call and allowed. Options:
140
+
141
+ - `allow` (string[]): extra path fragments where raw fetch is allowed.
142
+ - `backendHosts` (string[], default `[]`): hostnames of our own backends. A literal URL whose
143
+ host matches is reported even though it is absolute. Entries are exact (`aml.example.com`)
144
+ or `*.suffix` (`*.dloizides.com` matches any subdomain, not the bare domain). Case-insensitive.
145
+
146
+ ```js
147
+ '@dloizides/no-raw-backend-fetch': ['error', { backendHosts: ['aml.dloizides.com', '*.proovid.com'] }],
148
+ ```
149
+
135
150
  `ruleNames` exports the sorted list for migration assertions (prove no rule was
136
151
  dropped).
137
152
 
@@ -98,5 +98,8 @@ declare const recommendedConfig: FlatConfig;
98
98
  declare const FOCUS_RULE_NAMES: readonly string[];
99
99
  /** FOCUS-1: a game menu or dialog names the control focused on open. Opt-in, not part of recommendedConfig. */
100
100
  declare const focusConfig: FlatConfig;
101
+ declare const COMPOSE_RULE_NAMES: readonly string[];
102
+ /** UI-COMPOSE-1: a component stays small and composes with slots. Opt-in; pass `frozen` for existing over-limit ones. */
103
+ declare const composeConfig: FlatConfig;
101
104
 
102
- export { API_RULE_NAMES, COMMENT_RULE_NAMES, type CustomRule, FOCUS_RULE_NAMES, type FlatConfig, type FlatConfigPlugin, GAME_RULE_NAMES, HOUSE_PATTERN_RULE_NAMES, REUSE_RULE_NAMES, ROW_ACTION_RULE_NAMES, type SingleRulePlugin, apiConfig, commentsConfig, focusConfig, gameConfig, legacyPlugins, patternPacksConfig, plugin, recommendedConfig, reuseConfig, rowActionsConfig, ruleNames, rules };
105
+ export { API_RULE_NAMES, COMMENT_RULE_NAMES, COMPOSE_RULE_NAMES, type CustomRule, FOCUS_RULE_NAMES, type FlatConfig, type FlatConfigPlugin, GAME_RULE_NAMES, HOUSE_PATTERN_RULE_NAMES, REUSE_RULE_NAMES, ROW_ACTION_RULE_NAMES, type SingleRulePlugin, apiConfig, commentsConfig, composeConfig, focusConfig, gameConfig, legacyPlugins, patternPacksConfig, plugin, recommendedConfig, reuseConfig, rowActionsConfig, ruleNames, rules };
@@ -98,5 +98,8 @@ declare const recommendedConfig: FlatConfig;
98
98
  declare const FOCUS_RULE_NAMES: readonly string[];
99
99
  /** FOCUS-1: a game menu or dialog names the control focused on open. Opt-in, not part of recommendedConfig. */
100
100
  declare const focusConfig: FlatConfig;
101
+ declare const COMPOSE_RULE_NAMES: readonly string[];
102
+ /** UI-COMPOSE-1: a component stays small and composes with slots. Opt-in; pass `frozen` for existing over-limit ones. */
103
+ declare const composeConfig: FlatConfig;
101
104
 
102
- export { API_RULE_NAMES, COMMENT_RULE_NAMES, type CustomRule, FOCUS_RULE_NAMES, type FlatConfig, type FlatConfigPlugin, GAME_RULE_NAMES, HOUSE_PATTERN_RULE_NAMES, REUSE_RULE_NAMES, ROW_ACTION_RULE_NAMES, type SingleRulePlugin, apiConfig, commentsConfig, focusConfig, gameConfig, legacyPlugins, patternPacksConfig, plugin, recommendedConfig, reuseConfig, rowActionsConfig, ruleNames, rules };
105
+ export { API_RULE_NAMES, COMMENT_RULE_NAMES, COMPOSE_RULE_NAMES, type CustomRule, FOCUS_RULE_NAMES, type FlatConfig, type FlatConfigPlugin, GAME_RULE_NAMES, HOUSE_PATTERN_RULE_NAMES, REUSE_RULE_NAMES, ROW_ACTION_RULE_NAMES, type SingleRulePlugin, apiConfig, commentsConfig, composeConfig, focusConfig, gameConfig, legacyPlugins, patternPacksConfig, plugin, recommendedConfig, reuseConfig, rowActionsConfig, ruleNames, rules };