@dloizides/frontend-devtools 1.6.0 → 1.8.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 +133 -106
- package/dist/eslint/index.d.mts +7 -1
- package/dist/eslint/index.d.ts +7 -1
- package/dist/eslint/index.js +271 -15
- package/dist/eslint/index.js.map +1 -1
- package/dist/eslint/index.mjs +268 -16
- package/dist/eslint/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,106 +1,133 @@
|
|
|
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
|
-
## [1.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
### Added
|
|
13
|
-
|
|
14
|
-
- `
|
|
15
|
-
(
|
|
16
|
-
|
|
17
|
-
- `
|
|
18
|
-
|
|
19
|
-
## [1.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
###
|
|
24
|
-
|
|
25
|
-
- `
|
|
26
|
-
|
|
27
|
-
(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
`
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
`
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
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
|
+
## [1.8.0] - 2026-10-19
|
|
9
|
+
|
|
10
|
+
PATTERN-1.4 "TypeScript pattern rules as ESLint rules", row PAT-API-1 "web apps call the backend through the shared client".
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- `no-raw-backend-fetch`: reports `fetch(` / `window.fetch(` / `globalThis.fetch(` / `self.fetch(` and value imports of `axios`
|
|
15
|
+
(`import`, `require`, `import()`) in `src/**`. Exempt: `src/server/`, `src/http/`, `src/lib/http/`, `packages/*-client/`,
|
|
16
|
+
`/generated/`, service worker files, `app/+html.*`, tests, `data:`/`blob:` URLs, `import type` from axios. Option `{ allow: string[] }`.
|
|
17
|
+
- `apiConfig` flat-config preset (`API_RULE_NAMES`) at `error`; included in `recommendedConfig`.
|
|
18
|
+
|
|
19
|
+
## [1.7.0] - 2026-10-19
|
|
20
|
+
|
|
21
|
+
NAV-1 "Every game menu works with arrow keys and controller", phase 3.
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- `game-menu-focusable`: reports a `click` / `pointerdown` / `pointerup` listener or `onclick =` on an element created as
|
|
26
|
+
`div` / `span` / `li` / `img` whose variable never gets `tabIndex` / `role` (property or `setAttribute`), and every
|
|
27
|
+
`stopPropagation()` inside a `keydown` / `onkeydown` handler (inline, named function or const). No options, no autofix.
|
|
28
|
+
- `gameConfig` flat-config preset (`GAME_RULE_NAMES`): enables `game-menu-focusable` at `error`. Not part of
|
|
29
|
+
`recommendedConfig`; game repos opt in.
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
|
|
33
|
+
- `testdoc-results.v1.schema.json` copy synced to Dloizides.Testing 7fbf809 (adds the optional `features` array).
|
|
34
|
+
|
|
35
|
+
## [1.5.0] - 2026-10-07
|
|
36
|
+
|
|
37
|
+
KEFI-ACT-1 "Same attendee actions everywhere" (generalized: one row-action source per entity, every portal).
|
|
38
|
+
|
|
39
|
+
### Added
|
|
40
|
+
|
|
41
|
+
- `single-row-action-source`: reports `<RowActionGroup actions>` from `@dloizides/ui-buttons` built in the same file
|
|
42
|
+
(inline array, array-bound identifier, `useMemo` returning an array, local builder function, `RowActionSpec[]`
|
|
43
|
+
annotated local). Imported builders/sets and props pass. No options, no autofix.
|
|
44
|
+
- `rowActionsConfig` and `recommendedConfig` flat-config blocks (`recommendedConfig` = comments + row actions, all `error`).
|
|
45
|
+
|
|
46
|
+
## [1.4.0] - 2026-10-07
|
|
47
|
+
|
|
48
|
+
COMMENTS-1 "No code comments; only short doc comments on public members", decision D-CMT-4 "One-line summary, no call chains".
|
|
49
|
+
|
|
50
|
+
### Changed
|
|
51
|
+
|
|
52
|
+
- `doc-comment-max-lines`: the description (lines other than `@param` / `@returns`) is capped at ONE line
|
|
53
|
+
(`summaryMaxLines`, default 1), every doc line at 120 chars (`lineMaxChars`), and a line containing an arrow
|
|
54
|
+
(U+2192 or `->`) or starting `Flow:` is reported (`callChain`). Matches `.claude/hooks/review-violations.js` docBlock().
|
|
55
|
+
The 3-line total cap is unchanged. One report per block; banned tags take precedence.
|
|
56
|
+
|
|
57
|
+
## [1.3.0] - 2026-10-06
|
|
58
|
+
|
|
59
|
+
COMMENTS-1 "No code comments; only short doc comments on public members" (decisions D-CMT-1, D-CMT-3).
|
|
60
|
+
|
|
61
|
+
### Added
|
|
62
|
+
|
|
63
|
+
- `no-comments`: reports every comment that is not a `/**` doc block and not a tool directive
|
|
64
|
+
(`eslint-*`, `@ts-*`, `prettier-ignore`, `istanbul`/`c8`, `/// <reference>`, `#__PURE__`,
|
|
65
|
+
`webpackChunkName`, shebang). `allow: string[]` adds directive regexes. Suggestion only, no autofix.
|
|
66
|
+
- `doc-comment-public-only`: a doc block must sit on an exported declaration (incl. `export { x }`,
|
|
67
|
+
`export default x`, `module.exports`, ambient `declare module`) or a public member of one;
|
|
68
|
+
`private` / `protected` / `#` members and local declarations are reported.
|
|
69
|
+
- `doc-comment-max-lines`: doc body capped at `max` (default 3) content lines; block tags other than
|
|
70
|
+
`allowedTags` (default `@param`, `@returns`) are reported. JSDoc type-annotation blocks
|
|
71
|
+
(`@type`, `@typedef`, ...) are exempt from both doc rules.
|
|
72
|
+
- `commentsConfig` flat-config block (the three rules at `error`) and `COMMENT_RULE_NAMES`, exported
|
|
73
|
+
from `/eslint`. Not adopted by any app yet: each repo opts in as step 1 of its COMMENTS-CLEAN sweep.
|
|
74
|
+
|
|
75
|
+
## [1.1.0] - 2026-07-13
|
|
76
|
+
|
|
77
|
+
Both changes come out of the ES-04 (agora-web) build, which surfaced two ways the
|
|
78
|
+
rule pack misbehaved against a freshly scaffolded app.
|
|
79
|
+
|
|
80
|
+
### Fixed
|
|
81
|
+
|
|
82
|
+
- **`no-null-check`: the autofixer no longer corrupts files.** It rewrote
|
|
83
|
+
`x === undefined` → `!isValueDefined(x)` *without importing `isValueDefined`*,
|
|
84
|
+
so `eslint --fix` emitted source referencing an undeclared global. Running
|
|
85
|
+
`lint:fix` on agora-web rewrote ~20 files and produced 67 `no-unsafe-call` /
|
|
86
|
+
`strict-boolean-expressions` errors. A fixer that produces broken code is worse
|
|
87
|
+
than no fixer — `lint:fix` is the first thing anyone runs.
|
|
88
|
+
|
|
89
|
+
The fixer now inserts `import { isValueDefined } from '@dloizides/utils';` (the
|
|
90
|
+
path is configurable via the pre-existing but previously **unused**
|
|
91
|
+
`utilImportPath` option) when the file has no binding for the guard, and skips
|
|
92
|
+
the autofix entirely in the module that defines or re-exports it. Proven with
|
|
93
|
+
`Linter.verifyAndFix` multipass tests — the actual `--fix` code path.
|
|
94
|
+
|
|
95
|
+
⚠️ The package's own test suite had *codified* the bug: it asserted the
|
|
96
|
+
import-less output was correct. Those expectations were wrong and are updated.
|
|
97
|
+
|
|
98
|
+
### Changed
|
|
99
|
+
|
|
100
|
+
- **`smart-max-lines`: `functionWarn` is now opt-in (default: off).** ESLint has
|
|
101
|
+
no per-report severity, so a `functionWarn` report is emitted at the severity
|
|
102
|
+
the *rule* is configured with. Every app configured the rule as `'error'` and
|
|
103
|
+
passed `functionWarn: 30` — which made the real, enforced limit **30 lines**
|
|
104
|
+
while the docs promised **50**. The rule lied about its own threshold.
|
|
105
|
+
|
|
106
|
+
Out of the box the only enforced thresholds are now `componentMax` (200) and
|
|
107
|
+
`functionMax` (50) — exactly what the documentation has always promised.
|
|
108
|
+
`functionWarn` remains available as an explicit *stricter second threshold*,
|
|
109
|
+
and its schema/message now say plainly that it reports at the rule's severity
|
|
110
|
+
rather than as a warning.
|
|
111
|
+
|
|
112
|
+
Migration: drop `functionWarn: 30` from your ESLint config. This only relaxes
|
|
113
|
+
linting (30 → 50), so it cannot introduce new failures.
|
|
114
|
+
|
|
115
|
+
## [1.0.0] - 2026-06-14
|
|
116
|
+
|
|
117
|
+
### Added
|
|
118
|
+
|
|
119
|
+
- Initial extraction of the shared RN-web dev tooling duplicated across
|
|
120
|
+
erevna-web, katalogos-web, and kefi-web.
|
|
121
|
+
- **ESLint custom rule pack** (17 rules) exported as `plugin` / `rules` /
|
|
122
|
+
`legacyPlugins`, also available under the `@dloizides/frontend-devtools/eslint`
|
|
123
|
+
subpath. Rule names preserved byte-for-byte so existing config keys and
|
|
124
|
+
`eslint-disable-next-line <rule>` comments keep working:
|
|
125
|
+
`enforce-function-style`, `enforce-module-structure`, `enforce-route-preload`,
|
|
126
|
+
`enforce-test-colocation`, `enum-file-isolation`, `i18n-interpolation`,
|
|
127
|
+
`i18n-param-names`, `no-barrel-companion-file`, `no-duplicate-nav-prefix`,
|
|
128
|
+
`no-duplicate-shared-patterns`, `no-generated-models-barrel-value-import`,
|
|
129
|
+
`no-null-check`, `no-optional-undefined`, `no-product-imports-in-shared`,
|
|
130
|
+
`prefer-const-enum`, `require-stable-hook-args`, `smart-max-lines`.
|
|
131
|
+
- **`initI18n(options)`** — parameterized i18next + react-i18next init factory.
|
|
132
|
+
Carries the `import/no-named-as-default-member` disable so apps stop repeating
|
|
133
|
+
it. The app owns its `locales/*.json` strings and the active language.
|
package/dist/eslint/index.d.mts
CHANGED
|
@@ -80,7 +80,13 @@ declare const commentsConfig: FlatConfig;
|
|
|
80
80
|
declare const ROW_ACTION_RULE_NAMES: readonly string[];
|
|
81
81
|
/** Flat-config block for row actions: RowActionGroup actions come from one shared defineRowActions set. */
|
|
82
82
|
declare const rowActionsConfig: FlatConfig;
|
|
83
|
+
declare const GAME_RULE_NAMES: readonly string[];
|
|
84
|
+
/** The game preset: menus stay walkable with arrow keys and a controller (NAV-1). Game repos only. */
|
|
85
|
+
declare const gameConfig: FlatConfig;
|
|
86
|
+
declare const API_RULE_NAMES: readonly string[];
|
|
87
|
+
/** PAT-API-1: the backend is called through the shared client or generated hooks, never raw fetch/axios. */
|
|
88
|
+
declare const apiConfig: FlatConfig;
|
|
83
89
|
/** The recommended flat-config block: every rule the pack enables by default, at error. */
|
|
84
90
|
declare const recommendedConfig: FlatConfig;
|
|
85
91
|
|
|
86
|
-
export { COMMENT_RULE_NAMES, type CustomRule, type FlatConfig, type FlatConfigPlugin, ROW_ACTION_RULE_NAMES, type SingleRulePlugin, commentsConfig, legacyPlugins, plugin, recommendedConfig, rowActionsConfig, ruleNames, rules };
|
|
92
|
+
export { API_RULE_NAMES, COMMENT_RULE_NAMES, type CustomRule, type FlatConfig, type FlatConfigPlugin, GAME_RULE_NAMES, ROW_ACTION_RULE_NAMES, type SingleRulePlugin, apiConfig, commentsConfig, gameConfig, legacyPlugins, plugin, recommendedConfig, rowActionsConfig, ruleNames, rules };
|
package/dist/eslint/index.d.ts
CHANGED
|
@@ -80,7 +80,13 @@ declare const commentsConfig: FlatConfig;
|
|
|
80
80
|
declare const ROW_ACTION_RULE_NAMES: readonly string[];
|
|
81
81
|
/** Flat-config block for row actions: RowActionGroup actions come from one shared defineRowActions set. */
|
|
82
82
|
declare const rowActionsConfig: FlatConfig;
|
|
83
|
+
declare const GAME_RULE_NAMES: readonly string[];
|
|
84
|
+
/** The game preset: menus stay walkable with arrow keys and a controller (NAV-1). Game repos only. */
|
|
85
|
+
declare const gameConfig: FlatConfig;
|
|
86
|
+
declare const API_RULE_NAMES: readonly string[];
|
|
87
|
+
/** PAT-API-1: the backend is called through the shared client or generated hooks, never raw fetch/axios. */
|
|
88
|
+
declare const apiConfig: FlatConfig;
|
|
83
89
|
/** The recommended flat-config block: every rule the pack enables by default, at error. */
|
|
84
90
|
declare const recommendedConfig: FlatConfig;
|
|
85
91
|
|
|
86
|
-
export { COMMENT_RULE_NAMES, type CustomRule, type FlatConfig, type FlatConfigPlugin, ROW_ACTION_RULE_NAMES, type SingleRulePlugin, commentsConfig, legacyPlugins, plugin, recommendedConfig, rowActionsConfig, ruleNames, rules };
|
|
92
|
+
export { API_RULE_NAMES, COMMENT_RULE_NAMES, type CustomRule, type FlatConfig, type FlatConfigPlugin, GAME_RULE_NAMES, ROW_ACTION_RULE_NAMES, type SingleRulePlugin, apiConfig, commentsConfig, gameConfig, legacyPlugins, plugin, recommendedConfig, rowActionsConfig, ruleNames, rules };
|