mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 21:10:59 +00:00
A typed apiFetch wrapper owns the envelope unwrap, the ok-check and the error read for every client call — two hundred call sites across the app migrate onto it and a lint rule keeps raw api fetches out for good. The legacy timezone helpers fold into the tz module and test fixtures drop personal names.
23 lines
770 B
JavaScript
23 lines
770 B
JavaScript
/**
|
|
* @fileoverview Aggregates the project-local `healthlog/*` ESLint rules
|
|
* into a single plugin object for the flat config.
|
|
*
|
|
* - `queryKey-factory` — bare-array queryKey / mutationKey bypass guard.
|
|
* - `safe-fetch-required` — outbound fetch must route through safeFetch.
|
|
* - `api-fetch-required` — client /api/ calls must route through apiFetch.
|
|
*/
|
|
|
|
"use strict";
|
|
|
|
const queryKeyFactory = require("./queryKey-factory.js");
|
|
const safeFetchRequired = require("./safe-fetch-required.js");
|
|
const apiFetchRequired = require("./api-fetch-required.js");
|
|
|
|
module.exports = {
|
|
rules: {
|
|
"queryKey-factory": queryKeyFactory.rules["queryKey-factory"],
|
|
"safe-fetch-required": safeFetchRequired,
|
|
"api-fetch-required": apiFetchRequired,
|
|
},
|
|
};
|