@ploaness/config 1.0.0 → 1.1.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/biome-core.json CHANGED
@@ -62,7 +62,7 @@
62
62
  "kind": "objectLiteralProperty"
63
63
  },
64
64
  "match": "_*(.+)",
65
- "formats": ["camelCase", "CONSTANT_CASE", "PascalCase"]
65
+ "formats": ["camelCase", "CONSTANT_CASE", "PascalCase", "snake_case"]
66
66
  },
67
67
  {
68
68
  "selector": {
@@ -93,7 +93,8 @@
93
93
  },
94
94
  "performance": {
95
95
  "noBarrelFile": "off",
96
- "noJsxPropsBind": "off"
96
+ "noJsxPropsBind": "off",
97
+ "noAccumulatingSpread": "off"
97
98
  },
98
99
  "suspicious": {
99
100
  "noDoubleEquals": "error",
package/biome.json CHANGED
@@ -7,6 +7,11 @@
7
7
  "react": "all",
8
8
  "next": "all",
9
9
  "project": "all"
10
+ },
11
+ "rules": {
12
+ "a11y": {
13
+ "noNoninteractiveElementToInteractiveRole": "off"
14
+ }
10
15
  }
11
16
  }
12
17
  }
package/dist/a11y.d.ts CHANGED
@@ -1,3 +1,27 @@
1
+ export type { HitTargetClassification, HitTargetProbe, HitTargetVerdict, } from '@ploaness/governance';
2
+ export { classifyHitTarget, findDefiniteIncomplete } from '@ploaness/governance';
3
+ import type { Page } from '@playwright/test';
1
4
  export declare const SKIPPED_ROUTE_PREFIXES: readonly string[];
2
5
  export declare const MAX_SWEEP_ROUTES: number;
6
+ /**
7
+ * Wait for a page to finish rendering, before anything measures it.
8
+ *
9
+ * Call it after a navigation, and after a state change a scan is about to judge. A still document
10
+ * costs two animation frames; one that is animating costs however long its animations have left; a
11
+ * document that never stops changing costs the budget and no more, so a page nobody can settle slows
12
+ * the sweep rather than hanging it.
13
+ * @param page the page about to be scanned, left on whatever route it holds.
14
+ * @returns nothing. It resolves whether the page settled or the budget ran out.
15
+ */
16
+ export declare const settleForScan: (page: Page) => Promise<void>;
17
+ /**
18
+ * The pages this project declares that the sweep did not cover, each with what to do about it.
19
+ *
20
+ * Answers with nothing when the member declares no application routes at all, which is the honest
21
+ * result for a package that has no app directory rather than a claim that its pages are covered.
22
+ * @param visitedRoutes the addresses the crawl reached and scanned.
23
+ * @param answeredRoutes the addresses that answered, forwarding ones included.
24
+ * @returns one sentence per uncovered page, ready to be shown as a failure.
25
+ */
26
+ export declare const unsweptRoutes: (visitedRoutes: readonly string[], answeredRoutes: readonly string[]) => readonly string[];
3
27
  //# sourceMappingURL=a11y.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"a11y.d.ts","sourceRoot":"","sources":["../src/a11y.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,sBAAsB,EAAE,SAAS,MAAM,EAA4C,CAAA;AAEhG,eAAO,MAAM,gBAAgB,EAAE,MAAiD,CAAA"}
1
+ {"version":3,"file":"a11y.d.ts","sourceRoot":"","sources":["../src/a11y.ts"],"names":[],"mappings":"AAkBA,YAAY,EACV,uBAAuB,EACvB,cAAc,EACd,gBAAgB,GACjB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAIhF,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAW5C,eAAO,MAAM,sBAAsB,EAAE,SAAS,MAAM,EAA4C,CAAA;AAEhG,eAAO,MAAM,gBAAgB,EAAE,MAAiD,CAAA;AA8IhF;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,GAAU,MAAM,IAAI,KAAG,OAAO,CAAC,IAAI,CAU5D,CAAA;AAyDD;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,GACxB,eAAe,SAAS,MAAM,EAAE,EAChC,gBAAgB,SAAS,MAAM,EAAE,KAChC,SAAS,MAAM,EAgBjB,CAAA"}
package/dist/a11y.js CHANGED
@@ -1,9 +1,228 @@
1
- // The two facts the shipped accessibility sweep cannot know about the project it runs in.
1
+ // What the shipped accessibility sweep cannot know about the project it runs in, and the two decisions
2
+ // it must not make for itself.
2
3
  //
3
- // The sweep itself is a managed file, byte-identical in every consumer, so this module is the whole of
4
- // its configuration surface. Both entries are one-directional: a project may add a route prefix the
5
- // crawl must not follow and may lower the route ceiling, and can do neither in the other direction.
4
+ // The sweep is a managed file, byte-identical in every consumer, so this module is the whole of its
5
+ // configuration surface. The first two entries are one-directional: a project may add a route prefix
6
+ // the crawl must not follow and may lower the route ceiling, and can do neither in the other
7
+ // direction.
8
+ //
9
+ // The last two are not configuration at all. They are rules, so they live in `@ploaness/governance`
10
+ // where a spec exercises them against captured axe output and against probe shapes no browser has to
11
+ // produce on demand, and they are re-exported here because the sweep imports through one entry point.
12
+ //
13
+ // `settleForScan` is a third kind again: neither a setting nor a rule, but the one piece of I/O the
14
+ // sweep cannot do without and cannot keep to itself. It is here rather than in `@ploaness/governance`
15
+ // because that package forbids I/O, and here rather than inside the sweep because a project has to
16
+ // write its own scans for the pages the crawl cannot discover - an unlinked page, a custom admin view -
17
+ // and two definitions of "the page is ready" would drift.
18
+ export { classifyHitTarget, findDefiniteIncomplete } from '@ploaness/governance';
19
+ import { existsSync, readdirSync, readFileSync } from 'node:fs';
20
+ import path from 'node:path';
21
+ import { appRootOf, declaredRoutesOf, findUnsweptRoutes, } from '@ploaness/governance';
6
22
  import { projectSettings } from './project-settings.js';
7
23
  export const SKIPPED_ROUTE_PREFIXES = projectSettings.accessibilitySkipRoutes;
8
24
  export const MAX_SWEEP_ROUTES = projectSettings.accessibilityRouteBudget;
25
+ // Why a scan needs a wait at all: `page.goto` resolves at the `load` event, and a React application
26
+ // hydrates after that. axe measured in between reads a tree still being assembled - a heading whose
27
+ // level has not resolved lands in `incomplete`, which a consuming project saw on one run in three -
28
+ // and reads contrast against text the final font has not laid out yet.
29
+ //
30
+ // WHAT IT WAITS FOR, in this order: the document's font set has answered; the element count has held
31
+ // steady across two consecutive animation frames; every animation that will ever end has ended; and
32
+ // the count has held steady once more. Fonts first, because contrast is measured on rendered pixels
33
+ // and a face that arrives late reflows the text being judged. The count before the animations rather
34
+ // than after, for the reason written beside it - an animation cannot be waited for until something has
35
+ // created it, and on a hydrating page the mount is what creates it. Two frames rather than one,
36
+ // because React yields between hydration segments and a
37
+ // yield that happens to straddle a frame boundary is indistinguishable from a finished render if only
38
+ // one frame is asked. A fixed count of frames was the first draft and was wrong in the direction that
39
+ // matters: it settles the pages that were never the problem and gives up on a heavy panel exactly
40
+ // where the defect lives.
41
+ //
42
+ // WHY ANIMATIONS ARE PART OF IT. An element count cannot see an opacity. A page that fades its content
43
+ // in changes no element while it does so, so the count was steady two frames after hydration and a
44
+ // scan then measured a half-transparent paragraph - and axe blends a partial opacity toward the
45
+ // background exactly as an eye does, so it reported a contrast this page never actually renders at
46
+ // rest. That is the harmless direction. The other one is why this is a correctness fix rather than a
47
+ // convenience: text animating TOWARDS a colour too pale to read was measured at its opening frame and
48
+ // PASSED, so the sweep built to catch contrast defects returned green on a page whose resting state is
49
+ // a defect. Waiting for the animations to end measures the state a reader is left looking at.
50
+ //
51
+ // An animation that never ends is excluded rather than waited on, and the distinction is the whole
52
+ // reason this does not simply cost the budget. A spinner has no resting state to wait for, so awaiting
53
+ // it would spend the ceiling below on every settle of every control of every route, in exchange for
54
+ // nothing. `finished` never resolves for one, which is a hang the ceiling would absorb silently. The
55
+ // test for it is `iterations`, which a spinner reports as `Infinity`; a paused or already-finished
56
+ // animation is excluded too, because it is showing the frame a reader is looking at right now.
57
+ //
58
+ // A cancelled animation REJECTS `finished` rather than resolving, and that rejection is swallowed. A
59
+ // cancellation is a state change like any other and the element-count check notices it; ending the
60
+ // whole settle over one cancelled transition would report nothing useful about the page.
61
+ //
62
+ // The two callbacks below are written inline rather than named, which is not a style preference: a
63
+ // named helper closing over nothing is one the shipped rules ask to be hoisted to the outer scope, and
64
+ // the outer scope is the one place this function may not reach.
65
+ //
66
+ // WHY NOT `networkidle`. Playwright's own documentation discourages it; it throws on expiry rather
67
+ // than resolving; and it answers a different question. A page can be network-idle and mid-hydration.
68
+ // It is also unusable here in particular: the sweep runs against `next dev`, whose every page holds a
69
+ // hot-reload socket open, so no page it ever visits goes idle.
70
+ //
71
+ // WHY THE CEILING IS A TIMER. `requestAnimationFrame` does not fire in a page the browser has
72
+ // backgrounded, so a frame-counted ceiling is not a ceiling. A throttled background timer still fires.
73
+ // The race is inside the page for the same reason the hit-target probe does its work in one
74
+ // `evaluate`: a Node-side race would leave the in-page promise pending against a context the next
75
+ // navigation destroys.
76
+ const SETTLE_BUDGET_MS = 1000;
77
+ // Everything this function needs is inside it. Playwright ships a page function to the browser as its
78
+ // own source text, so a reference to anything at module scope here would be a ReferenceError in the
79
+ // page rather than a compile error in this file - the one mistake this shape cannot be checked for.
80
+ // It is also why the animation wait below is written inline rather than as a helper of its own.
81
+ const settleInPage = async (budgetMs) => {
82
+ const quietFrames = 2;
83
+ // Recursive rather than a loop over a counter, because there is no mutable binding to count with:
84
+ // this repository bans `let` and in-place mutation in its own source as well as in a consumer's. Each
85
+ // step awaits a frame, so what grows is frames rather than stack - an awaited recursion returns to
86
+ // the microtask queue every time. The frame is awaited inline because this is its only caller.
87
+ const stable = async (previous, remaining) => {
88
+ await new Promise((resolve) => {
89
+ requestAnimationFrame(() => {
90
+ resolve();
91
+ });
92
+ });
93
+ const current = document.querySelectorAll('*').length;
94
+ if (current !== previous) {
95
+ await stable(current, quietFrames);
96
+ return;
97
+ }
98
+ if (remaining > 1) {
99
+ await stable(current, remaining - 1);
100
+ }
101
+ };
102
+ const settled = async () => {
103
+ // The optional call covers a document carrying no font set at all, which must skip the wait
104
+ // rather than fail the settle.
105
+ await document.fonts?.ready;
106
+ // The element count FIRST, and this order is the whole of it. An animation does not exist until
107
+ // something creates it, and on a hydrating page that something is the mount: measured before the
108
+ // framework has mounted, `getAnimations` answers an honest empty list, and a settle that believed
109
+ // it would scan the very frame the animation is about to start from. Waiting for the tree to stop
110
+ // changing is waiting for the mount, which is what puts the animations on the page to be found.
111
+ await stable(document.querySelectorAll('*').length, quietFrames);
112
+ await Promise.all((document.getAnimations?.() ?? [])
113
+ .filter((animation) => animation.playState === 'running' &&
114
+ animation.effect !== null &&
115
+ Number.isFinite(animation.effect.getComputedTiming().iterations))
116
+ .map(async (animation) => {
117
+ try {
118
+ await animation.finished;
119
+ }
120
+ catch {
121
+ // A cancelled animation rejects rather than resolving. The cancellation is a state change
122
+ // like any other and the count below is what notices it.
123
+ }
124
+ }));
125
+ // And again afterwards, because an animation that ends by revealing a panel adds elements as it
126
+ // finishes. This pass costs two frames on a page where nothing moved.
127
+ await stable(document.querySelectorAll('*').length, quietFrames);
128
+ };
129
+ const deadline = async () => {
130
+ await new Promise((resolve) => {
131
+ setTimeout(() => {
132
+ resolve();
133
+ }, budgetMs);
134
+ });
135
+ };
136
+ await Promise.race([settled(), deadline()]);
137
+ };
138
+ /**
139
+ * Wait for a page to finish rendering, before anything measures it.
140
+ *
141
+ * Call it after a navigation, and after a state change a scan is about to judge. A still document
142
+ * costs two animation frames; one that is animating costs however long its animations have left; a
143
+ * document that never stops changing costs the budget and no more, so a page nobody can settle slows
144
+ * the sweep rather than hanging it.
145
+ * @param page the page about to be scanned, left on whatever route it holds.
146
+ * @returns nothing. It resolves whether the page settled or the budget ran out.
147
+ */
148
+ export const settleForScan = async (page) => {
149
+ try {
150
+ await page.evaluate(settleInPage, SETTLE_BUDGET_MS);
151
+ }
152
+ catch {
153
+ // A route that redirects on mount destroys the execution context while this is in flight, and a
154
+ // closed page cannot be asked anything. Neither is an accessibility finding, and neither should end
155
+ // a sweep: the scan that follows then runs on whatever the page holds, which is what every call
156
+ // site did before this function existed. A page that is genuinely broken still fails at `analyze`,
157
+ // with an axe result to read rather than a protocol error naming no route.
158
+ }
159
+ };
160
+ // What the sweep cannot work out from inside the browser: which pages this project declares.
161
+ //
162
+ // The crawl knows what it reached. Only the file tree knows what exists, so the completeness check
163
+ // needs both, and reading the tree is I/O - which is why the walk is here and every DECISION it feeds
164
+ // is in `@ploaness/governance`, where a coverage floor measures it. What follows is a directory walk
165
+ // and two file reads; which file is a route file, and what address it answers at, are not decided
166
+ // here.
167
+ //
168
+ // This is a function rather than the module-scope constants above it, and that is load-bearing.
169
+ // `ploaness/a11y` is imported by a project's own specs too - that is why `settleForScan` lives here -
170
+ // and a recursive walk evaluated at import time would run once per spec module, in every worker.
171
+ // Where a project's own code can be. Walking from the member root would descend into `node_modules`
172
+ // and `.next`, which are large, and into `dist`, which holds a compiled copy of the same routes.
173
+ const WALKED_ROOTS = ['src', 'app', 'tests'];
174
+ // The extensions a route file or a specification can have. Filtering here rather than in the rule
175
+ // keeps the corpus small; the rule still decides what a `page.tsx` means.
176
+ const READ_EXTENSIONS = ['.ts', '.tsx', '.jsx', '.js', '.mdx'];
177
+ /** Where a project's specifications live, which is a ploaness convention rather than a setting. */
178
+ const SPEC_ROOT = 'tests/';
179
+ const filesUnder = (root, relative) => {
180
+ const entries = readdirSync(path.join(root, relative), {
181
+ withFileTypes: true,
182
+ });
183
+ return entries.flatMap((entry) => {
184
+ // Forward slashes throughout, because the rules receive these paths as addresses-in-waiting and a
185
+ // backslash from a Windows walk would split into segments nothing matches.
186
+ const child = relative === '' ? entry.name : `${relative}/${entry.name}`;
187
+ if (entry.isDirectory()) {
188
+ return filesUnder(root, child);
189
+ }
190
+ return READ_EXTENSIONS.some((extension) => child.endsWith(extension))
191
+ ? [child]
192
+ : [];
193
+ });
194
+ };
195
+ const projectFiles = (root) => WALKED_ROOTS.flatMap((walked) => existsSync(path.join(root, walked)) ? filesUnder(root, walked) : []);
196
+ const readSpecs = (root, paths) => paths
197
+ .filter((file) => file.startsWith(SPEC_ROOT))
198
+ .map((file) => ({
199
+ path: file,
200
+ source: readFileSync(path.join(root, file), 'utf8'),
201
+ }));
202
+ /**
203
+ * The pages this project declares that the sweep did not cover, each with what to do about it.
204
+ *
205
+ * Answers with nothing when the member declares no application routes at all, which is the honest
206
+ * result for a package that has no app directory rather than a claim that its pages are covered.
207
+ * @param visitedRoutes the addresses the crawl reached and scanned.
208
+ * @param answeredRoutes the addresses that answered, forwarding ones included.
209
+ * @returns one sentence per uncovered page, ready to be shown as a failure.
210
+ */
211
+ export const unsweptRoutes = (visitedRoutes, answeredRoutes) => {
212
+ const root = process.cwd();
213
+ const paths = projectFiles(root);
214
+ const appRoot = appRootOf(paths);
215
+ if (appRoot === undefined) {
216
+ return [];
217
+ }
218
+ const specs = readSpecs(root, paths);
219
+ return findUnsweptRoutes({
220
+ declaredRoutes: declaredRoutesOf(paths, appRoot),
221
+ visitedRoutes,
222
+ answeredRoutes,
223
+ skippedPrefixes: SKIPPED_ROUTE_PREFIXES,
224
+ specs,
225
+ everyFile: specs,
226
+ }).map((unswept) => `${unswept.file} [${unswept.rule}] ${unswept.reason}`);
227
+ };
9
228
  //# sourceMappingURL=a11y.js.map
package/dist/a11y.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"a11y.js","sourceRoot":"","sources":["../src/a11y.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,EAAE;AACF,uGAAuG;AACvG,oGAAoG;AACpG,oGAAoG;AACpG,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEvD,MAAM,CAAC,MAAM,sBAAsB,GAAsB,eAAe,CAAC,uBAAuB,CAAA;AAEhG,MAAM,CAAC,MAAM,gBAAgB,GAAW,eAAe,CAAC,wBAAwB,CAAA"}
1
+ {"version":3,"file":"a11y.js","sourceRoot":"","sources":["../src/a11y.ts"],"names":[],"mappings":"AAAA,uGAAuG;AACvG,+BAA+B;AAC/B,EAAE;AACF,oGAAoG;AACpG,qGAAqG;AACrG,6FAA6F;AAC7F,aAAa;AACb,EAAE;AACF,oGAAoG;AACpG,qGAAqG;AACrG,sGAAsG;AACtG,EAAE;AACF,oGAAoG;AACpG,sGAAsG;AACtG,mGAAmG;AACnG,wGAAwG;AACxG,0DAA0D;AAO1D,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;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{ type RestrictedSyntax } from './eslint-security.js';
3
4
  /**
4
5
  * One flat-config block, described by its shape rather than by the plugins' own declarations.
5
6
  *
@@ -20,11 +21,6 @@ export type FlatConfigBlock = Readonly<Record<string, unknown>>;
20
21
  * because an assertion is uncovered by the type coverage measurement this repository holds at 100%.
21
22
  */
22
23
  export type RuleTable = Partial<Linter.RulesRecord>;
23
- /** One `no-restricted-syntax` entry: the shape to reject, and what to say when it appears. */
24
- export interface RestrictedSyntax {
25
- readonly selector: string;
26
- readonly message: string;
27
- }
28
24
  /**
29
25
  * A whole `no-restricted-syntax` setting: the severity first, then the shapes.
30
26
  *
@@ -64,6 +60,8 @@ declare const NO_LITERAL_ASSERTIONS: readonly RestrictedSyntax[];
64
60
  export declare const compose: typeof defineConfig;
65
61
  /** Formatting is Biome's job; this disables every conflicting stylistic rule and must stay last. */
66
62
  export declare const prettierLast: FlatConfigBlock;
63
+ /** The same layer with every rule it declares raised to `error`; a rule it turns off stays off. */
64
+ export declare const withoutWarnings: (layer: object) => FlatConfigBlock;
67
65
  /** The preset layers every ploaness-governed project runs, none of which may report at `warn`. */
68
66
  export declare const baseLayers: readonly FlatConfigBlock[];
69
67
  /**
@@ -90,11 +88,15 @@ export declare const testIntegrityRules: RuleTable;
90
88
  /**
91
89
  * The framework idiom a spec is written in, which the production rules were never aimed at.
92
90
  *
93
- * Only idiom is relaxed. Every rule that carries a rule of the governing standard - the size caps, the
94
- * explicitness rules, the ban on a non-null assertion, the unsafe-any family - stays ON, because the
95
- * standard says test code passes the same static-analysis checks as production code. A relaxation that
96
- * made a test easier to write by making it less checked would exempt the suite from the contract it
97
- * exists to enforce.
91
+ * Only idiom is relaxed. Every rule that carries a rule of the governing standard - the explicitness
92
+ * rules, the ban on a non-null assertion, the unsafe-any family, and every size cap but one - stays ON,
93
+ * because the standard says test code passes the same static-analysis checks as production code. A
94
+ * relaxation that made a test easier to write by making it less checked would exempt the suite from the
95
+ * contract it exists to enforce.
96
+ *
97
+ * The one exception is `max-lines-per-function`, and it is a role distinction rather than a relaxation:
98
+ * the cap bounds a unit of logic, and a `describe` body is a list of independent declarations. The file
99
+ * cap still applies. See the entry itself for the argument.
98
100
  *
99
101
  * Shared by every shipped config rather than stated in each, because what earns the exemption is being a
100
102
  * SPEC rather than being a Payload application's spec. Stated twice it drifted: a library consumer's
@@ -162,6 +164,7 @@ export declare const processConfigBlock: () => FlatConfigBlock;
162
164
  * catch.
163
165
  */
164
166
  export declare const specEnvironmentBlock: () => FlatConfigBlock;
167
+ export type { RestrictedSyntax } from './eslint-security.js';
165
168
  /** The shared selectors, re-exported so a scoped block can spread rather than restate them. */
166
169
  export { NO_FAST_CHECK_SEED, NO_INHERITANCE, NO_LITERAL_ASSERTIONS, NO_MOCK_PROPERTIES, NO_NETWORK_GUARD_ESCAPE, NO_TEST_ORDER_ESCAPE, };
167
170
  //# sourceMappingURL=eslint-core.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"eslint-core.d.ts","sourceRoot":"","sources":["../src/eslint-core.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAU5C;;;;;;;;;GASG;AACH,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;AAE/D;;;;;;;GAOG;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,CAAA;AAEnD,8FAA8F;AAC9F,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,uBAAuB,GAAG,SAAS,CAAC,OAAO,EAAE,GAAG,gBAAgB,EAAE,CAAC,CAAA;AAE/E,kGAAkG;AAClG,MAAM,WAAW,kBA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;AAOD,QAAA,MAAM,uBAAuB,EAAE,SAAS,gBAAgB,EAuEvD,CAAA;AAKD,QAAA,MAAM,oBAAoB,EAAE,SAAS,gBAAgB,EAoBpD,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,oBAAoB,EAAE,SASlC,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe,GAAI,OAAO,SAAS,MAAM,EAAE,KAAG,eAgCzD,CAAA;AAkDF,uGAAuG;AACvG,eAAO,MAAM,iBAAiB,GAC5B,OAAO,SAAS,MAAM,EAAE,EACxB,SAAS,SAAS,MAAM,EAAE,KACzB,eAQD,CAAA;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,QAAO,eAUpC,CAAA;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,oBAAoB,QAAO,eAQtC,CAAA;AAEF,YAAY,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,+FAA+F;AAC/F,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EAClB,uBAAuB,EACvB,oBAAoB,GACrB,CAAA"}
@@ -21,6 +21,7 @@ import sonarjs from 'eslint-plugin-sonarjs';
21
21
  import unicorn from 'eslint-plugin-unicorn';
22
22
  import globals from 'globals';
23
23
  import tseslint from 'typescript-eslint';
24
+ import { SECURITY_RESTRICTIONS } from './eslint-security.js';
24
25
  // Narrowing rather than a property read: `rules` arrives as `unknown` out of the index signature above,
25
26
  // and a layer that carries none is passed through untouched.
26
27
  const isRuleTable = (value) => typeof value === 'object' && value !== null;
@@ -56,6 +57,19 @@ const MOCKING_PACKAGES = [
56
57
  'nock',
57
58
  'msw',
58
59
  ];
60
+ // No simulated web layer. A test-only imitation of a framework's request handling answers a request
61
+ // without the server, the serialization and the error handling a real one passes through, so a test
62
+ // written against it proves the handler ran rather than that the endpoint works.
63
+ //
64
+ // What is NOT listed here matters as much as what is. The framework's OWN request pipeline - the code a
65
+ // live request actually runs, reached in process - is a real component under the substitute criterion,
66
+ // and driving an endpoint through it is the intended way to assert on a real response. `supertest` is
67
+ // absent for the same kind of reason: it binds a real ephemeral port, which is exactly what the rule
68
+ // asks for. And like the mock ban above, this names the cases it knows; a hand-rolled imitation is
69
+ // still a violation that an inspection decides.
70
+ const WEB_SIMULATION_MESSAGE = 'No simulated web layer. Drive the endpoint through the real request pipeline, or a real server ' +
71
+ 'on a local port, instead (see AGENTS.md).';
72
+ const WEB_SIMULATION_PACKAGES = ['node-mocks-http', 'light-my-request'];
59
73
  // Collection/global/field/block configs are declarative wiring: importing one already satisfies its
60
74
  // coverage, so a function inlined there has no unit-test seam and can sit untested. This rule bans
61
75
  // inline functions in those files, forcing extraction into the unit-tested src/access and src/lib
@@ -87,18 +101,29 @@ const NO_INHERITANCE = [
87
101
  // An assertion whose operands are literals alone cannot fail when the code under test changes, so it
88
102
  // reports as passing while judging nothing. This catches the exact form the standard names; the general
89
103
  // rule is not statically decidable and is stated in the agent guide instead.
104
+ //
105
+ // Anchored on the FIRST argument, which is the operand. Written as a child combinator over the whole
106
+ // call - `CallExpression[callee.name='expect'] > Literal` - it matched a literal in ANY argument
107
+ // position, and `expect` takes a second one: the message Vitest prints when the assertion fails. So the
108
+ // rule rejected `expect(parsed, 'the value that got through')`, which is not an assertion over a
109
+ // literal at all, and rejected it with a message describing a defect the line does not have. What
110
+ // survived was the one spelling neither this rule nor `vitest/valid-expect` happened to catch, a
111
+ // template literal carrying a substitution - and every shipped spec in `packages/assets` uses it,
112
+ // which is why nothing here ever reported the hole.
90
113
  const LITERAL_ASSERTION_MESSAGE = 'An assertion over a literal cannot fail when the code under test changes. Assert an observable outcome.';
114
+ const EXPECT_CALL = "CallExpression[callee.name='expect']";
91
115
  const NO_LITERAL_ASSERTIONS = [
92
116
  {
93
- selector: "CallExpression[callee.name='expect'] > Literal",
117
+ selector: `${EXPECT_CALL}[arguments.0.type='Literal']`,
94
118
  message: LITERAL_ASSERTION_MESSAGE,
95
119
  },
96
120
  {
97
- selector: "CallExpression[callee.name='expect'] > TemplateLiteral[expressions.length=0]",
121
+ selector: `${EXPECT_CALL}[arguments.0.type='TemplateLiteral'][arguments.0.expressions.length=0]`,
98
122
  message: LITERAL_ASSERTION_MESSAGE,
99
123
  },
100
124
  {
101
- selector: "CallExpression[callee.name='expect'] > UnaryExpression[operator='-'] > Literal",
125
+ selector: `${EXPECT_CALL}[arguments.0.type='UnaryExpression'][arguments.0.operator='-']` +
126
+ "[arguments.0.argument.type='Literal']",
102
127
  message: LITERAL_ASSERTION_MESSAGE,
103
128
  },
104
129
  ];
@@ -120,8 +145,9 @@ export const compose = defineConfig;
120
145
  /** Formatting is Biome's job; this disables every conflicting stylistic rule and must stay last. */
121
146
  export const prettierLast = prettier;
122
147
  // A warning severity does not exist in a governed repository: a check has two verdicts, and a finding
123
- // that prints and exits 0 is neither. Several presets ship rules at `warn` anyway - 31 of jsdoc's and 6
124
- // of regexp's, as of this writing - so every finding they report was invisible to the build.
148
+ // that prints and exits 0 is neither. Several presets ship rules at `warn` anyway - 31 of jsdoc's, 6
149
+ // of regexp's, and 14 of the 22 in Next's own core-web-vitals preset, as of this writing - so every
150
+ // finding they report was invisible to the build.
125
151
  //
126
152
  // The list of which rules those are is NOT written down here. It would be a copy of what the presets
127
153
  // declare, and it would go stale on the next upgrade in the one direction that fails open. Each layer's
@@ -141,7 +167,11 @@ const escalate = (setting) => {
141
167
  // arrives as the plugin's own declared interface, and an interface carries no index signature, so
142
168
  // naming one here would force an assertion at every call site - which the type coverage measurement
143
169
  // counts as uncovered. What this function needs is one property, read the way an unknown shape is read.
144
- const withoutWarnings = (layer) => {
170
+ //
171
+ // Exported because the application config mounts a framework preset of its own that arrives with the
172
+ // same defect, and a second copy of this escalation there would be the drift this file exists to stop.
173
+ /** The same layer with every rule it declares raised to `error`; a rule it turns off stays off. */
174
+ export const withoutWarnings = (layer) => {
145
175
  const rules = Reflect.get(layer, 'rules');
146
176
  return isRuleTable(rules)
147
177
  ? {
@@ -189,6 +219,13 @@ export const guidelineRules = {
189
219
  // Conflicts with the explicit philosophy: typedef requires annotations, this rule would strip
190
220
  // the "trivially inferable" ones (e.g. `const x: string = '...'`). We want them written.
191
221
  '@typescript-eslint/no-inferrable-types': 'off',
222
+ // The same conflict, one type narrower, and unsatisfiable rather than merely contrary. For a
223
+ // constant that must carry a string LITERAL type - a discriminant, or a key a typed API indexes by -
224
+ // all three spellings are rejected: `const X: 'a' = 'a'` by this rule, `const X = 'a' as const` and
225
+ // `const X = 'a'` by typedef. There is no legal declaration left, so this one gives way. It arrives
226
+ // from the typescript-eslint preset rather than from this table, which is why it outlived the audit
227
+ // that turned off the rule above.
228
+ '@typescript-eslint/prefer-as-const': 'off',
192
229
  '@typescript-eslint/no-non-null-assertion': 'error',
193
230
  '@typescript-eslint/strict-boolean-expressions': 'error',
194
231
  '@typescript-eslint/switch-exhaustiveness-check': 'error',
@@ -283,7 +320,7 @@ export const guidelineRules = {
283
320
  'unicorn/expiring-todo-comments': 'off',
284
321
  // Composition over inheritance. A type inherits only from a base the language or a dependency
285
322
  // requires, and the error base is the one such base that appears in ordinary code.
286
- 'no-restricted-syntax': [...NO_INHERITANCE],
323
+ 'no-restricted-syntax': [...NO_INHERITANCE, ...SECURITY_RESTRICTIONS],
287
324
  // Control-flow clarity.
288
325
  eqeqeq: ['error', 'always'],
289
326
  curly: ['error', 'all'],
@@ -364,6 +401,60 @@ export const guidelineRules = {
364
401
  // avoid the constant. Biome decides, for the reason it already decides formatting: the two must
365
402
  // never disagree about the same character, so one of them owns style and the other defers.
366
403
  'unicorn/prefer-global-number-constants': 'off',
404
+ // The sibling contradiction, resolved the OTHER way, and the difference is worth the paragraph.
405
+ //
406
+ // Building a list by a sequential scan - each entry deciding what it becomes from what the previous
407
+ // ones did - has four spellings, and this harness rejected all of them but one. `[...accumulator,
408
+ // one]` inside a `reduce` is Biome's `noAccumulatingSpread`. `accumulator.concat([one])` is
409
+ // `unicorn/prefer-spread`, which does not merely permit the spread form but MANDATES it over
410
+ // `concat`. `collected.push(one)` is `functional/immutable-data`, and the mutable binding a loop
411
+ // needs is `functional/no-let`. What survived was recursion, which is a poor thing to be steered
412
+ // into: it trades the copying `noAccumulatingSpread` objects to for a hard stack-depth limit, so the
413
+ // rule set was answering a performance question with a correctness cliff.
414
+ //
415
+ // The rule above says Biome decides when the two disagree. That rule is about STYLE - which spelling
416
+ // of a constant, where both spellings do the same thing and the only cost of choosing wrongly is
417
+ // inconsistency. This is not that. `noAccumulatingSpread` is a claim about algorithmic cost, and
418
+ // this harness has already answered that question everywhere else: `functional/no-let` and
419
+ // `functional/immutable-data` price immutability above copying, in every module, by design. A rule
420
+ // penalising the immutable form is arguing with a decision the rule set already made - and
421
+ // `unicorn/no-array-reduce` is off a few lines above precisely because `reduce` is the idiom that
422
+ // decision leaves. So `noAccumulatingSpread` is gone from `biome-core.json`.
423
+ //
424
+ // The lists a governed project accumulates this way are a day's diary entries or a quote's line
425
+ // items. The copying is real and is measured in microseconds; the stack limit is not.
426
+ //
427
+ // `prefer-spread` used to stay as the narrower cut, and it no longer does, for a reason that is not
428
+ // about accumulation at all. See the entry that follows.
429
+ // A THIRD contradiction, and the first one where the fixer is the thing that breaks the code.
430
+ //
431
+ // `unicorn/prefer-spread` mandates `[...value]` over `Array.from(value)` and over `value.split('')`,
432
+ // and it is not type-aware, so it says that about a string too. `@typescript-eslint/no-misused-spread`
433
+ // - from `strictTypeChecked`, and type-aware - bans spreading a string, because `...` iterates code
434
+ // points and decomposes an emoji into its parts. Neither rule can see the other's case, and the
435
+ // unicorn rule has no option to exclude a string.
436
+ //
437
+ // What makes this different from a disagreement is that they meet inside a single `eslint --fix`.
438
+ // The fixer rewrites `Array.from(label)` to `[...label]`, and the same run then reports the text it
439
+ // just wrote. `ploaness format` therefore hands a developer a file it authored and rejects, on a
440
+ // line they did not write, with a message whose suggested repair is a suppression. A contradiction
441
+ // a person can walk around by choosing a different spelling is one thing; one the harness walks
442
+ // INTO on their behalf is another, and it is why this could not be left as guidance.
443
+ //
444
+ // `prefer-spread` yields, and the direction follows the accumulation paragraph above rather than the
445
+ // `Number.NaN` rule before it. That one was about style, where the two spellings do the same thing
446
+ // and only consistency is at stake. This is not: one rule is making a correctness claim about text a
447
+ // CMS stores - a name, a title, an editor's paragraph - out of type information the other one does
448
+ // not have. The uninformed rule does not get to overrule the informed one, and it certainly does not
449
+ // get to do so through a fixer.
450
+ //
451
+ // WHAT THIS COSTS, stated plainly because it reopens a door another spec was built to hold shut.
452
+ // `accumulator.concat([one])` is legal again, so the fold `immutable-accumulation.spec.ts` leaves
453
+ // open is now one good spelling of a sequential scan rather than the only one. The other three doors
454
+ // that spec names are unaffected: `functional/immutable-data` still rejects `push`,
455
+ // `functional/no-let` still rejects the loop binding, and Biome still does not re-ban the fold. The
456
+ // trade is a style guarantee for a correctness one, taken deliberately and in that direction.
457
+ 'unicorn/prefer-spread': 'off',
367
458
  // New in unicorn 73. It would expand every concise one-line `/** ... */` export doc into a
368
459
  // three-line block, and would also rewrite the `GENERATED AUTOMATICALLY BY PAYLOAD` /
369
460
  // `DO NOT MODIFY` headers that Payload writes into the `src/app/(payload)` scaffolding.
@@ -377,11 +468,25 @@ export const guidelineRules = {
377
468
  'jsdoc/require-jsdoc': 'off',
378
469
  'jsdoc/require-param': 'off',
379
470
  'jsdoc/require-returns': 'off',
471
+ // And require that a block which exists SAYS something. `require-jsdoc` asks only whether a block is
472
+ // present, so `/**\n *\n */` satisfied it while documenting nothing - a check nothing could fail,
473
+ // sitting under a rule whose whole purpose is a documenting comment. A consuming project shipped
474
+ // exactly that stub on a hook and it survived every gate until the file was rewritten for other
475
+ // reasons. This visits blocks that already exist rather than demanding new ones, so it closes the
476
+ // hole without widening the set of symbols that must be documented.
477
+ 'jsdoc/require-description': 'error',
380
478
  // No mocks - ban the mocking entry points and libraries build-wide.
381
479
  'no-restricted-properties': ['error', ...NO_MOCK_PROPERTIES],
480
+ // One setting carries both bans, because this key REPLACES rather than merges: a second
481
+ // `no-restricted-imports` anywhere would drop whichever list it did not restate.
382
482
  'no-restricted-imports': [
383
483
  'error',
384
- { paths: MOCKING_PACKAGES.map((name) => ({ name, message: NO_MOCKS_MESSAGE })) },
484
+ {
485
+ paths: [
486
+ ...MOCKING_PACKAGES.map((name) => ({ name, message: NO_MOCKS_MESSAGE })),
487
+ ...WEB_SIMULATION_PACKAGES.map((name) => ({ name, message: WEB_SIMULATION_MESSAGE })),
488
+ ],
489
+ },
385
490
  ],
386
491
  };
387
492
  export const vitestPlugin = vitest;
@@ -396,7 +501,12 @@ export const testIntegrityRules = {
396
501
  // sonarjs/assertions-in-tests is a less-configurable duplicate that does not, so it defers in
397
502
  // this scope.
398
503
  'sonarjs/assertions-in-tests': 'off',
399
- 'vitest/valid-expect': 'error', // `expect` is called correctly (awaited, matcher present).
504
+ // `expect` is called correctly (awaited, matcher present). `maxArgs: 2` because Vitest's second
505
+ // argument is the message it prints when the assertion fails, and in a loop or a table-driven case
506
+ // that message is the difference between knowing a case failed and knowing WHICH input broke it. The
507
+ // plugin's default of 1 already waves through a string or template literal there, so what it
508
+ // actually rejected was the identifier form - the one a table-driven case needs.
509
+ 'vitest/valid-expect': ['error', { maxArgs: 2 }],
400
510
  'vitest/no-standalone-expect': 'error', // assertions must live inside a test.
401
511
  'vitest/no-conditional-expect': 'error', // an assertion behind an `if` may never execute.
402
512
  'vitest/no-conditional-tests': 'error', // tests must not be defined conditionally.
@@ -409,11 +519,15 @@ export const testIntegrityRules = {
409
519
  /**
410
520
  * The framework idiom a spec is written in, which the production rules were never aimed at.
411
521
  *
412
- * Only idiom is relaxed. Every rule that carries a rule of the governing standard - the size caps, the
413
- * explicitness rules, the ban on a non-null assertion, the unsafe-any family - stays ON, because the
414
- * standard says test code passes the same static-analysis checks as production code. A relaxation that
415
- * made a test easier to write by making it less checked would exempt the suite from the contract it
416
- * exists to enforce.
522
+ * Only idiom is relaxed. Every rule that carries a rule of the governing standard - the explicitness
523
+ * rules, the ban on a non-null assertion, the unsafe-any family, and every size cap but one - stays ON,
524
+ * because the standard says test code passes the same static-analysis checks as production code. A
525
+ * relaxation that made a test easier to write by making it less checked would exempt the suite from the
526
+ * contract it exists to enforce.
527
+ *
528
+ * The one exception is `max-lines-per-function`, and it is a role distinction rather than a relaxation:
529
+ * the cap bounds a unit of logic, and a `describe` body is a list of independent declarations. The file
530
+ * cap still applies. See the entry itself for the argument.
417
531
  *
418
532
  * Shared by every shipped config rather than stated in each, because what earns the exemption is being a
419
533
  * SPEC rather than being a Payload application's spec. Stated twice it drifted: a library consumer's
@@ -430,6 +544,12 @@ export const testIdiomRules = {
430
544
  'unicorn/no-top-level-assignment-in-function': 'off', // the standard vitest beforeAll pattern.
431
545
  'unicorn/max-nested-calls': 'off', // expect(fn(arg(value))) assertions are idiomatic.
432
546
  'unicorn/numeric-separators-style': 'off', // fixtures use code points (0x2026); ungrouped reads better.
547
+ // A `describe` body is a list of independent declarations rather than a unit of logic: nothing flows
548
+ // between its tests, so reading the twelfth needs none of the first eleven, and the cognitive load the
549
+ // cap bounds does not accumulate. Splitting one to satisfy the cap invents a group name that marks a
550
+ // linter boundary rather than a real one. A spec file that genuinely IS too long is still caught, by
551
+ // `max-lines`, which stays on.
552
+ 'max-lines-per-function': 'off',
433
553
  };
434
554
  // Property tests must stay deterministic: one seed decides the whole suite, and a per-call override
435
555
  // reintroduces a gate whose verdict changes between two runs of an unchanged repository, which is the
@@ -543,6 +663,7 @@ const NO_TEST_ORDER_ESCAPE = [
543
663
  export const testSuiteSyntaxRules = {
544
664
  'no-restricted-syntax': [
545
665
  ...NO_INHERITANCE,
666
+ ...SECURITY_RESTRICTIONS,
546
667
  ...NO_LITERAL_ASSERTIONS,
547
668
  ...NO_FAST_CHECK_SEED,
548
669
  ...NO_TEST_ORDER_ESCAPE,
@@ -1 +1 @@
1
- {"version":3,"file":"eslint-core.js","sourceRoot":"","sources":["../src/eslint-core.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,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IACP,EAAE,qBAAqB,EAAE,CAAC,eAAe,EAAE,GAAG,SAAS,CAAC,EAAE;CAC3D,CAAA;AAED,uGAAuG;AACvG,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,KAAwB,EACxB,OAA0B,EACT,EAAE,CAAC,CAAC;IACrB,KAAK;IACL,OAAO;IACP,OAAO,EAAE,EAAE,UAAU,EAAE;IACvB,KAAK,EAAE;QACL,mBAAmB,EAAE,OAAO;QAC5B,2BAA2B,EAAE,aAAa,CAAC,EAAE,CAAC;KAC/C;CACF,CAAC,CAAA;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAoB,EAAE,CAAC,CAAC;IACxD,KAAK,EAAE,CAAC,kBAAkB,CAAC;IAC3B,uGAAuG;IACvG,sGAAsG;IACtG,uGAAuG;IACvG,wGAAwG;IACxG,OAAO,EAAE,EAAE,UAAU,EAAE;IACvB,KAAK,EAAE;QACL,2BAA2B,EAAE,aAAa,CAAC,CAAC,mBAAmB,EAAE,eAAe,CAAC,CAAC;KACnF;CACF,CAAC,CAAA;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAoB,EAAE,CAAC,CAAC;IAC1D,KAAK,EAAE,CAAC,UAAU,CAAC;IACnB,qGAAqG;IACrG,mCAAmC;IACnC,OAAO,EAAE,EAAE,UAAU,EAAE;IACvB,KAAK,EAAE;QACL,2BAA2B,EAAE,aAAa,CAAC,CAAC,mBAAmB,CAAC,CAAC;KAClE;CACF,CAAC,CAAA;AAGF,+FAA+F;AAC/F,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EAClB,uBAAuB,EACvB,oBAAoB,GACrB,CAAA"}
@@ -0,0 +1,8 @@
1
+ /** One `no-restricted-syntax` entry: the shape to reject, and what to say when it appears. */
2
+ export interface RestrictedSyntax {
3
+ readonly selector: string;
4
+ readonly message: string;
5
+ }
6
+ /** Output-boundary syntax every composed configuration must retain. */
7
+ export declare const SECURITY_RESTRICTIONS: readonly RestrictedSyntax[];
8
+ //# sourceMappingURL=eslint-security.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eslint-security.d.ts","sourceRoot":"","sources":["../src/eslint-security.ts"],"names":[],"mappings":"AAMA,8FAA8F;AAC9F,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB;AAkED,uEAAuE;AACvE,eAAO,MAAM,qBAAqB,EAAE,SAAS,gBAAgB,EAG5D,CAAA"}
@@ -0,0 +1,47 @@
1
+ const SENSITIVE_NAME = '/^(?:password|token|secret|apiKey|privateKey|creditCard|ssn|cvv)$/';
2
+ const CONSOLE_CALL = "CallExpression[callee.type='MemberExpression']" +
3
+ "[callee.object.name='console']" +
4
+ '[callee.property.name=/^(?:log|error|warn|info|debug|trace)$/]';
5
+ const SENSITIVE_LOG_MESSAGE = '[sensitive-data-logged] Do not write a credential-bearing value directly to console output; ' +
6
+ 'remove it or pass an explicitly redacted value.';
7
+ const sensitiveLog = (suffix) => ({
8
+ selector: `${CONSOLE_CALL}${suffix}`,
9
+ message: SENSITIVE_LOG_MESSAGE,
10
+ });
11
+ const SENSITIVE_LOGGING = [
12
+ sensitiveLog(` > Identifier[name=${SENSITIVE_NAME}]`),
13
+ sensitiveLog(` > MemberExpression[property.name=${SENSITIVE_NAME}]`),
14
+ sensitiveLog(` > ChainExpression MemberExpression[property.name=${SENSITIVE_NAME}]`),
15
+ sensitiveLog(` > TemplateLiteral Identifier[name=${SENSITIVE_NAME}]`),
16
+ sensitiveLog(` > TemplateLiteral MemberExpression[property.name=${SENSITIVE_NAME}]`),
17
+ sensitiveLog(` > BinaryExpression Identifier[name=${SENSITIVE_NAME}]`),
18
+ sensitiveLog(` > BinaryExpression MemberExpression[property.name=${SENSITIVE_NAME}]`),
19
+ sensitiveLog(` > ObjectExpression Property[shorthand=true] > Identifier[name=${SENSITIVE_NAME}]`),
20
+ sensitiveLog(` > ObjectExpression Property > MemberExpression[property.name=${SENSITIVE_NAME}]`),
21
+ ];
22
+ const INTERNAL_ERROR = 'MemberExpression[object.name=/^(?:err|error|exception)$/]' +
23
+ '[property.name=/^(?:message|stack)$/]';
24
+ const ERROR_PROPERTY = 'Property[key.name=/^(?:error|message)$/], Property[key.value=/^(?:error|message)$/]';
25
+ const JSON_RESPONSE = "CallExpression[callee.type='MemberExpression']" +
26
+ '[callee.object.name=/^(?:Response|NextResponse)$/]' +
27
+ "[callee.property.name='json']";
28
+ const ERROR_RESPONSE_MESSAGE = '[leaks-error-message] Do not return an internal error message or stack to a caller; log it ' +
29
+ 'server-side and return a generic or explicitly sanitised public error.';
30
+ const errorResponse = (selector) => ({
31
+ selector,
32
+ message: ERROR_RESPONSE_MESSAGE,
33
+ });
34
+ const INTERNAL_ERROR_RESPONSES = [
35
+ errorResponse(`${JSON_RESPONSE} > ObjectExpression > :matches(${ERROR_PROPERTY}) > ${INTERNAL_ERROR}`),
36
+ errorResponse(`${JSON_RESPONSE} > ${INTERNAL_ERROR}`),
37
+ errorResponse(`ReturnStatement > ObjectExpression > :matches(${ERROR_PROPERTY}) > ${INTERNAL_ERROR}`),
38
+ errorResponse(`ArrowFunctionExpression[expression=true] > ObjectExpression > ` +
39
+ `:matches(${ERROR_PROPERTY}) > ${INTERNAL_ERROR}`),
40
+ errorResponse(`NewExpression[callee.name='Response'] > ${INTERNAL_ERROR}`),
41
+ ];
42
+ /** Output-boundary syntax every composed configuration must retain. */
43
+ export const SECURITY_RESTRICTIONS = [
44
+ ...SENSITIVE_LOGGING,
45
+ ...INTERNAL_ERROR_RESPONSES,
46
+ ];
47
+ //# sourceMappingURL=eslint-security.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eslint-security.js","sourceRoot":"","sources":["../src/eslint-security.ts"],"names":[],"mappings":"AAYA,MAAM,cAAc,GAAW,oEAA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AAa,CACX,iDAAiD,cAAc,OAAO,cAAc,EAAE,CACvF;IACD,aAAa,CACX,gEAAgE;QAC9D,YAAY,cAAc,OAAO,cAAc,EAAE,CACpD;IACD,aAAa,CAAC,2CAA2C,cAAc,EAAE,CAAC;CAC3E,CAAA;AAED,uEAAuE;AACvE,MAAM,CAAC,MAAM,qBAAqB,GAAgC;IAChE,GAAG,iBAAiB;IACpB,GAAG,wBAAwB;CAC5B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"eslint.d.ts","sourceRoot":"","sources":["../src/eslint.ts"],"names":[],"mappings":";AA0DA,wBA0PC"}
1
+ {"version":3,"file":"eslint.d.ts","sourceRoot":"","sources":["../src/eslint.ts"],"names":[],"mappings":";AA6DA,wBA4SC"}
package/dist/eslint.js CHANGED
@@ -10,7 +10,8 @@
10
10
  //
11
11
  // Philosophy: maximum-explicit. The build should be hard to satisfy by accident, so that code which
12
12
  // passes is verbose, explicit and readable by construction.
13
- import { REEXPORT_CONFIG_FILES } from '@ploaness/governance';
13
+ import nextPlugin from '@next/eslint-plugin-next';
14
+ import { ENVIRONMENT_READ_EXEMPTIONS, REEXPORT_CONFIG_FILES } from '@ploaness/governance';
14
15
  //
15
16
  // The framework-neutral half - the caps, the explicitness rules, the naming ban, the suppression
16
17
  // discipline, the mock ban - lives in ./eslint-core.js and is shared with the ploaness repository's own
@@ -18,7 +19,8 @@ import { REEXPORT_CONFIG_FILES } from '@ploaness/governance';
18
19
  // collection configs, the environment module, the a11y layer, and the test-integrity block.
19
20
  import jsxA11y from 'eslint-plugin-jsx-a11y';
20
21
  import testingLibrary from 'eslint-plugin-testing-library';
21
- import { baseLayers, compose, guidelineRules, immutabilityBlock, NO_INHERITANCE, NO_MOCK_PROPERTIES, NO_NETWORK_GUARD_ESCAPE, prettierLast, processConfigBlock, specEnvironmentBlock, testIdiomRules, testIntegrityRules, testSuiteSyntaxRules, typeAwareParsing, vitestPlugin, } from './eslint-core.js';
22
+ import { baseLayers, compose, guidelineRules, immutabilityBlock, NO_INHERITANCE, NO_MOCK_PROPERTIES, NO_NETWORK_GUARD_ESCAPE, prettierLast, processConfigBlock, specEnvironmentBlock, testIdiomRules, testIntegrityRules, testSuiteSyntaxRules, typeAwareParsing, vitestPlugin, withoutWarnings, } from './eslint-core.js';
23
+ import { SECURITY_RESTRICTIONS } from './eslint-security.js';
22
24
  import { projectSettings as settings } from './project-settings.js';
23
25
  const NO_INLINE_CONFIG_FUNCTIONS_SELECTOR = 'ArrowFunctionExpression, FunctionExpression';
24
26
  const NO_INLINE_CONFIG_FUNCTIONS_MESSAGE = 'No inline functions in collection/global/field/block configs. Define behavior (access, hooks, ' +
@@ -110,11 +112,43 @@ specEnvironmentBlock(),
110
112
  // This is pure static analysis, so it is deterministic (never flaky) and the baseline every site
111
113
  // needs. What it CANNOT see (it does not render): color contrast, focus order, real keyboard
112
114
  // navigation - those need a browser and are covered by axe-in-e2e (see AGENTS.md testing policy).
115
+ //
116
+ // This block also settles one rule for the whole application configuration. Biome ships a port of
117
+ // `no-noninteractive-element-to-interactive-role`, and it is `off` in `biome.json` because it
118
+ // contradicts Biome's own `useSemanticElements`: that rule requires `role="grid"` to sit on a
119
+ // `<table>`, which is what the ARIA pattern documents, and the port then refuses the table carrying
120
+ // it. No markup satisfies both, the port accepts no options, and the cost fell on any consumer
121
+ // building an accessible grid, treegrid, listbox or tab-strip on the correct native element - a
122
+ // suppression each, spent on a disagreement between two rules rather than on a hard case. The
123
+ // recommended options mounted here are the same check with the allowances the port lacks: they
124
+ // name `table: ['grid']`, `td: ['gridcell']` and `li: ['row']` explicitly, so nothing is lost.
113
125
  {
114
126
  files: ['**/*.tsx'],
115
127
  plugins: { 'jsx-a11y': jsxA11y },
116
128
  rules: jsxA11y.flatConfigs.recommended.rules,
117
129
  },
130
+ // ── Core Web Vitals: the static half of a measurement no gate can take. A vitals score, like a
131
+ // Lighthouse score, moves between two runs of an unchanged tree and would measure `next dev`'s
132
+ // on-demand compiler rather than the application, which is why neither is a gate. The CAUSES of a
133
+ // bad score are static and known - a raw `<img>` where `next/image` would size and lazy-load it, a
134
+ // synchronous `<script>`, an `<a>` for an internal route, a Google font with no `display` - and
135
+ // Next publishes exactly that list as its core-web-vitals preset. The preset is mounted whole and
136
+ // raised through `withoutWarnings`, because it leaves 14 of its 22 rules at `warn` and a warning is
137
+ // not a verdict here; nothing is turned off, so this is the preset by name and provenance rather
138
+ // than a hand copy of it that would go stale on the next Next.
139
+ //
140
+ // `src/**` only, because the rules judge what the application renders and serves. A component
141
+ // test rendering an `<img>` under jsdom serves nothing, for the same reason test code is not held
142
+ // to the bundle budget. `.ts` is in beside `.tsx` because three of the rules are not JSX rules at
143
+ // all: a module variable assigned, a `document` imported into a page, a relative
144
+ // `location.assign`.
145
+ //
146
+ // The version is tied to the `next` pin in pins.json - `pins-agree.spec.ts` holds the joint -
147
+ // since the two are published together and the rules describe one release's semantics.
148
+ {
149
+ ...withoutWarnings(nextPlugin.configs['core-web-vitals']),
150
+ files: ['src/**/*.ts', 'src/**/*.tsx'],
151
+ },
118
152
  // ── Generated Payload mount only: relax type-safety the framework legitimately defeats.
119
153
  // Scoped to `src/app/(payload)/**` (the create-payload-app scaffold + API re-exports), NOT all
120
154
  // of `src/app/**` - `(frontend)`, `oauth`, and any route you hand-write are real code and stay
@@ -159,6 +193,7 @@ specEnvironmentBlock(),
159
193
  rules: {
160
194
  'no-restricted-syntax': [
161
195
  ...NO_INHERITANCE,
196
+ ...SECURITY_RESTRICTIONS,
162
197
  {
163
198
  selector: NO_INLINE_CONFIG_FUNCTIONS_SELECTOR,
164
199
  message: NO_INLINE_CONFIG_FUNCTIONS_MESSAGE,
@@ -177,7 +212,7 @@ specEnvironmentBlock(),
177
212
  // `environment.ts` could have validated.
178
213
  {
179
214
  files: ['src/**/*.ts'],
180
- ignores: ['src/lib/environment.ts', 'src/proxy.ts'],
215
+ ignores: [...ENVIRONMENT_READ_EXEMPTIONS],
181
216
  rules: {
182
217
  // `NO_MOCK_PROPERTIES` is spread in beside the env rule because this key REPLACES the base
183
218
  // setting rather than adding to it - naming only the env restriction here switched the
@@ -223,10 +258,22 @@ specEnvironmentBlock(),
223
258
  // test must contain a real assertion. The testing-library rules keep component tests user-facing
224
259
  // (query by role/text); assertions use the @testing-library/jest-dom matchers, which a project
225
260
  // registers in a `vitest.setup.ts` of its own if it writes component tests.
226
- // Scoped to the Vitest suite (`tests/int` + `tests/unit`); Playwright e2e specs use a different
227
- // runner (and its own unconditional `forbidOnly`), so these Vitest/RTL rules do not apply there.
261
+ // Scoped to every directory `vitest.ts` collects - `tests/int`, `tests/unit` and `tests/component`
262
+ // - because a suite the runner runs and the linter does not reach is a suite held to no standard.
263
+ // The component directory was missed for exactly that reason, and the rules that name it in the
264
+ // sentence above were the ones it escaped: a consumer's component specs ran under a jsdom suite
265
+ // this harness mandates while every `testing-library/*` rule, `no-disabled-tests`,
266
+ // `no-commented-out-tests` and the literal-assertion ban passed over them. Playwright e2e specs
267
+ // use a different runner, with its own unconditional `forbidOnly`, so these rules stay out of it.
228
268
  {
229
- files: ['tests/int/**/*.ts', 'tests/int/**/*.tsx', 'tests/unit/**/*.ts', 'tests/unit/**/*.tsx'],
269
+ files: [
270
+ 'tests/int/**/*.ts',
271
+ 'tests/int/**/*.tsx',
272
+ 'tests/unit/**/*.ts',
273
+ 'tests/unit/**/*.tsx',
274
+ 'tests/component/**/*.ts',
275
+ 'tests/component/**/*.tsx',
276
+ ],
230
277
  plugins: { vitest: vitestPlugin, 'testing-library': testingLibrary },
231
278
  rules: {
232
279
  // A test must actually run and actually assert. The rules live in eslint-core.js, because the
@@ -253,7 +300,11 @@ specEnvironmentBlock(),
253
300
  {
254
301
  files: ['tests/e2e/**/*.ts', 'tests/e2e/**/*.tsx'],
255
302
  rules: {
256
- 'no-restricted-syntax': [...NO_INHERITANCE, ...NO_NETWORK_GUARD_ESCAPE],
303
+ 'no-restricted-syntax': [
304
+ ...NO_INHERITANCE,
305
+ ...SECURITY_RESTRICTIONS,
306
+ ...NO_NETWORK_GUARD_ESCAPE,
307
+ ],
257
308
  },
258
309
  },
259
310
  // ── Formatting is Biome's job - disable every conflicting stylistic rule (must stay last) ────
@@ -1 +1 @@
1
- {"version":3,"file":"eslint.js","sourceRoot":"","sources":["../src/eslint.ts"],"names":[],"mappings":"AAAA,YAAY;AACZ,EAAE;AACF,iFAAiF;AACjF,EAAE;AACF,+FAA+F;AAC/F,gGAAgG;AAChG,mGAAmG;AACnG,0FAA0F;AAC1F,4FAA4F;AAC5F,EAAE;AACF,oGAAoG;AACpG,4DAA4D;AAE5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,EAAE;AACF,iGAAiG;AACjG,wGAAwG;AACxG,kGAAkG;AAClG,4FAA4F;AAC5F,OAAO,OAAO,MAAM,wBAAwB,CAAA;AAC5C,OAAO,cAAc,MAAM,+BAA+B,CAAA;AAC1D,OAAO,EACL,UAAU,EACV,OAAO,EAEP,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,uBAAuB,EACvB,YAAY,EACZ,kBAAkB,EAClB,oBAAoB,EACpB,cAAc,EACd,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,YAAY,GACb,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,eAAe,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAEnE,MAAM,mCAAmC,GAAW,6CAA6C,CAAA;AACjG,MAAM,kCAAkC,GACtC,gGAAgG;IAChG,uFAAuF,CAAA;AAEzF,sFAAsF;AACtF,kGAAkG;AAClG,oGAAoG;AACpG,0EAA0E;AAC1E,EAAE;AACF,oGAAoG;AACpG,sEAAsE;AACtE,MAAM,mBAAmB,GAAoB;IAC3C,KAAK,EAAE,CAAC,GAAG,qBAAqB,CAAC;IACjC,KAAK,EAAE,EAAE,4BAA4B,EAAE,KAAK,EAAE;CAC/C,CAAA;AAED,eAAe,OAAO;AACpB,+FAA+F;AAC/F;IACE,OAAO,EA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AO,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAE;IACpE,KAAK,EAAE;QACL,8FAA8F;QAC9F,uDAAuD;QACvD,GAAG,kBAAkB;QACrB,GAAG,oBAAoB;QAEvB,0EAA0E;QAC1E,qCAAqC,EAAE,OAAO;QAC9C,mCAAmC,EAAE,OAAO;QAC5C,uCAAuC,EAAE,OAAO;QAChD,8BAA8B,EAAE,OAAO,EAAE,mDAAmD;QAC5F,oCAAoC,EAAE,OAAO,EAAE,8CAA8C;QAC7F,+BAA+B,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;QACnD,gCAAgC,EAAE,OAAO,EAAE,qDAAqD;QAChG,wCAAwC,EAAE,OAAO;QACjD,uCAAuC,EAAE,OAAO;QAChD,mCAAmC,EAAE,OAAO,EAAE,wCAAwC;QACtF,iDAAiD,EAAE,OAAO;KAC3D;CACF;AAED,qGAAqG;AACrG,uGAAuG;AACvG,6EAA6E;AAC7E;IACE,KAAK,EAAE,CAAC,mBAAmB,EAAE,oBAAoB,CAAC;IAClD,KAAK,EAAE;QACL,sBAAsB,EAAE;YACtB,GAAG,cAAc;YACjB,GAAG,qBAAqB;YACxB,GAAG,uBAAuB;SAC3B;KACF;CACF;AAED,gGAAgG;AAChG,mBAAmB,EACnB,YAAY,CACb,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"project-settings.d.ts","sourceRoot":"","sources":["../src/project-settings.ts"],"names":[],"mappings":"AAOA,OAAO,EAAgB,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAelE,eAAO,MAAM,eAAe,EAAE,QAA0C,CAAA"}
1
+ {"version":3,"file":"project-settings.d.ts","sourceRoot":"","sources":["../src/project-settings.ts"],"names":[],"mappings":"AAeA,OAAO,EAIL,KAAK,QAAQ,EACd,MAAM,sBAAsB,CAAA;AA6C7B,eAAO,MAAM,eAAe,EAAE,QAAqC,CAAA"}
@@ -3,21 +3,57 @@
3
3
  // Three shipped configurations need them - the Vitest config, the Playwright config, and the constants
4
4
  // the managed accessibility sweep imports - and none of them may carry a second copy of this reader. A
5
5
  // value the harness both writes and judges is declared once; the same holds for the value it reads.
6
+ //
7
+ // In a workspace the answer is TWO blocks rather than one. A member declares its own settings and the
8
+ // repository root declares the ones every member inherits, and the CLI layers them through
9
+ // `readMemberSettings` before any gate sees them. Reading only the member's block here left the
10
+ // shipped configurations disagreeing with every gate about the same project: a skip route declared at
11
+ // the root reached the gates and not the sweep, so the crawl followed a prefix it had been told to
12
+ // leave alone. The layering is one-directional, exactly as it is in the CLI - a list adds, a threshold
13
+ // is honoured only when stricter - so a member can never widen what the root set.
6
14
  import { readFileSync } from 'node:fs';
7
15
  import path from 'node:path';
8
- import { readSettings } from '@ploaness/governance';
16
+ import { ploanessBlock, readMemberSettings, readSettings, } from '@ploaness/governance';
9
17
  // A project whose package.json cannot be read gets the defaults, which are the strict end of every
10
18
  // setting. Failing to parse must never be the thing that loosens a threshold.
11
19
  // `unknown` rather than the parse's own `any`: `readSettings` narrows every field it reads, so handing
12
20
  // it an `any` would only move the narrowing somewhere nothing checks it.
13
- const readPackageJson = () => {
14
- const manifest = path.join(process.cwd(), 'package.json');
21
+ const readPackageJson = (directory) => {
15
22
  try {
16
- return JSON.parse(readFileSync(manifest, 'utf8'));
23
+ return JSON.parse(readFileSync(path.join(directory, 'package.json'), 'utf8'));
17
24
  }
18
25
  catch {
19
26
  return {};
20
27
  }
21
28
  };
22
- export const projectSettings = readSettings(readPackageJson());
29
+ // What marks the repository root of a workspace. `pnpm-workspace.yaml` rather than `.git`, because it
30
+ // is the file that makes a directory a workspace root at all, and because a member checked out on its
31
+ // own is then correctly read as its own root rather than inheriting from whatever encloses it.
32
+ const WORKSPACE_MARKER = 'pnpm-workspace.yaml';
33
+ // Upwards from the member until the marker is found or the filesystem root is reached. Recursive
34
+ // rather than a loop, because this repository bans the mutable binding a loop would need.
35
+ const workspaceRootAbove = (directory) => {
36
+ const parent = path.dirname(directory);
37
+ if (parent === directory) {
38
+ return undefined;
39
+ }
40
+ try {
41
+ readFileSync(path.join(parent, WORKSPACE_MARKER), 'utf8');
42
+ return parent;
43
+ }
44
+ catch {
45
+ return workspaceRootAbove(parent);
46
+ }
47
+ };
48
+ const settingsFor = (member) => {
49
+ const own = readPackageJson(member);
50
+ const repositoryRoot = workspaceRootAbove(member);
51
+ if (repositoryRoot === undefined) {
52
+ // The ordinary case: one package, which is its own repository. Layering a block onto itself would
53
+ // append every additive list to a copy of itself rather than leaving it alone.
54
+ return readSettings(own);
55
+ }
56
+ return readMemberSettings(ploanessBlock(readPackageJson(repositoryRoot)), ploanessBlock(own));
57
+ };
58
+ export const projectSettings = settingsFor(process.cwd());
23
59
  //# sourceMappingURL=project-settings.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"project-settings.js","sourceRoot":"","sources":["../src/project-settings.ts"],"names":[],"mappings":"AAAA,uGAAuG;AACvG,EAAE;AACF,uGAAuG;AACvG,uGAAuG;AACvG,oGAAoG;AACpG,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAE,YAAY,EAAiB,MAAM,sBAAsB,CAAA;AAElE,mGAAmG;AACnG,8EAA8E;AAC9E,uGAAuG;AACvG,yEAAyE;AACzE,MAAM,eAAe,GAAG,GAAY,EAAE;IACpC,MAAM,QAAQ,GAAW,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,CAAC,CAAA;IACjE,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAA;IACnD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAA;IACX,CAAC;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,eAAe,GAAa,YAAY,CAAC,eAAe,EAAE,CAAC,CAAA"}
1
+ {"version":3,"file":"project-settings.js","sourceRo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IACnC,CAAC;AACH,CAAC,CAAA;AAED,MAAM,WAAW,GAAG,CAAC,MAAc,EAAY,EAAE;IAC/C,MAAM,GAAG,GAAY,eAAe,CAAC,MAAM,CAAC,CAAA;IAC5C,MAAM,cAAc,GAAuB,kBAAkB,CAAC,MAAM,CAAC,CAAA;IACrE,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;QACjC,kGAAkG;QAClG,+EAA+E;QAC/E,OAAO,YAAY,CAAC,GAAG,CAAC,CAAA;IAC1B,CAAC;IACD,OAAO,kBAAkB,CAAC,aAAa,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC,CAAA;AAC/F,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,eAAe,GAAa,WAAW,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ploaness/config",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Analyzer and tool configurations owned by ploaness: ESLint, Biome, TypeScript, Vitest, Stylelint, dependency-cruiser, knip.",
5
5
  "license": "MIT",
6
6
  "author": "Herman Ciechanowiec <herman@ciechanowiec.eu>",
@@ -78,8 +78,9 @@
78
78
  "@axe-core/playwright": "4.13.0",
79
79
  "@eslint-community/eslint-plugin-eslint-comments": "4.7.2",
80
80
  "@eslint/js": "10.0.1",
81
+ "@next/eslint-plugin-next": "16.3.4",
81
82
  "@playwright/test": "1.62.1",
82
- "@ploaness/governance": "1.0.0",
83
+ "@ploaness/governance": "1.1.0",
83
84
  "@testing-library/jest-dom": "7.0.1",
84
85
  "@testing-library/react": "16.3.3",
85
86
  "@testing-library/user-event": "14.6.6",
@@ -93,12 +94,12 @@
93
94
  "eslint-plugin-regexp": "3.2.0",
94
95
  "eslint-plugin-sonarjs": "4.2.0",
95
96
  "eslint-plugin-testing-library": "7.16.2",
96
- "eslint-plugin-unicorn": "73.0.0",
97
+ "eslint-plugin-unicorn": "74.0.0",
97
98
  "fast-check": "4.9.0",
98
- "globals": "17.11.0",
99
+ "globals": "17.12.0",
99
100
  "jsdom": "30.0.1",
100
101
  "stylelint-config-standard": "40.0.0",
101
- "typescript-eslint": "8.68.0",
102
+ "typescript-eslint": "8.69.0",
102
103
  "vitest": "4.1.11"
103
104
  },
104
105
  "engines": {
package/pins.json CHANGED
@@ -22,7 +22,7 @@
22
22
  "requiredFor": ["payload", "application"],
23
23
  "why": "What any Next application renders with, whether or not Payload is mounted inside it. A public frontend has the same build, the same client bundle and the same React version to agree about.",
24
24
  "versions": {
25
- "next": "16.3.3",
25
+ "next": "16.3.4",
26
26
  "react": "19.2.8",
27
27
  "react-dom": "19.2.8",
28
28
  "@types/react": "19.2.18",
package/stylelint.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "reportDescriptionlessDisables": true,
6
6
  "reportNeedlessDisables": true,
7
7
  "reportInvalidScopeDisables": true,
8
- "$comment": "at-rule-no-unknown lists the Tailwind v4 at-rules because they are a CSS dialect a Payload project may legitimately be written in, not a carve-out for one repository's files. A project that uses no Tailwind never writes one, so the list costs it nothing, and a typo such as @theem still fails. The whole list is named rather than the subset one project happened to need: a missing entry sends the next project back to a config file it is not allowed to own, which is the wall this list exists to remove. import-notation follows for the same reason and is not a relaxation - Tailwind v4 mandates the string form (@import \"tailwindcss\"), so the url form the standard config wants cannot be written at all; the rule still enforces one notation, and the one it enforces is now the one that can exist. lightness-notation and hue-degree-notation are set to the NUMBER form rather than turned off, for the same reason the at-rules above are listed: ploaness admits Tailwind deliberately, and the generator most Tailwind projects theme with writes oklch(1 0 0) rather than oklch(100% 0deg). Demanding the percentage form failed every such project on CSS it never hand-wrote. One notation is still enforced; it is now the one that can actually exist. selector-id-pattern keeps kebab-case for every id a project names and admits the double-underscore roots a framework mounts into - Next renders #__next, and a stylesheet that has to reach it cannot rename it. Turning the rule off would have surrendered the ids a project does choose.",
8
+ "$comment": "at-rule-no-unknown lists the Tailwind v4 at-rules because they are a CSS dialect a Payload project may legitimately be written in, not a carve-out for one repository's files. A project that uses no Tailwind never writes one, so the list costs it nothing, and a typo such as @theem still fails. The whole list is named rather than the subset one project happened to need: a missing entry sends the next project back to a config file it is not allowed to own, which is the wall this list exists to remove. at-rule-prelude-no-invalid has its own ignore list, so it retains the standard config's media allowance and adds apply: the CSS syntax patch models an abandoned proposal whose prelude is a dashed identifier, while Tailwind writes a utility list. Other at-rule preludes remain validated. import-notation follows for the same reason and is not a relaxation - Tailwind v4 mandates the string form (@import \"tailwindcss\"), so the url form the standard config wants cannot be written at all; the rule still enforces one notation, and the one it enforces is now the one that can exist. lightness-notation and hue-degree-notation are set to the NUMBER form rather than turned off, for the same reason the at-rules above are listed: ploaness admits Tailwind deliberately, and the generator most Tailwind projects theme with writes oklch(1 0 0) rather than oklch(100% 0deg). Demanding the percentage form failed every such project on CSS it never hand-wrote. One notation is still enforced; it is now the one that can actually exist. selector-id-pattern keeps kebab-case for every id a project names and admits the double-underscore roots a framework mounts into - Next renders #__next, and a stylesheet that has to reach it cannot rename it. Turning the rule off would have surrendered the ids a project does choose.",
9
9
  "rules": {
10
10
  "at-rule-no-unknown": [
11
11
  true,
@@ -25,6 +25,7 @@
25
25
  ]
26
26
  }
27
27
  ],
28
+ "at-rule-prelude-no-invalid": [true, { "ignoreAtRules": ["media", "apply"] }],
28
29
  "import-notation": "string",
29
30
  "selector-pseudo-class-no-unknown": [
30
31
  true,