@objectstack/lint 12.4.0 → 12.6.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/dist/index.cjs +18 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +18 -6
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -430,7 +430,6 @@ function validateStackExpressions(stack) {
|
|
|
430
430
|
|
|
431
431
|
// src/validate-list-view-mode.ts
|
|
432
432
|
var LIST_VIEW_FILTERS_IN_VIEWS_MODE = "list-view-filters-in-views-mode";
|
|
433
|
-
var FORBIDDEN_FIELDS = ["userFilters", "quickFilters"];
|
|
434
433
|
function asArray3(v) {
|
|
435
434
|
if (Array.isArray(v)) return v;
|
|
436
435
|
if (v && typeof v === "object") {
|
|
@@ -444,17 +443,30 @@ function asArray3(v) {
|
|
|
444
443
|
function scanView(view, where, path, out) {
|
|
445
444
|
if (!view || typeof view !== "object") return;
|
|
446
445
|
const rec = view;
|
|
447
|
-
|
|
448
|
-
if (rec[field] == null) continue;
|
|
446
|
+
if (rec.quickFilters != null) {
|
|
449
447
|
out.push({
|
|
450
448
|
severity: "error",
|
|
451
449
|
rule: LIST_VIEW_FILTERS_IN_VIEWS_MODE,
|
|
452
450
|
where,
|
|
453
|
-
path: `${path}
|
|
454
|
-
message:
|
|
455
|
-
hint:
|
|
451
|
+
path: `${path}.quickFilters`,
|
|
452
|
+
message: '`quickFilters` is a page filters-mode control and is ignored on an object list view ("views" mode) \u2014 the ViewTabBar owns nav here.',
|
|
453
|
+
hint: 'Move `quickFilters` to a page list (InterfaceListPage, "filters" mode), or remove it. See ADR-0047.'
|
|
456
454
|
});
|
|
457
455
|
}
|
|
456
|
+
const uf = rec.userFilters;
|
|
457
|
+
if (uf && typeof uf === "object") {
|
|
458
|
+
const ufRec = uf;
|
|
459
|
+
if (ufRec.element === "tabs" || ufRec.tabs != null) {
|
|
460
|
+
out.push({
|
|
461
|
+
severity: "error",
|
|
462
|
+
rule: LIST_VIEW_FILTERS_IN_VIEWS_MODE,
|
|
463
|
+
where,
|
|
464
|
+
path: `${path}.userFilters`,
|
|
465
|
+
message: '`userFilters` with `element: "tabs"` is page-only and is ignored on an object list view ("views" mode) \u2014 it would collide with the ViewTabBar.',
|
|
466
|
+
hint: 'Use `listViews` for named presets on an object (each becomes a segmented tab), switch to `element: "dropdown"` for value chips, or move the `tabs` filter to a page list (InterfaceListPage, "filters" mode). See ADR-0047.'
|
|
467
|
+
});
|
|
468
|
+
}
|
|
469
|
+
}
|
|
458
470
|
}
|
|
459
471
|
function scanListViews(listViews, wherePrefix, pathPrefix, out) {
|
|
460
472
|
if (!listViews || typeof listViews !== "object") return;
|