@hublo/sentinel 1.6.0-alpha.1 → 1.6.0-alpha.3

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.
@@ -6,7 +6,7 @@ import {
6
6
  readNxProjectName,
7
7
  readOwnPackage,
8
8
  readProjectPackageJson
9
- } from "./chunk-JRZI5IIN.js";
9
+ } from "./chunk-ZNANJEMK.js";
10
10
  import {
11
11
  matchesTsconfigPattern
12
12
  } from "./chunk-O7REVMOC.js";
@@ -785,9 +785,9 @@ function resolveVitest(cwd) {
785
785
 
786
786
  // src/roles/test/adapters/vitest/vitest.adapter.ts
787
787
  import { spawnSync } from "node:child_process";
788
- import { existsSync as existsSync25, mkdtempSync as mkdtempSync3, readFileSync as readFileSync25, writeFileSync as writeFileSync2 } from "node:fs";
788
+ import { existsSync as existsSync25, mkdtempSync as mkdtempSync3, readFileSync as readFileSync26, writeFileSync as writeFileSync2 } from "node:fs";
789
789
  import { tmpdir as tmpdir3 } from "node:os";
790
- import { isAbsolute as isAbsolute2, join as join31, relative as relative7, resolve as resolve10 } from "node:path";
790
+ import { isAbsolute as isAbsolute2, join as join32, relative as relative7, resolve as resolve10 } from "node:path";
791
791
 
792
792
  // src/core/config/tool-args.ts
793
793
  import { existsSync as existsSync6 } from "node:fs";
@@ -5935,7 +5935,7 @@ function plan(context) {
5935
5935
 
5936
5936
  // src/roles/test/written-file-linter.ts
5937
5937
  import { existsSync as existsSync24 } from "node:fs";
5938
- import { join as join30 } from "node:path";
5938
+ import { join as join31 } from "node:path";
5939
5939
 
5940
5940
  // src/roles/lint/module-baseline.ts
5941
5941
  import { existsSync as existsSync20, readFileSync as readFileSync22 } from "node:fs";
@@ -6706,6 +6706,10 @@ function lintTarget() {
6706
6706
  return { cache: true, inputs: ["default", "^default", `{projectRoot}/${LINT_CONFIG_FILE}`] };
6707
6707
  }
6708
6708
 
6709
+ // src/roles/lint/read-adoption.ts
6710
+ import { readFileSync as readFileSync25 } from "node:fs";
6711
+ import { join as join29 } from "node:path";
6712
+
6709
6713
  // src/core/config/read-adoption.ts
6710
6714
  import { existsSync as existsSync22, readFileSync as readFileSync24 } from "node:fs";
6711
6715
  import { join as join28 } from "node:path";
@@ -6789,7 +6793,8 @@ function readAdoption(cwd, options) {
6789
6793
  const preset = normaliseExtends(parsed.extends).find((entry) => options.presetPattern.test(entry)) ?? null;
6790
6794
  if (preset === null) return NOT_ADOPTED2(target.path);
6791
6795
  const settings = options.settingsKey === null ? parsed : parsed[options.settingsKey];
6792
- const drift = presetOwnedKeys(settings, options.permitted, options.presetOwns?.(preset));
6796
+ const owned = presetOwnedKeys(settings, options.permitted, options.presetOwns?.(preset));
6797
+ const drift = options.refineDrift !== void 0 && settings !== void 0 ? options.refineDrift(owned, settings, preset) : owned;
6793
6798
  return {
6794
6799
  configFile: target.path,
6795
6800
  preset,
@@ -6800,24 +6805,2687 @@ function readAdoption(cwd, options) {
6800
6805
  };
6801
6806
  }
6802
6807
 
6803
- // src/roles/lint/read-adoption.ts
6804
- function readLintAdoption(cwd) {
6805
- return readAdoption(cwd, {
6806
- candidates: [LINT_CONFIG_FILE],
6807
- markers: ["@hublo/sentinel/oxlint/"],
6808
- fallback: LINT_CONFIG_FILE,
6809
- presetPattern: SENTINEL_LINT_PRESET,
6810
- // Drift for lint is any TOP-LEVEL key beyond `extends`, so the settings the shared
6811
- // reader inspects are the config's own root rather than a nested options object.
6812
- settingsKey: null,
6813
- permitted: PERMITTED_LOCAL_KEYS2
6814
- });
6808
+ // src/roles/lint/module-own-config.ts
6809
+ import { isDeepStrictEqual } from "node:util";
6810
+ var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
6811
+ function pluginKey(entry) {
6812
+ if (typeof entry === "string") return entry;
6813
+ if (isRecord(entry) && typeof entry.name === "string") return entry.name;
6814
+ if (isRecord(entry) && typeof entry.specifier === "string") return entry.specifier;
6815
+ return void 0;
6816
+ }
6817
+ function governedRuleNames(preset) {
6818
+ return /* @__PURE__ */ new Set([
6819
+ ...Object.keys(preset.rules),
6820
+ ...(preset.overrides ?? []).flatMap((override) => Object.keys(override.rules))
6821
+ ]);
6822
+ }
6823
+ function governedRules(preset) {
6824
+ const governed = /* @__PURE__ */ new Map();
6825
+ for (const name of governedRuleNames(preset)) {
6826
+ const canonical = canonicalRuleName(name);
6827
+ if (!governed.has(canonical)) governed.set(canonical, name);
6828
+ }
6829
+ return governed;
6830
+ }
6831
+ function moduleOwnBlocks(committed, preset) {
6832
+ const blocks = {};
6833
+ const kept = [];
6834
+ const dropped = [];
6835
+ const added = [];
6836
+ const collided = [];
6837
+ if (Array.isArray(committed.plugins)) {
6838
+ const own = committed.plugins.filter(
6839
+ (name) => typeof name === "string" && !preset.plugins.includes(name)
6840
+ );
6841
+ for (const name of own) added.push({ key: "plugins", entry: `plugins ${name}`, value: name });
6842
+ if (own.length > 0) {
6843
+ blocks.plugins = own;
6844
+ kept.push(
6845
+ `kept this module's own plugins (${own.join(", ")}): the preset does not enable them`
6846
+ );
6847
+ }
6848
+ }
6849
+ if (Array.isArray(committed.jsPlugins)) {
6850
+ const presetKeys = new Set(preset.jsPlugins.map((entry) => pluginKey(entry)));
6851
+ const own = [];
6852
+ for (const entry of committed.jsPlugins) {
6853
+ const key = pluginKey(entry);
6854
+ const named = { key: "jsPlugins", entry: `jsPlugins ${key ?? "?"}`, value: entry };
6855
+ if (key !== void 0 && presetKeys.has(key)) {
6856
+ dropped.push(named.entry);
6857
+ collided.push(named);
6858
+ } else {
6859
+ own.push(entry);
6860
+ added.push(named);
6861
+ }
6862
+ }
6863
+ if (own.length > 0) {
6864
+ blocks.jsPlugins = own;
6865
+ kept.push(
6866
+ `kept ${own.length} jsPlugin(s) this module added (${own.map((entry) => pluginKey(entry) ?? "?").join(", ")})`
6867
+ );
6868
+ }
6869
+ }
6870
+ if (isRecord(committed.settings)) {
6871
+ const presetSettings = preset.settings ?? {};
6872
+ const own = {};
6873
+ for (const [key, value] of Object.entries(committed.settings)) {
6874
+ const named = { key: "settings", entry: `settings.${key}`, value };
6875
+ if (key in presetSettings) {
6876
+ dropped.push(named.entry);
6877
+ collided.push(named);
6878
+ } else {
6879
+ own[key] = value;
6880
+ added.push(named);
6881
+ }
6882
+ }
6883
+ if (Object.keys(own).length > 0) {
6884
+ blocks.settings = own;
6885
+ kept.push(`kept this module's own settings (${Object.keys(own).join(", ")})`);
6886
+ }
6887
+ }
6888
+ if (Array.isArray(committed.overrides)) {
6889
+ const governed = governedRules(preset);
6890
+ const byFiles = /* @__PURE__ */ new Map();
6891
+ for (const block of committed.overrides) {
6892
+ if (!isRecord(block) || !Array.isArray(block.files)) continue;
6893
+ const files = JSON.stringify([...block.files].map(String).sort());
6894
+ const rules = {};
6895
+ for (const [rule, value] of Object.entries(isRecord(block.rules) ? block.rules : {})) {
6896
+ const presetSpelling = governed.get(canonicalRuleName(rule));
6897
+ if (presetSpelling === void 0) rules[rule] = value;
6898
+ else
6899
+ dropped.push(
6900
+ `overrides[${block.files.join(", ")}] ${describeRuleKey(rule, presetSpelling)}`
6901
+ );
6902
+ }
6903
+ const { rules: _rules, ...rest } = block;
6904
+ for (const [key, value] of Object.entries(rest)) {
6905
+ if (key === "files") continue;
6906
+ const files2 = block.files.map(String);
6907
+ added.push({
6908
+ key: "overrides",
6909
+ entry: `overrides[${files2.join(", ")}] ${key}`,
6910
+ value,
6911
+ files: files2
6912
+ });
6913
+ }
6914
+ const merged = byFiles.get(files);
6915
+ if (merged === void 0) {
6916
+ byFiles.set(files, { ...rest, ...Object.keys(rules).length > 0 ? { rules } : {} });
6917
+ continue;
6918
+ }
6919
+ const { files: _sameFiles, ...others } = rest;
6920
+ const mergedRules = { ...isRecord(merged.rules) ? merged.rules : {}, ...rules };
6921
+ Object.assign(
6922
+ merged,
6923
+ others,
6924
+ Object.keys(mergedRules).length > 0 ? { rules: mergedRules } : {}
6925
+ );
6926
+ }
6927
+ const own = [...byFiles.values()].filter((block) => Object.keys(block).length > 1);
6928
+ if (own.length > 0) {
6929
+ blocks.overrides = own;
6930
+ kept.push(
6931
+ `kept ${own.length} override block(s) this module set (${own.map((block) => block.files.join(", ")).join("; ")})`
6932
+ );
6933
+ }
6934
+ }
6935
+ return { blocks, kept, dropped, added, collided };
6936
+ }
6937
+ var SEVERITIES = {
6938
+ off: "off",
6939
+ allow: "off",
6940
+ "0": "off",
6941
+ warn: "warn",
6942
+ "1": "warn",
6943
+ error: "error",
6944
+ deny: "error",
6945
+ "2": "error"
6946
+ };
6947
+ function ruleSetting(value) {
6948
+ const [head, ...options] = Array.isArray(value) ? value : [value];
6949
+ if (typeof head !== "string" && typeof head !== "number") return void 0;
6950
+ const severity = SEVERITIES[String(head)];
6951
+ return severity === void 0 ? void 0 : [severity, ...options];
6952
+ }
6953
+ function isOffRuleValue(value) {
6954
+ return ruleSetting(value)?.[0] === "off";
6955
+ }
6956
+ function sameRuleSetting(module, preset) {
6957
+ const own = ruleSetting(module);
6958
+ return own !== void 0 && isDeepStrictEqual(own, ruleSetting(preset));
6959
+ }
6960
+ var filesKey = (files) => JSON.stringify(files.map(String).sort());
6961
+ function moduleRuleStanding(committed, preset) {
6962
+ const governed = governedRules(preset);
6963
+ const byCanonical = (rules) => new Map(Object.entries(rules).map(([rule, value]) => [canonicalRuleName(rule), value]));
6964
+ const topLevel = byCanonical(preset.rules);
6965
+ const scoped = new Map(
6966
+ (preset.overrides ?? []).map((override) => [
6967
+ filesKey(override.files),
6968
+ byCanonical(override.rules)
6969
+ ])
6970
+ );
6971
+ const standing = { added: [], conflicts: [] };
6972
+ const classify = (rules, key, files) => {
6973
+ for (const [rule, value] of Object.entries(rules)) {
6974
+ const canonical = canonicalRuleName(rule);
6975
+ const where = files === void 0 ? {} : { files };
6976
+ if (!governed.has(canonical)) {
6977
+ standing.added.push({ rule, ...where, value });
6978
+ continue;
6979
+ }
6980
+ const scope = files === void 0 ? void 0 : scoped.get(filesKey(files));
6981
+ const presetValue = scope?.has(canonical) ? scope.get(canonical) : topLevel.get(canonical);
6982
+ if (presetValue === void 0 || !sameRuleSetting(value, presetValue)) {
6983
+ standing.conflicts.push({ key, rule, ...where });
6984
+ }
6985
+ }
6986
+ };
6987
+ if (isRecord(committed.rules)) classify(committed.rules, "rules");
6988
+ if (Array.isArray(committed.overrides)) {
6989
+ for (const block of committed.overrides) {
6990
+ if (!isRecord(block) || !Array.isArray(block.files) || !isRecord(block.rules)) continue;
6991
+ classify(block.rules, "overrides", block.files.map(String));
6992
+ }
6993
+ }
6994
+ return standing;
6995
+ }
6996
+ function refineLintDrift(drift, committed, preset) {
6997
+ const ruleConflicts = new Set(
6998
+ moduleRuleStanding(committed, preset).conflicts.map((conflict) => conflict.key)
6999
+ );
7000
+ const collisions = new Set(moduleOwnBlocks(committed, preset).collided.map((entry) => entry.key));
7001
+ const readBack = (key) => {
7002
+ const value = committed[key];
7003
+ switch (key) {
7004
+ case "rules":
7005
+ case "settings":
7006
+ return isRecord(value);
7007
+ case "plugins":
7008
+ return Array.isArray(value) && value.every((name) => typeof name === "string");
7009
+ case "jsPlugins":
7010
+ return Array.isArray(value);
7011
+ case "overrides":
7012
+ return Array.isArray(value) && value.every(
7013
+ (block) => isRecord(block) && Array.isArray(block.files) && (block.rules === void 0 || isRecord(block.rules))
7014
+ );
7015
+ default:
7016
+ return false;
7017
+ }
7018
+ };
7019
+ return drift.filter(
7020
+ (key) => !readBack(key) || ruleConflicts.has(key) || collisions.has(key)
7021
+ );
7022
+ }
7023
+
7024
+ // src/roles/lint/presets/nest.json
7025
+ var nest_default = {
7026
+ plugins: ["typescript", "jest", "vitest", "import", "unicorn", "oxc", "node"],
7027
+ jsPlugins: [
7028
+ "eslint-plugin-no-barrel-files",
7029
+ {
7030
+ name: "nx",
7031
+ specifier: "@nx/eslint-plugin"
7032
+ }
7033
+ ],
7034
+ settings: null,
7035
+ rules: {
7036
+ "array-callback-return": [
7037
+ "error",
7038
+ {
7039
+ allowImplicit: false,
7040
+ checkForEach: false,
7041
+ allowVoid: false
7042
+ }
7043
+ ],
7044
+ complexity: ["error", 30],
7045
+ curly: ["error", "all"],
7046
+ "dot-notation": [
7047
+ "error",
7048
+ {
7049
+ allowKeywords: true,
7050
+ allowPattern: ""
7051
+ }
7052
+ ],
7053
+ eqeqeq: {
7054
+ severity: "warn",
7055
+ reason: "1 pre-existing violation(s) across one module, and they were never reported: the nx eslint target matched a couple of files per module (2 of 2888 on bff-admin), so the rule was configured and not enforced. Held at warn so adoption stays a lateral move rather than turning green modules red for code that predates it; the debt stays visible and countable via `--run --lint --json` and `--inspect`, and the severity is restored once it reaches zero."
7056
+ },
7057
+ "for-direction": "error",
7058
+ "func-style": {
7059
+ severity: "warn",
7060
+ reason: "58 pre-existing violation(s) across network and contract, and they were never reported: the nx eslint target matched a couple of files per module (2 of 2888 on bff-admin), so the rule was configured and not enforced. Held at warn so adoption stays a lateral move rather than turning green modules red for code that predates it; the debt stays visible and countable via `--run --lint --json` and `--inspect`, and the severity is restored once it reaches zero.",
7061
+ options: [
7062
+ "expression",
7063
+ {
7064
+ allowArrowFunctions: false,
7065
+ allowTypeAnnotation: false,
7066
+ overrides: {}
7067
+ }
7068
+ ]
7069
+ },
7070
+ "import/no-duplicates": [
7071
+ "error",
7072
+ {
7073
+ considerQueryString: true,
7074
+ "prefer-inline": true
7075
+ }
7076
+ ],
7077
+ "jest/expect-expect": {
7078
+ severity: "off",
7079
+ reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
7080
+ },
7081
+ "jest/no-alias-methods": {
7082
+ severity: "off",
7083
+ reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
7084
+ },
7085
+ "jest/no-commented-out-tests": {
7086
+ severity: "off",
7087
+ reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
7088
+ },
7089
+ "jest/no-deprecated-functions": "error",
7090
+ "jest/no-disabled-tests": {
7091
+ severity: "off",
7092
+ reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
7093
+ },
7094
+ "jest/no-done-callback": "error",
7095
+ "jest/no-export": "error",
7096
+ "jest/no-focused-tests": {
7097
+ severity: "off",
7098
+ reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
7099
+ },
7100
+ "jest/no-identical-title": {
7101
+ severity: "off",
7102
+ reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
7103
+ },
7104
+ "jest/no-interpolation-in-snapshots": {
7105
+ severity: "off",
7106
+ reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
7107
+ },
7108
+ "jest/no-jasmine-globals": "error",
7109
+ "jest/no-mocks-import": {
7110
+ severity: "off",
7111
+ reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
7112
+ },
7113
+ "jest/no-standalone-expect": {
7114
+ severity: "off",
7115
+ reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
7116
+ },
7117
+ "jest/no-test-prefixes": {
7118
+ severity: "off",
7119
+ reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
7120
+ },
7121
+ "jest/prefer-to-be": {
7122
+ severity: "off",
7123
+ reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
7124
+ },
7125
+ "jest/prefer-to-contain": {
7126
+ severity: "off",
7127
+ reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
7128
+ },
7129
+ "jest/prefer-to-have-length": {
7130
+ severity: "off",
7131
+ reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
7132
+ },
7133
+ "jest/valid-describe-callback": {
7134
+ severity: "off",
7135
+ reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
7136
+ },
7137
+ "jest/valid-expect": {
7138
+ severity: "off",
7139
+ reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
7140
+ },
7141
+ "jest/valid-expect-in-promise": {
7142
+ severity: "off",
7143
+ reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
7144
+ },
7145
+ "jest/valid-title": {
7146
+ severity: "off",
7147
+ reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
7148
+ },
7149
+ "no-async-promise-executor": "error",
7150
+ "no-barrel-files/no-barrel-files": {
7151
+ severity: "off",
7152
+ reason: "nest modules use barrel index.ts files as a deliberate structural pattern; the rule fired 127 times and every one was the architecture working as intended"
7153
+ },
7154
+ "no-case-declarations": "error",
7155
+ "no-compare-neg-zero": "error",
7156
+ "no-cond-assign": ["error", "except-parens"],
7157
+ "no-console": {
7158
+ severity: "warn",
7159
+ reason: "61 pre-existing violation(s) across network, db-client-management and others, and they were never reported: the nx eslint target matched a couple of files per module (2 of 2888 on bff-admin), so the rule was configured and not enforced. Held at warn so adoption stays a lateral move rather than turning green modules red for code that predates it; the debt stays visible and countable via `--run --lint --json` and `--inspect`, and the severity is restored once it reaches zero.",
7160
+ options: [
7161
+ {
7162
+ allow: ["warn", "error"]
7163
+ }
7164
+ ]
7165
+ },
7166
+ "no-constant-binary-expression": "error",
7167
+ "no-constant-condition": [
7168
+ "error",
7169
+ {
7170
+ checkLoops: "allExceptWhileTrue"
7171
+ }
7172
+ ],
7173
+ "no-control-regex": {
7174
+ severity: "off",
7175
+ reason: "the single occurrence is a regex whose whole purpose is stripping ASCII control characters before XML output, which the rule cannot distinguish from an accident"
7176
+ },
7177
+ "no-debugger": "error",
7178
+ "no-delete-var": "error",
7179
+ "no-dupe-else-if": "error",
7180
+ "no-dupe-keys": "error",
7181
+ "no-duplicate-case": "error",
7182
+ "no-else-return": [
7183
+ "error",
7184
+ {
7185
+ allowElseIf: true
7186
+ }
7187
+ ],
7188
+ "no-empty": [
7189
+ "error",
7190
+ {
7191
+ allowEmptyCatch: false
7192
+ }
7193
+ ],
7194
+ "no-empty-character-class": "error",
7195
+ "no-empty-pattern": [
7196
+ "error",
7197
+ {
7198
+ allowObjectPatternsAsParameters: false
7199
+ }
7200
+ ],
7201
+ "no-empty-static-block": "error",
7202
+ "no-ex-assign": "error",
7203
+ "no-extra-boolean-cast": ["error", {}],
7204
+ "no-fallthrough": [
7205
+ "error",
7206
+ {
7207
+ allowEmptyCase: false,
7208
+ reportUnusedFallthroughComment: false
7209
+ }
7210
+ ],
7211
+ "no-global-assign": [
7212
+ "error",
7213
+ {
7214
+ exceptions: []
7215
+ }
7216
+ ],
7217
+ "no-implicit-coercion": [
7218
+ "error",
7219
+ {
7220
+ allow: [],
7221
+ boolean: true,
7222
+ disallowTemplateShorthand: false,
7223
+ number: true,
7224
+ string: true
7225
+ }
7226
+ ],
7227
+ "no-invalid-regexp": ["error", {}],
7228
+ "no-irregular-whitespace": [
7229
+ "error",
7230
+ {
7231
+ skipComments: false,
7232
+ skipJSXText: false,
7233
+ skipRegExps: false,
7234
+ skipStrings: true,
7235
+ skipTemplates: false
7236
+ }
7237
+ ],
7238
+ "no-lonely-if": "error",
7239
+ "no-loss-of-precision": "error",
7240
+ "no-misleading-character-class": "error",
7241
+ "no-nonoctal-decimal-escape": "error",
7242
+ "no-prototype-builtins": "error",
7243
+ "no-regex-spaces": "error",
7244
+ "no-restricted-imports": [
7245
+ "error",
7246
+ {
7247
+ paths: [
7248
+ {
7249
+ name: "@front/theme",
7250
+ importNames: [
7251
+ "hubloTheme",
7252
+ "legacyHubloTheme",
7253
+ "customCommonColors",
7254
+ "customPalette",
7255
+ "breakpointsOptions",
7256
+ "breakpointsValues",
7257
+ "spacingConstants"
7258
+ ],
7259
+ message: "Use the MUI theme context or the public providers exposed by @front/theme."
7260
+ }
7261
+ ],
7262
+ patterns: [
7263
+ {
7264
+ group: ["@front/theme/*", "!@front/theme/testing"],
7265
+ message: "Deep imports from @front/theme are forbidden outside the theme lib."
7266
+ }
7267
+ ]
7268
+ }
7269
+ ],
7270
+ "no-self-assign": [
7271
+ "error",
7272
+ {
7273
+ props: true
7274
+ }
7275
+ ],
7276
+ "no-shadow-restricted-names": [
7277
+ "error",
7278
+ {
7279
+ reportGlobalThis: false
7280
+ }
7281
+ ],
7282
+ "no-sparse-arrays": "error",
7283
+ "no-unneeded-ternary": [
7284
+ "error",
7285
+ {
7286
+ defaultAssignment: true
7287
+ }
7288
+ ],
7289
+ "no-unsafe-finally": "error",
7290
+ "no-unsafe-optional-chaining": {
7291
+ severity: "warn",
7292
+ reason: "7 pre-existing violation(s) across the db-* libs, and they were never reported: the nx eslint target matched a couple of files per module (2 of 2888 on bff-admin), so the rule was configured and not enforced. Held at warn so adoption stays a lateral move rather than turning green modules red for code that predates it; the debt stays visible and countable via `--run --lint --json` and `--inspect`, and the severity is restored once it reaches zero.",
7293
+ options: [
7294
+ {
7295
+ disallowArithmeticOperators: false
7296
+ }
7297
+ ]
7298
+ },
7299
+ "no-unused-labels": "error",
7300
+ "no-unused-private-class-members": "error",
7301
+ "no-useless-backreference": "error",
7302
+ "no-useless-catch": "error",
7303
+ "no-useless-escape": [
7304
+ "error",
7305
+ {
7306
+ allowRegexCharacters: []
7307
+ }
7308
+ ],
7309
+ "no-useless-return": "error",
7310
+ "nx/enforce-module-boundaries": [
7311
+ "error",
7312
+ {
7313
+ enforceBuildableLibDependency: true,
7314
+ allow: [],
7315
+ depConstraints: [
7316
+ {
7317
+ sourceTag: "*",
7318
+ onlyDependOnLibsWithTags: ["*"]
7319
+ }
7320
+ ]
7321
+ }
7322
+ ],
7323
+ "prefer-arrow-callback": [
7324
+ "error",
7325
+ {
7326
+ allowNamedFunctions: false,
7327
+ allowUnboundThis: true
7328
+ }
7329
+ ],
7330
+ "require-yield": "error",
7331
+ "typescript/await-thenable": "error",
7332
+ "typescript/no-confusing-non-null-assertion": "error",
7333
+ "typescript/no-empty-function": {
7334
+ severity: "warn",
7335
+ reason: "pre-existing violations that were never reported: the nx eslint target matched a couple of files per module (2 of 2888 on bff-admin), so the rule was configured and not enforced. Held at warn so adoption stays a lateral move rather than turning green modules red for code that predates it; the debt stays visible and countable via `--run --lint --json` and `--inspect`, and the severity is restored once it reaches zero.",
7336
+ options: [
7337
+ {
7338
+ allow: []
7339
+ }
7340
+ ]
7341
+ },
7342
+ "typescript/no-explicit-any": "error",
7343
+ "typescript/no-floating-promises": [
7344
+ "error",
7345
+ {
7346
+ ignoreVoid: true
7347
+ }
7348
+ ],
7349
+ "typescript/no-import-type-side-effects": "error",
7350
+ "typescript/no-inferrable-types": "error",
7351
+ "typescript/no-non-null-assertion": "error",
7352
+ "typescript/return-await": {
7353
+ severity: "warn",
7354
+ reason: "replaces the deprecated core `no-return-await`, which both modules set to error but which was never actually reporting: the nx lint target expanded to 2 files of 2888. `in-try-catch` rather than `never`, and the planning adoption is what settled it. `never` forces `return await f()` to become `const x = await f(); return x` even inside a `try`, where the await is REQUIRED for the catch to fire: it produced 10 such edits across 15 modules, every one of them inside a try/catch, and every one of them a rewrite that made the code longer without making it safer. Worse, the obvious reading of the rule is to delete the `await`, which silently stops the catch from running. `in-try-catch` is what typescript-eslint recommends and flags none of those 10. Held at warn so adoption does not turn a green module red, and raised to error once the remaining findings are fixed.",
7355
+ options: ["in-try-catch"]
7356
+ },
7357
+ "typescript/switch-exhaustiveness-check": [
7358
+ "error",
7359
+ {
7360
+ considerDefaultExhaustiveForUnions: true
7361
+ }
7362
+ ],
7363
+ "use-isnan": [
7364
+ "error",
7365
+ {
7366
+ enforceForIndexOf: false,
7367
+ enforceForSwitchCase: true
7368
+ }
7369
+ ],
7370
+ "valid-typeof": [
7371
+ "error",
7372
+ {
7373
+ requireStringLiterals: false
7374
+ }
7375
+ ],
7376
+ "vitest/expect-expect": {
7377
+ severity: "warn",
7378
+ reason: "the modules already ran this at warn (confirmed in the bff-admin proof-of-concept config); adoption is like-for-like, so raising it to error is a separate decision"
7379
+ },
7380
+ "vitest/no-alias-methods": "error",
7381
+ "vitest/no-commented-out-tests": {
7382
+ severity: "warn",
7383
+ reason: "the modules already ran this at warn (confirmed in the bff-admin proof-of-concept config); adoption is like-for-like, so raising it to error is a separate decision"
7384
+ },
7385
+ "vitest/no-conditional-expect": {
7386
+ severity: "warn",
7387
+ reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
7388
+ },
7389
+ "vitest/no-disabled-tests": {
7390
+ severity: "warn",
7391
+ reason: "the modules already ran this at warn (confirmed in the bff-admin proof-of-concept config); a skipped test is a deliberate act often paired with a ticket, so it reports rather than blocks"
7392
+ },
7393
+ "vitest/no-focused-tests": "error",
7394
+ "vitest/no-identical-title": "error",
7395
+ "vitest/no-interpolation-in-snapshots": "error",
7396
+ "vitest/no-mocks-import": "error",
7397
+ "vitest/no-standalone-expect": "error",
7398
+ "vitest/no-test-prefixes": "error",
7399
+ "vitest/prefer-to-be": "error",
7400
+ "vitest/prefer-to-contain": "error",
7401
+ "vitest/prefer-to-have-length": "error",
7402
+ "vitest/require-mock-type-parameters": {
7403
+ severity: "off",
7404
+ reason: "4 479 of the 5 255 findings this plugin reports over this repository, 85% of them. It asks for type parameters on vi.fn<\u2026>(), a convention this codebase never had; adopting it is its own piece of work and not part of reading the right plugin"
7405
+ },
7406
+ "vitest/require-to-throw-message": {
7407
+ severity: "warn",
7408
+ reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
7409
+ },
7410
+ "vitest/valid-describe-callback": "error",
7411
+ "vitest/valid-expect": {
7412
+ severity: "warn",
7413
+ reason: "1 pre-existing violation(s) across bdd-tooling, and they were never reported: the nx eslint target matched a couple of files per module (2 of 2888 on bff-admin), so the rule was configured and not enforced. Held at warn so adoption stays a lateral move rather than turning green modules red for code that predates it; the debt stays visible and countable via `--run --lint --json` and `--inspect`, and the severity is restored once it reaches zero."
7414
+ },
7415
+ "vitest/valid-expect-in-promise": "error",
7416
+ "vitest/valid-title": "error",
7417
+ "vitest/warn-todo": {
7418
+ severity: "warn",
7419
+ reason: "a todo test is a reminder rather than a defect, so it reports and never blocks"
7420
+ }
7421
+ },
7422
+ uncovered: {
7423
+ "array-bracket-newline": "formatting, and the formatter owns it. It moves to oxfmt, which is deliberately the LAST step of the migration, so nothing enforces it in between.",
7424
+ "array-bracket-spacing": "formatting, and the formatter owns it. It moves to oxfmt, which is deliberately the LAST step of the migration, so nothing enforces it in between.",
7425
+ "block-spacing": "formatting, and the formatter owns it. It moves to oxfmt, which is deliberately the LAST step of the migration, so nothing enforces it in between.",
7426
+ "computed-property-spacing": "formatting, and the formatter owns it. It moves to oxfmt, which is deliberately the LAST step of the migration, so nothing enforces it in between.",
7427
+ "dot-location": "formatting, and the formatter owns it. It moves to oxfmt, which is deliberately the LAST step of the migration, so nothing enforces it in between.",
7428
+ "eol-last": "formatting, and the formatter owns it. It moves to oxfmt, which is deliberately the LAST step of the migration, so nothing enforces it in between.",
7429
+ "func-call-spacing": "formatting, and the formatter owns it. It moves to oxfmt, which is deliberately the LAST step of the migration, so nothing enforces it in between.",
7430
+ "import/order": "import ordering is FORMATTING, and the format role owns it: oxfmt's `sortImports` reproduces exactly these groups (builtin, external, internal, parent/index, sibling, alphabetical, blank line between) and sorts a file completely in ONE pass, because it rewrites the whole import block. A lint fixer cannot: it emits text edits over overlapping ranges, so this rule needed several runs to finish (five imports took four passes, measured) and sentinel deliberately runs autofix once. Enforced by `pnpm run format`, not by the linter, which is also why `eslint-plugin-import` is no longer hosted at all: its only other rule, no-duplicates, is native in oxlint.",
7431
+ "key-spacing": "formatting, and the formatter owns it. It moves to oxfmt, which is deliberately the LAST step of the migration, so nothing enforces it in between.",
7432
+ "keyword-spacing": "formatting, and the formatter owns it. It moves to oxfmt, which is deliberately the LAST step of the migration, so nothing enforces it in between.",
7433
+ "lines-between-class-members": "formatting, and the formatter owns it. It moves to oxfmt, which is deliberately the LAST step of the migration, so nothing enforces it in between.",
7434
+ "no-invalid-this": "no oxlint equivalent, and hosting does not help: the rule crashes on every file under oxlint's plugin API (sourceCode.getJSDocComment is not implemented). Its coverage moves to TypeScript's noImplicitThis, which the sentinel TypeScript role manages.",
7435
+ "no-multi-spaces": "formatting, and the formatter owns it. It moves to oxfmt, which is deliberately the LAST step of the migration, so nothing enforces it in between.",
7436
+ "no-octal": "no oxlint equivalent",
7437
+ "no-restricted-syntax": "no oxlint equivalent, and unlike the react tier this preset hosts no house-rule plugin, so architectural guards written as AST selectors are not enforced at all. They belong in sentinel's `hublo` plugin, next to the frontend ones: tell us which guards your service relies on. A per-module copy of a house rule drifts, which is the problem sentinel exists to remove.",
7438
+ "no-trailing-spaces": "formatting, and the formatter owns it. It moves to oxfmt, which is deliberately the LAST step of the migration, so nothing enforces it in between.",
7439
+ semi: "formatting, and the formatter owns it. It moves to oxfmt, which is deliberately the LAST step of the migration, so nothing enforces it in between.",
7440
+ "template-curly-spacing": "formatting, and the formatter owns it. It moves to oxfmt, which is deliberately the LAST step of the migration, so nothing enforces it in between.",
7441
+ "typescript/member-ordering": "oxlint has no native rule for it, and the preset deliberately does NOT host @typescript-eslint/eslint-plugin: hosting a whole plugin for one rule costs a dependency, a load step and a pass over every file. Accepted as a loss rather than paid for, the same call as no-octal."
7442
+ },
7443
+ overrides: [
7444
+ {
7445
+ files: [
7446
+ "**/*.test.ts",
7447
+ "**/*.test.tsx",
7448
+ "**/*.spec.ts",
7449
+ "**/*.spec.tsx",
7450
+ "**/*.integration-spec.ts",
7451
+ "**/*.e2e-spec.ts"
7452
+ ],
7453
+ rules: {
7454
+ "no-restricted-properties": {
7455
+ severity: "warn",
7456
+ reason: "held at warn: over the 8 011 test files, 7 call Math.random(), 104 call Date.now(), 3 crypto.randomUUID(), 1 performance.now() and 1 process.hrtime, and 28 of the files that read the clock already install fake timers. A warning says it without turning a suite that was green yesterday red. Verified at error on a fixture carrying all nine forms: these six are reported, new Date('2026-01-01') is not, which is the point",
7457
+ options: [
7458
+ {
7459
+ object: "Math",
7460
+ property: "random",
7461
+ message: "No Math.random() in a test: use a deterministic fixture, or stub the random source."
7462
+ },
7463
+ {
7464
+ object: "Date",
7465
+ property: "now",
7466
+ message: "No Date.now() in a test: use vi.useFakeTimers() with vi.setSystemTime()."
7467
+ },
7468
+ {
7469
+ object: "performance",
7470
+ property: "now",
7471
+ message: "No performance.now() in a test: use vi.useFakeTimers() with vi.setSystemTime()."
7472
+ },
7473
+ {
7474
+ object: "process",
7475
+ property: "hrtime",
7476
+ message: "No process.hrtime in a test: use vi.useFakeTimers() with vi.setSystemTime()."
7477
+ },
7478
+ {
7479
+ object: "crypto",
7480
+ property: "randomUUID",
7481
+ message: "No crypto.randomUUID() in a test: use a fixed id, or stub the random source."
7482
+ },
7483
+ {
7484
+ object: "crypto",
7485
+ property: "getRandomValues",
7486
+ message: "No crypto.getRandomValues() in a test: use a fixed buffer, or stub the random source."
7487
+ }
7488
+ ]
7489
+ },
7490
+ "no-restricted-globals": {
7491
+ severity: "warn",
7492
+ reason: "held at warn: 68 test files call setTimeout and only 2 of them install fake timers, so waiting on the real clock is the second source of flakiness after reading it. The flush idiom await new Promise((resolve) => setTimeout(resolve, 0)) is inside that count and is usually harmless, which is exactly why this reports and never blocks",
7493
+ options: [
7494
+ {
7495
+ name: "setTimeout",
7496
+ message: "No real timer in a test: vi.useFakeTimers() then vi.advanceTimersByTime()."
7497
+ },
7498
+ {
7499
+ name: "setInterval",
7500
+ message: "No real timer in a test: vi.useFakeTimers() then vi.advanceTimersByTime()."
7501
+ }
7502
+ ]
7503
+ }
7504
+ }
7505
+ }
7506
+ ]
7507
+ };
7508
+
7509
+ // src/roles/lint/presets/node.json
7510
+ var node_default = {
7511
+ plugins: ["typescript", "oxc", "vitest"],
7512
+ jsPlugins: [],
7513
+ settings: null,
7514
+ rules: {
7515
+ "typescript/no-unused-expressions": {
7516
+ severity: "warn",
7517
+ reason: "3 pre-existing violations in apps/cloud/institution, never reported because the nx eslint target matched a couple of files per module. Held at warn so adoption stays a lateral move; the debt is visible in `--inspect` and the severity returns once it reaches zero. Parked in the node LAYER rather than the shared base on purpose: the base is the floor every preset stands on, and softening it would weaken presets that have no such debt.",
7518
+ options: [
7519
+ {
7520
+ allowShortCircuit: false,
7521
+ allowTaggedTemplates: false,
7522
+ allowTernary: false
7523
+ }
7524
+ ]
7525
+ },
7526
+ "vitest/expect-expect": {
7527
+ severity: "warn",
7528
+ reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
7529
+ },
7530
+ "vitest/no-alias-methods": {
7531
+ severity: "warn",
7532
+ reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
7533
+ },
7534
+ "vitest/no-commented-out-tests": {
7535
+ severity: "warn",
7536
+ reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
7537
+ },
7538
+ "vitest/no-conditional-expect": {
7539
+ severity: "warn",
7540
+ reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
7541
+ },
7542
+ "vitest/no-disabled-tests": {
7543
+ severity: "warn",
7544
+ reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
7545
+ },
7546
+ "vitest/no-focused-tests": {
7547
+ severity: "warn",
7548
+ reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
7549
+ },
7550
+ "vitest/no-identical-title": {
7551
+ severity: "warn",
7552
+ reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
7553
+ },
7554
+ "vitest/no-interpolation-in-snapshots": {
7555
+ severity: "warn",
7556
+ reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
7557
+ },
7558
+ "vitest/no-mocks-import": {
7559
+ severity: "warn",
7560
+ reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
7561
+ },
7562
+ "vitest/no-standalone-expect": {
7563
+ severity: "warn",
7564
+ reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
7565
+ },
7566
+ "vitest/no-test-prefixes": {
7567
+ severity: "warn",
7568
+ reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
7569
+ },
7570
+ "vitest/prefer-to-be": {
7571
+ severity: "warn",
7572
+ reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
7573
+ },
7574
+ "vitest/prefer-to-contain": {
7575
+ severity: "warn",
7576
+ reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
7577
+ },
7578
+ "vitest/prefer-to-have-length": {
7579
+ severity: "warn",
7580
+ reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
7581
+ },
7582
+ "vitest/require-mock-type-parameters": {
7583
+ severity: "off",
7584
+ reason: "4 479 of the 5 255 findings this plugin reports over this repository, 85% of them. It asks for type parameters on vi.fn<\u2026>(), a convention this codebase never had; adopting it is its own piece of work and not part of reading the right plugin"
7585
+ },
7586
+ "vitest/require-to-throw-message": {
7587
+ severity: "warn",
7588
+ reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
7589
+ },
7590
+ "vitest/valid-describe-callback": {
7591
+ severity: "warn",
7592
+ reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
7593
+ },
7594
+ "vitest/valid-expect": {
7595
+ severity: "warn",
7596
+ reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
7597
+ },
7598
+ "vitest/valid-expect-in-promise": {
7599
+ severity: "warn",
7600
+ reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
7601
+ },
7602
+ "vitest/valid-title": {
7603
+ severity: "warn",
7604
+ reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
7605
+ },
7606
+ "vitest/warn-todo": {
7607
+ severity: "warn",
7608
+ reason: "the backend tier runs tests and this preset carried no test rule at all, so the whole set ships at warn: it reports and never blocks a suite that was green yesterday"
7609
+ }
7610
+ },
7611
+ overrides: [
7612
+ {
7613
+ files: [
7614
+ "**/*.test.ts",
7615
+ "**/*.test.tsx",
7616
+ "**/*.spec.ts",
7617
+ "**/*.spec.tsx",
7618
+ "**/*.integration-spec.ts",
7619
+ "**/*.e2e-spec.ts"
7620
+ ],
7621
+ rules: {
7622
+ "no-restricted-properties": {
7623
+ severity: "warn",
7624
+ reason: "held at warn: over the 8 011 test files, 7 call Math.random(), 104 call Date.now(), 3 crypto.randomUUID(), 1 performance.now() and 1 process.hrtime, and 28 of the files that read the clock already install fake timers. A warning says it without turning a suite that was green yesterday red. Verified at error on a fixture carrying all nine forms: these six are reported, new Date('2026-01-01') is not, which is the point",
7625
+ options: [
7626
+ {
7627
+ object: "Math",
7628
+ property: "random",
7629
+ message: "No Math.random() in a test: use a deterministic fixture, or stub the random source."
7630
+ },
7631
+ {
7632
+ object: "Date",
7633
+ property: "now",
7634
+ message: "No Date.now() in a test: use vi.useFakeTimers() with vi.setSystemTime()."
7635
+ },
7636
+ {
7637
+ object: "performance",
7638
+ property: "now",
7639
+ message: "No performance.now() in a test: use vi.useFakeTimers() with vi.setSystemTime()."
7640
+ },
7641
+ {
7642
+ object: "process",
7643
+ property: "hrtime",
7644
+ message: "No process.hrtime in a test: use vi.useFakeTimers() with vi.setSystemTime()."
7645
+ },
7646
+ {
7647
+ object: "crypto",
7648
+ property: "randomUUID",
7649
+ message: "No crypto.randomUUID() in a test: use a fixed id, or stub the random source."
7650
+ },
7651
+ {
7652
+ object: "crypto",
7653
+ property: "getRandomValues",
7654
+ message: "No crypto.getRandomValues() in a test: use a fixed buffer, or stub the random source."
7655
+ }
7656
+ ]
7657
+ },
7658
+ "no-restricted-globals": {
7659
+ severity: "warn",
7660
+ reason: "held at warn: 68 test files call setTimeout and only 2 of them install fake timers, so waiting on the real clock is the second source of flakiness after reading it. The flush idiom await new Promise((resolve) => setTimeout(resolve, 0)) is inside that count and is usually harmless, which is exactly why this reports and never blocks",
7661
+ options: [
7662
+ {
7663
+ name: "setTimeout",
7664
+ message: "No real timer in a test: vi.useFakeTimers() then vi.advanceTimersByTime()."
7665
+ },
7666
+ {
7667
+ name: "setInterval",
7668
+ message: "No real timer in a test: vi.useFakeTimers() then vi.advanceTimersByTime()."
7669
+ }
7670
+ ]
7671
+ }
7672
+ }
7673
+ }
7674
+ ]
7675
+ };
7676
+
7677
+ // src/roles/lint/presets/react-lib.json
7678
+ var react_lib_default = {
7679
+ plugins: ["typescript", "react", "jsx-a11y", "jest", "vitest", "unicorn", "oxc", "nextjs"],
7680
+ jsPlugins: [
7681
+ "eslint-plugin-no-barrel-files",
7682
+ {
7683
+ name: "nx",
7684
+ specifier: "@nx/eslint-plugin"
7685
+ },
7686
+ {
7687
+ name: "jest-dom",
7688
+ specifier: "eslint-plugin-jest-dom"
7689
+ },
7690
+ {
7691
+ name: "storybook",
7692
+ specifier: "eslint-plugin-storybook"
7693
+ },
7694
+ "../plugins/hublo.js",
7695
+ {
7696
+ name: "@tanstack/query",
7697
+ specifier: "@tanstack/eslint-plugin-query"
7698
+ }
7699
+ ],
7700
+ settings: null,
7701
+ renames: {
7702
+ "@next/next": "nextjs"
7703
+ },
7704
+ rules: {
7705
+ "@tanstack/query/exhaustive-deps": {
7706
+ severity: "warn",
7707
+ reason: "held at warn across the react tier: the plugin is now a dependency of sentinel, so the rule runs everywhere instead of being named by a preset that could not load it. Measured over 8 784 files of console, host-admin, libs/front/api and libs/front/components, the eight rules report 806 findings, of which 796 are prefer-query-options and 10 are the correctness ones (exhaustive-deps 9, no-rest-destructuring 1). A module that wants them to block decides that for itself, and pays the 10 fixes"
7708
+ },
7709
+ "@tanstack/query/infinite-query-property-order": {
7710
+ severity: "warn",
7711
+ reason: "held at warn across the react tier: the plugin is now a dependency of sentinel, so the rule runs everywhere instead of being named by a preset that could not load it. Measured over 8 784 files of console, host-admin, libs/front/api and libs/front/components, the eight rules report 806 findings, of which 796 are prefer-query-options and 10 are the correctness ones (exhaustive-deps 9, no-rest-destructuring 1). A module that wants them to block decides that for itself, and pays the 10 fixes"
7712
+ },
7713
+ "@tanstack/query/mutation-property-order": {
7714
+ severity: "warn",
7715
+ reason: "held at warn across the react tier: the plugin is now a dependency of sentinel, so the rule runs everywhere instead of being named by a preset that could not load it. Measured over 8 784 files of console, host-admin, libs/front/api and libs/front/components, the eight rules report 806 findings, of which 796 are prefer-query-options and 10 are the correctness ones (exhaustive-deps 9, no-rest-destructuring 1). A module that wants them to block decides that for itself, and pays the 10 fixes"
7716
+ },
7717
+ "@tanstack/query/no-rest-destructuring": {
7718
+ severity: "warn",
7719
+ reason: "held at warn across the react tier: the plugin is now a dependency of sentinel, so the rule runs everywhere instead of being named by a preset that could not load it. Measured over 8 784 files of console, host-admin, libs/front/api and libs/front/components, the eight rules report 806 findings, of which 796 are prefer-query-options and 10 are the correctness ones (exhaustive-deps 9, no-rest-destructuring 1). A module that wants them to block decides that for itself, and pays the 10 fixes"
7720
+ },
7721
+ "@tanstack/query/no-unstable-deps": {
7722
+ severity: "warn",
7723
+ reason: "held at warn across the react tier: the plugin is now a dependency of sentinel, so the rule runs everywhere instead of being named by a preset that could not load it. Measured over 8 784 files of console, host-admin, libs/front/api and libs/front/components, the eight rules report 806 findings, of which 796 are prefer-query-options and 10 are the correctness ones (exhaustive-deps 9, no-rest-destructuring 1). A module that wants them to block decides that for itself, and pays the 10 fixes"
7724
+ },
7725
+ "@tanstack/query/no-void-query-fn": {
7726
+ severity: "warn",
7727
+ reason: "held at warn across the react tier: the plugin is now a dependency of sentinel, so the rule runs everywhere instead of being named by a preset that could not load it. Measured over 8 784 files of console, host-admin, libs/front/api and libs/front/components, the eight rules report 806 findings, of which 796 are prefer-query-options and 10 are the correctness ones (exhaustive-deps 9, no-rest-destructuring 1). A module that wants them to block decides that for itself, and pays the 10 fixes"
7728
+ },
7729
+ "@tanstack/query/prefer-query-options": {
7730
+ severity: "warn",
7731
+ reason: "held at warn across the react tier: the plugin is now a dependency of sentinel, so the rule runs everywhere instead of being named by a preset that could not load it. Measured over 8 784 files of console, host-admin, libs/front/api and libs/front/components, the eight rules report 806 findings, of which 796 are prefer-query-options and 10 are the correctness ones (exhaustive-deps 9, no-rest-destructuring 1). A module that wants them to block decides that for itself, and pays the 10 fixes"
7732
+ },
7733
+ "@tanstack/query/stable-query-client": {
7734
+ severity: "warn",
7735
+ reason: "held at warn across the react tier: the plugin is now a dependency of sentinel, so the rule runs everywhere instead of being named by a preset that could not load it. Measured over 8 784 files of console, host-admin, libs/front/api and libs/front/components, the eight rules report 806 findings, of which 796 are prefer-query-options and 10 are the correctness ones (exhaustive-deps 9, no-rest-destructuring 1). A module that wants them to block decides that for itself, and pays the 10 fixes"
7736
+ },
7737
+ curly: ["error", "all"],
7738
+ "for-direction": "error",
7739
+ "hublo/no-regex-lookbehind": "error",
7740
+ "jest-dom/prefer-checked": "error",
7741
+ "jest-dom/prefer-empty": "error",
7742
+ "jest-dom/prefer-enabled-disabled": "error",
7743
+ "jest-dom/prefer-focus": "error",
7744
+ "jest-dom/prefer-in-document": "error",
7745
+ "jest-dom/prefer-required": "error",
7746
+ "jest-dom/prefer-to-have-attribute": "error",
7747
+ "jest-dom/prefer-to-have-class": "error",
7748
+ "jest-dom/prefer-to-have-style": "error",
7749
+ "jest-dom/prefer-to-have-text-content": "error",
7750
+ "jest-dom/prefer-to-have-value": "error",
7751
+ "jest/expect-expect": {
7752
+ severity: "off",
7753
+ reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
7754
+ },
7755
+ "jest/no-alias-methods": {
7756
+ severity: "off",
7757
+ reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
7758
+ },
7759
+ "jest/no-commented-out-tests": {
7760
+ severity: "off",
7761
+ reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
7762
+ },
7763
+ "jest/no-conditional-expect": {
7764
+ severity: "off",
7765
+ reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
7766
+ },
7767
+ "jest/no-deprecated-functions": "error",
7768
+ "jest/no-disabled-tests": {
7769
+ severity: "off",
7770
+ reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
7771
+ },
7772
+ "jest/no-done-callback": "error",
7773
+ "jest/no-export": "error",
7774
+ "jest/no-focused-tests": {
7775
+ severity: "off",
7776
+ reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
7777
+ },
7778
+ "jest/no-identical-title": {
7779
+ severity: "off",
7780
+ reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
7781
+ },
7782
+ "jest/no-interpolation-in-snapshots": {
7783
+ severity: "off",
7784
+ reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
7785
+ },
7786
+ "jest/no-jasmine-globals": "error",
7787
+ "jest/no-mocks-import": {
7788
+ severity: "off",
7789
+ reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
7790
+ },
7791
+ "jest/no-standalone-expect": {
7792
+ severity: "off",
7793
+ reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
7794
+ },
7795
+ "jest/no-test-prefixes": {
7796
+ severity: "off",
7797
+ reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
7798
+ },
7799
+ "jest/prefer-to-be": {
7800
+ severity: "off",
7801
+ reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
7802
+ },
7803
+ "jest/prefer-to-contain": {
7804
+ severity: "off",
7805
+ reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
7806
+ },
7807
+ "jest/prefer-to-have-length": {
7808
+ severity: "off",
7809
+ reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
7810
+ },
7811
+ "jest/valid-describe-callback": {
7812
+ severity: "off",
7813
+ reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
7814
+ },
7815
+ "jest/valid-expect": {
7816
+ severity: "off",
7817
+ reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
7818
+ },
7819
+ "jest/valid-expect-in-promise": {
7820
+ severity: "off",
7821
+ reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
7822
+ },
7823
+ "jest/valid-title": {
7824
+ severity: "off",
7825
+ reason: "the vitest plugin reports the same violation at the same offset, and this repository runs vitest: measured over apps and libs, 765 of this plugin\u2019s 769 findings are duplicates of the vitest ones. Its rules fire on jest-style files too, so nothing is lost by reading them once"
7826
+ },
7827
+ "jsx-a11y/anchor-is-valid": [
7828
+ "error",
7829
+ {
7830
+ components: ["Link"],
7831
+ specialLink: ["hrefLeft", "hrefRight"],
7832
+ aspects: ["invalidHref", "preferButton"]
7833
+ }
7834
+ ],
7835
+ "nextjs/google-font-display": {
7836
+ severity: "warn",
7837
+ reason: "Next's own recommended config sets this at warn, and the libs inherit it. Four of the ten front libs really do import `next` (`components` alone in 40 files), so the rule is not decoration here, but its severity is Next's call rather than ours."
7838
+ },
7839
+ "nextjs/google-font-preconnect": {
7840
+ severity: "warn",
7841
+ reason: "Next's own recommended config sets this at warn, and the libs inherit it. Four of the ten front libs really do import `next` (`components` alone in 40 files), so the rule is not decoration here, but its severity is Next's call rather than ours."
7842
+ },
7843
+ "nextjs/inline-script-id": "error",
7844
+ "nextjs/next-script-for-ga": {
7845
+ severity: "warn",
7846
+ reason: "Next's own recommended config sets this at warn, and the libs inherit it. Four of the ten front libs really do import `next` (`components` alone in 40 files), so the rule is not decoration here, but its severity is Next's call rather than ours."
7847
+ },
7848
+ "nextjs/no-assign-module-variable": "error",
7849
+ "nextjs/no-async-client-component": {
7850
+ severity: "warn",
7851
+ reason: "Next's own recommended config sets this at warn, and the libs inherit it. Four of the ten front libs really do import `next` (`components` alone in 40 files), so the rule is not decoration here, but its severity is Next's call rather than ours."
7852
+ },
7853
+ "nextjs/no-before-interactive-script-outside-document": {
7854
+ severity: "warn",
7855
+ reason: "Next's own recommended config sets this at warn, and the libs inherit it. Four of the ten front libs really do import `next` (`components` alone in 40 files), so the rule is not decoration here, but its severity is Next's call rather than ours."
7856
+ },
7857
+ "nextjs/no-css-tags": {
7858
+ severity: "warn",
7859
+ reason: "Next's own recommended config sets this at warn, and the libs inherit it. Four of the ten front libs really do import `next` (`components` alone in 40 files), so the rule is not decoration here, but its severity is Next's call rather than ours."
7860
+ },
7861
+ "nextjs/no-document-import-in-page": "error",
7862
+ "nextjs/no-duplicate-head": "error",
7863
+ "nextjs/no-head-element": {
7864
+ severity: "warn",
7865
+ reason: "Next's own recommended config sets this at warn, and the libs inherit it. Four of the ten front libs really do import `next` (`components` alone in 40 files), so the rule is not decoration here, but its severity is Next's call rather than ours."
7866
+ },
7867
+ "nextjs/no-head-import-in-document": "error",
7868
+ "nextjs/no-html-link-for-pages": "error",
7869
+ "nextjs/no-img-element": {
7870
+ severity: "warn",
7871
+ reason: "Next's own recommended config sets this at warn, and the libs inherit it. Four of the ten front libs really do import `next` (`components` alone in 40 files), so the rule is not decoration here, but its severity is Next's call rather than ours."
7872
+ },
7873
+ "nextjs/no-page-custom-font": {
7874
+ severity: "warn",
7875
+ reason: "Next's own recommended config sets this at warn, and the libs inherit it. Four of the ten front libs really do import `next` (`components` alone in 40 files), so the rule is not decoration here, but its severity is Next's call rather than ours."
7876
+ },
7877
+ "nextjs/no-script-component-in-head": "error",
7878
+ "nextjs/no-styled-jsx-in-document": {
7879
+ severity: "warn",
7880
+ reason: "Next's own recommended config sets this at warn, and the libs inherit it. Four of the ten front libs really do import `next` (`components` alone in 40 files), so the rule is not decoration here, but its severity is Next's call rather than ours."
7881
+ },
7882
+ "nextjs/no-sync-scripts": "error",
7883
+ "nextjs/no-title-in-document-head": {
7884
+ severity: "warn",
7885
+ reason: "Next's own recommended config sets this at warn, and the libs inherit it. Four of the ten front libs really do import `next` (`components` alone in 40 files), so the rule is not decoration here, but its severity is Next's call rather than ours."
7886
+ },
7887
+ "nextjs/no-typos": {
7888
+ severity: "warn",
7889
+ reason: "Next's own recommended config sets this at warn, and the libs inherit it. Four of the ten front libs really do import `next` (`components` alone in 40 files), so the rule is not decoration here, but its severity is Next's call rather than ours."
7890
+ },
7891
+ "nextjs/no-unwanted-polyfillio": {
7892
+ severity: "warn",
7893
+ reason: "Next's own recommended config sets this at warn, and the libs inherit it. Four of the ten front libs really do import `next` (`components` alone in 40 files), so the rule is not decoration here, but its severity is Next's call rather than ours."
7894
+ },
7895
+ "no-async-promise-executor": "error",
7896
+ "no-barrel-files/no-barrel-files": {
7897
+ severity: "warn",
7898
+ reason: "the front libs already run this at warn today (read with `eslint --print-config`), so keeping it there is a like-for-like migration. Raising it to error would be a NEW enforcement decision, and it needs its own count of violations first."
7899
+ },
7900
+ "no-case-declarations": "error",
7901
+ "no-compare-neg-zero": "error",
7902
+ "no-cond-assign": ["error", "except-parens"],
7903
+ "no-console": {
7904
+ severity: "warn",
7905
+ reason: "53 pre-existing violation(s) across libs/front/analytics, and they were never reported: the nx eslint target matched a couple of files per module (2 of 2888 on bff-admin), so the rule was configured and not enforced. Held at warn so adoption stays a lateral move rather than turning green modules red for code that predates it; the debt stays visible and countable via `--run --lint --json` and `--inspect`, and the severity is restored once it reaches zero.",
7906
+ options: [
7907
+ {
7908
+ allow: ["warn", "error"]
7909
+ }
7910
+ ]
7911
+ },
7912
+ "no-constant-binary-expression": "error",
7913
+ "no-constant-condition": [
7914
+ "error",
7915
+ {
7916
+ checkLoops: "allExceptWhileTrue"
7917
+ }
7918
+ ],
7919
+ "no-control-regex": "error",
7920
+ "no-debugger": "error",
7921
+ "no-delete-var": "error",
7922
+ "no-dupe-else-if": "error",
7923
+ "no-duplicate-case": "error",
7924
+ "no-empty": [
7925
+ "error",
7926
+ {
7927
+ allowEmptyCatch: false
7928
+ }
7929
+ ],
7930
+ "no-empty-character-class": "error",
7931
+ "no-empty-pattern": [
7932
+ "error",
7933
+ {
7934
+ allowObjectPatternsAsParameters: false
7935
+ }
7936
+ ],
7937
+ "no-empty-static-block": "error",
7938
+ "no-ex-assign": "error",
7939
+ "no-extra-boolean-cast": ["error", {}],
7940
+ "no-fallthrough": [
7941
+ "error",
7942
+ {
7943
+ allowEmptyCase: false,
7944
+ reportUnusedFallthroughComment: false
7945
+ }
7946
+ ],
7947
+ "no-global-assign": [
7948
+ "error",
7949
+ {
7950
+ exceptions: []
7951
+ }
7952
+ ],
7953
+ "no-invalid-regexp": ["error", {}],
7954
+ "no-irregular-whitespace": [
7955
+ "error",
7956
+ {
7957
+ skipComments: false,
7958
+ skipJSXText: false,
7959
+ skipRegExps: false,
7960
+ skipStrings: true,
7961
+ skipTemplates: false
7962
+ }
7963
+ ],
7964
+ "no-loss-of-precision": "error",
7965
+ "no-misleading-character-class": "error",
7966
+ "no-nonoctal-decimal-escape": "error",
7967
+ "no-prototype-builtins": "error",
7968
+ "no-regex-spaces": "error",
7969
+ "no-restricted-properties": [
7970
+ "error",
7971
+ {
7972
+ object: "i18n",
7973
+ property: "changeLanguage",
7974
+ message: "This does not work in Nextjs. Please use Link or router instead. See https://nextjs.org/docs/advanced-features/i18n-routing#transition-between-locales"
7975
+ }
7976
+ ],
7977
+ "no-self-assign": [
7978
+ "error",
7979
+ {
7980
+ props: true
7981
+ }
7982
+ ],
7983
+ "no-shadow-restricted-names": [
7984
+ "error",
7985
+ {
7986
+ reportGlobalThis: false
7987
+ }
7988
+ ],
7989
+ "no-sparse-arrays": "error",
7990
+ "no-unsafe-finally": "error",
7991
+ "no-unsafe-optional-chaining": [
7992
+ "error",
7993
+ {
7994
+ disallowArithmeticOperators: false
7995
+ }
7996
+ ],
7997
+ "no-unused-labels": "error",
7998
+ "no-unused-private-class-members": "error",
7999
+ "no-useless-backreference": "error",
8000
+ "no-useless-catch": "error",
8001
+ "no-useless-escape": [
8002
+ "error",
8003
+ {
8004
+ allowRegexCharacters: []
8005
+ }
8006
+ ],
8007
+ "nx/enforce-module-boundaries": [
8008
+ "error",
8009
+ {
8010
+ enforceBuildableLibDependency: true,
8011
+ allow: [],
8012
+ depConstraints: [
8013
+ {
8014
+ sourceTag: "*",
8015
+ onlyDependOnLibsWithTags: ["*"]
8016
+ }
8017
+ ]
8018
+ }
8019
+ ],
8020
+ "react-hooks/exhaustive-deps": {
8021
+ severity: "warn",
8022
+ reason: "the front libs already run this at warn today (read with `eslint --print-config`), so keeping it there is a like-for-like migration. Raising it to error would be a NEW enforcement decision, and it needs its own count of violations first."
8023
+ },
8024
+ "react-hooks/rules-of-hooks": "error",
8025
+ "react/jsx-curly-brace-presence": {
8026
+ severity: "warn",
8027
+ reason: "the front libs already run this at warn today (read with `eslint --print-config`), so keeping it there is a like-for-like migration. Raising it to error would be a NEW enforcement decision, and it needs its own count of violations first.",
8028
+ options: [
8029
+ {
8030
+ props: "never",
8031
+ children: "never"
8032
+ }
8033
+ ]
8034
+ },
8035
+ "react/jsx-no-useless-fragment": [
8036
+ "error",
8037
+ {
8038
+ allowExpressions: true
8039
+ }
8040
+ ],
8041
+ "require-yield": "error",
8042
+ "typescript/consistent-type-imports": [
8043
+ "error",
8044
+ {
8045
+ fixStyle: "inline-type-imports"
8046
+ }
8047
+ ],
8048
+ "typescript/no-empty-function": [
8049
+ "error",
8050
+ {
8051
+ allow: []
8052
+ }
8053
+ ],
8054
+ "typescript/no-explicit-any": "error",
8055
+ "typescript/no-floating-promises": [
8056
+ "error",
8057
+ {
8058
+ ignoreVoid: true
8059
+ }
8060
+ ],
8061
+ "typescript/no-inferrable-types": "error",
8062
+ "typescript/no-non-null-assertion": {
8063
+ severity: "warn",
8064
+ reason: "the front libs already run this at warn today (read with `eslint --print-config`), so keeping it there is a like-for-like migration. Raising it to error would be a NEW enforcement decision, and it needs its own count of violations first."
8065
+ },
8066
+ "typescript/no-useless-constructor": {
8067
+ severity: "warn",
8068
+ reason: "the front libs already run this at warn today (read with `eslint --print-config`), so keeping it there is a like-for-like migration. Raising it to error would be a NEW enforcement decision, and it needs its own count of violations first."
8069
+ },
8070
+ "typescript/return-await": {
8071
+ severity: "warn",
8072
+ reason: "replaces the deprecated core `no-return-await`, which both modules set to error but which was never actually reporting: the nx lint target expanded to 2 files of 2888. `in-try-catch` rather than `never`, and the planning adoption is what settled it. `never` forces `return await f()` to become `const x = await f(); return x` even inside a `try`, where the await is REQUIRED for the catch to fire: it produced 10 such edits across 15 modules, every one of them inside a try/catch, and every one of them a rewrite that made the code longer without making it safer. Worse, the obvious reading of the rule is to delete the `await`, which silently stops the catch from running. `in-try-catch` is what typescript-eslint recommends and flags none of those 10. Held at warn so adoption does not turn a green module red, and raised to error once the remaining findings are fixed.",
8073
+ options: ["in-try-catch"]
8074
+ },
8075
+ "use-isnan": [
8076
+ "error",
8077
+ {
8078
+ enforceForIndexOf: false,
8079
+ enforceForSwitchCase: true
8080
+ }
8081
+ ],
8082
+ "valid-typeof": [
8083
+ "error",
8084
+ {
8085
+ requireStringLiterals: false
8086
+ }
8087
+ ],
8088
+ "vitest/expect-expect": [
8089
+ "error",
8090
+ {
8091
+ assertFunctionNames: [
8092
+ "expect",
8093
+ "expect*",
8094
+ "waitForElementToBeRemoved",
8095
+ "screen.findBy*",
8096
+ "result.findBy*"
8097
+ ]
8098
+ }
8099
+ ],
8100
+ "vitest/no-alias-methods": "error",
8101
+ "vitest/no-commented-out-tests": {
8102
+ severity: "warn",
8103
+ reason: "the front libs already run this at warn today (read with `eslint --print-config`), so keeping it there is a like-for-like migration. Raising it to error would be a NEW enforcement decision, and it needs its own count of violations first."
8104
+ },
8105
+ "vitest/no-conditional-expect": "error",
8106
+ "vitest/no-disabled-tests": {
8107
+ severity: "warn",
8108
+ reason: "the front libs already run this at warn today (read with `eslint --print-config`), so keeping it there is a like-for-like migration. Raising it to error would be a NEW enforcement decision, and it needs its own count of violations first."
8109
+ },
8110
+ "vitest/no-focused-tests": "error",
8111
+ "vitest/no-identical-title": "error",
8112
+ "vitest/no-interpolation-in-snapshots": "error",
8113
+ "vitest/no-mocks-import": "error",
8114
+ "vitest/no-standalone-expect": "error",
8115
+ "vitest/no-test-prefixes": "error",
8116
+ "vitest/prefer-to-be": "error",
8117
+ "vitest/prefer-to-contain": "error",
8118
+ "vitest/prefer-to-have-length": "error",
8119
+ "vitest/require-mock-type-parameters": {
8120
+ severity: "off",
8121
+ reason: "4 479 of the 5 255 findings this plugin reports over this repository, 85% of them. It asks for type parameters on vi.fn<\u2026>(), a convention this codebase never had; adopting it is its own piece of work and not part of reading the right plugin"
8122
+ },
8123
+ "vitest/require-to-throw-message": {
8124
+ severity: "warn",
8125
+ reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
8126
+ },
8127
+ "vitest/valid-describe-callback": "error",
8128
+ "vitest/valid-expect": "error",
8129
+ "vitest/valid-expect-in-promise": "error",
8130
+ "vitest/valid-title": "error",
8131
+ "vitest/warn-todo": {
8132
+ severity: "warn",
8133
+ reason: "a todo test is a reminder rather than a defect, so it reports and never blocks"
8134
+ }
8135
+ },
8136
+ overrides: [
8137
+ {
8138
+ files: ["**/*.stories.ts", "**/*.stories.tsx", "**/*.stories.js", "**/*.stories.jsx"],
8139
+ rules: {
8140
+ "storybook/await-interactions": "error",
8141
+ "storybook/context-in-play-function": "error",
8142
+ "storybook/default-exports": "error",
8143
+ "storybook/hierarchy-separator": {
8144
+ severity: "warn",
8145
+ reason: "the storybook plugin sets this severity for story files; adoption is like-for-like"
8146
+ },
8147
+ "storybook/no-redundant-story-name": {
8148
+ severity: "warn",
8149
+ reason: "the storybook plugin sets this severity for story files; adoption is like-for-like"
8150
+ },
8151
+ "storybook/no-renderer-packages": "error",
8152
+ "storybook/prefer-pascal-case": {
8153
+ severity: "warn",
8154
+ reason: "the storybook plugin sets this severity for story files; adoption is like-for-like"
8155
+ },
8156
+ "storybook/story-exports": "error",
8157
+ "storybook/use-storybook-expect": "error",
8158
+ "storybook/use-storybook-testing-library": "error",
8159
+ "react-hooks/rules-of-hooks": {
8160
+ severity: "off",
8161
+ reason: "off for story files in the module's own config, and it has to be: a story's render function is not a React component and the rule cannot tell, so it reports every useState in a story. Measured on libs/front/components: 7 errors, none of them real."
8162
+ }
8163
+ }
8164
+ },
8165
+ {
8166
+ files: [
8167
+ "**/*.test.ts",
8168
+ "**/*.test.tsx",
8169
+ "**/*.spec.ts",
8170
+ "**/*.spec.tsx",
8171
+ "**/*.integration-spec.ts",
8172
+ "**/*.e2e-spec.ts"
8173
+ ],
8174
+ rules: {
8175
+ "no-restricted-properties": {
8176
+ severity: "warn",
8177
+ reason: "held at warn: over the 8 011 test files, 7 call Math.random(), 104 call Date.now(), 3 crypto.randomUUID(), 1 performance.now() and 1 process.hrtime, and 28 of the files that read the clock already install fake timers. A warning says it without turning a suite that was green yesterday red. Verified at error on a fixture carrying all nine forms: these six are reported, new Date('2026-01-01') is not, which is the point",
8178
+ options: [
8179
+ {
8180
+ object: "Math",
8181
+ property: "random",
8182
+ message: "No Math.random() in a test: use a deterministic fixture, or stub the random source."
8183
+ },
8184
+ {
8185
+ object: "Date",
8186
+ property: "now",
8187
+ message: "No Date.now() in a test: use vi.useFakeTimers() with vi.setSystemTime()."
8188
+ },
8189
+ {
8190
+ object: "performance",
8191
+ property: "now",
8192
+ message: "No performance.now() in a test: use vi.useFakeTimers() with vi.setSystemTime()."
8193
+ },
8194
+ {
8195
+ object: "process",
8196
+ property: "hrtime",
8197
+ message: "No process.hrtime in a test: use vi.useFakeTimers() with vi.setSystemTime()."
8198
+ },
8199
+ {
8200
+ object: "crypto",
8201
+ property: "randomUUID",
8202
+ message: "No crypto.randomUUID() in a test: use a fixed id, or stub the random source."
8203
+ },
8204
+ {
8205
+ object: "crypto",
8206
+ property: "getRandomValues",
8207
+ message: "No crypto.getRandomValues() in a test: use a fixed buffer, or stub the random source."
8208
+ }
8209
+ ]
8210
+ },
8211
+ "no-restricted-globals": {
8212
+ severity: "warn",
8213
+ reason: "held at warn: 68 test files call setTimeout and only 2 of them install fake timers, so waiting on the real clock is the second source of flakiness after reading it. The flush idiom await new Promise((resolve) => setTimeout(resolve, 0)) is inside that count and is usually harmless, which is exactly why this reports and never blocks",
8214
+ options: [
8215
+ {
8216
+ name: "setTimeout",
8217
+ message: "No real timer in a test: vi.useFakeTimers() then vi.advanceTimersByTime()."
8218
+ },
8219
+ {
8220
+ name: "setInterval",
8221
+ message: "No real timer in a test: vi.useFakeTimers() then vi.advanceTimersByTime()."
8222
+ }
8223
+ ]
8224
+ }
8225
+ }
8226
+ }
8227
+ ],
8228
+ uncovered: {
8229
+ "no-octal": "no oxlint equivalent",
8230
+ "no-restricted-syntax": "no oxlint equivalent; the house rules it encoded ship as the local `hublo` plugin instead, so this tier hosts `../plugins/hublo.js` too. It enforces exactly one of them: `hublo/no-regex-lookbehind`, because a library is where that bug is WRITTEN and it reaches an app tier only by being imported (HUB-43431 shipped from libs/front/components into the worker app). The palette selectors stay app-tier only.",
8231
+ semi: "formatting, and the formatter owns it. It moves to oxfmt, which is deliberately the LAST step of the migration, so nothing enforces it in between."
8232
+ }
8233
+ };
8234
+
8235
+ // src/roles/lint/presets/react.json
8236
+ var react_default = {
8237
+ plugins: ["typescript", "react", "jsx-a11y", "jest", "vitest", "import", "unicorn", "oxc"],
8238
+ jsPlugins: [
8239
+ "eslint-plugin-no-barrel-files",
8240
+ {
8241
+ name: "nx",
8242
+ specifier: "@nx/eslint-plugin"
8243
+ },
8244
+ {
8245
+ name: "@tanstack/query",
8246
+ specifier: "@tanstack/eslint-plugin-query"
8247
+ },
8248
+ {
8249
+ name: "styled-components-a11y",
8250
+ specifier: "eslint-plugin-styled-components-a11y"
8251
+ },
8252
+ {
8253
+ name: "react-refresh",
8254
+ specifier: "eslint-plugin-react-refresh"
8255
+ },
8256
+ "../plugins/hublo.js",
8257
+ {
8258
+ name: "@tanstack/router",
8259
+ specifier: "@tanstack/eslint-plugin-router"
8260
+ }
8261
+ ],
8262
+ settings: null,
8263
+ rules: {
8264
+ "@tanstack/query/exhaustive-deps": {
8265
+ severity: "warn",
8266
+ reason: "held at warn across the react tier: the plugin is now a dependency of sentinel, so the rule runs everywhere instead of being named by a preset that could not load it. Measured over 8 784 files of console, host-admin, libs/front/api and libs/front/components, the eight rules report 806 findings, of which 796 are prefer-query-options and 10 are the correctness ones (exhaustive-deps 9, no-rest-destructuring 1). A module that wants them to block decides that for itself, and pays the 10 fixes"
8267
+ },
8268
+ "@tanstack/query/infinite-query-property-order": {
8269
+ severity: "warn",
8270
+ reason: "held at warn across the react tier: the plugin is now a dependency of sentinel, so the rule runs everywhere instead of being named by a preset that could not load it. Measured over 8 784 files of console, host-admin, libs/front/api and libs/front/components, the eight rules report 806 findings, of which 796 are prefer-query-options and 10 are the correctness ones (exhaustive-deps 9, no-rest-destructuring 1). A module that wants them to block decides that for itself, and pays the 10 fixes"
8271
+ },
8272
+ "@tanstack/query/mutation-property-order": {
8273
+ severity: "warn",
8274
+ reason: "held at warn across the react tier: the plugin is now a dependency of sentinel, so the rule runs everywhere instead of being named by a preset that could not load it. Measured over 8 784 files of console, host-admin, libs/front/api and libs/front/components, the eight rules report 806 findings, of which 796 are prefer-query-options and 10 are the correctness ones (exhaustive-deps 9, no-rest-destructuring 1). A module that wants them to block decides that for itself, and pays the 10 fixes"
8275
+ },
8276
+ "@tanstack/query/no-rest-destructuring": {
8277
+ severity: "warn",
8278
+ reason: "held at warn across the react tier: the plugin is now a dependency of sentinel, so the rule runs everywhere instead of being named by a preset that could not load it. Measured over 8 784 files of console, host-admin, libs/front/api and libs/front/components, the eight rules report 806 findings, of which 796 are prefer-query-options and 10 are the correctness ones (exhaustive-deps 9, no-rest-destructuring 1). A module that wants them to block decides that for itself, and pays the 10 fixes"
8279
+ },
8280
+ "@tanstack/query/no-unstable-deps": {
8281
+ severity: "warn",
8282
+ reason: "held at warn across the react tier: the plugin is now a dependency of sentinel, so the rule runs everywhere instead of being named by a preset that could not load it. Measured over 8 784 files of console, host-admin, libs/front/api and libs/front/components, the eight rules report 806 findings, of which 796 are prefer-query-options and 10 are the correctness ones (exhaustive-deps 9, no-rest-destructuring 1). A module that wants them to block decides that for itself, and pays the 10 fixes"
8283
+ },
8284
+ "@tanstack/query/no-void-query-fn": {
8285
+ severity: "warn",
8286
+ reason: "held at warn across the react tier: the plugin is now a dependency of sentinel, so the rule runs everywhere instead of being named by a preset that could not load it. Measured over 8 784 files of console, host-admin, libs/front/api and libs/front/components, the eight rules report 806 findings, of which 796 are prefer-query-options and 10 are the correctness ones (exhaustive-deps 9, no-rest-destructuring 1). A module that wants them to block decides that for itself, and pays the 10 fixes"
8287
+ },
8288
+ "@tanstack/query/prefer-query-options": {
8289
+ severity: "warn",
8290
+ reason: "held at warn across the react tier: the plugin is now a dependency of sentinel, so the rule runs everywhere instead of being named by a preset that could not load it. Measured over 8 784 files of console, host-admin, libs/front/api and libs/front/components, the eight rules report 806 findings, of which 796 are prefer-query-options and 10 are the correctness ones (exhaustive-deps 9, no-rest-destructuring 1). A module that wants them to block decides that for itself, and pays the 10 fixes"
8291
+ },
8292
+ "@tanstack/query/stable-query-client": {
8293
+ severity: "warn",
8294
+ reason: "held at warn across the react tier: the plugin is now a dependency of sentinel, so the rule runs everywhere instead of being named by a preset that could not load it. Measured over 8 784 files of console, host-admin, libs/front/api and libs/front/components, the eight rules report 806 findings, of which 796 are prefer-query-options and 10 are the correctness ones (exhaustive-deps 9, no-rest-destructuring 1). A module that wants them to block decides that for itself, and pays the 10 fixes"
8295
+ },
8296
+ "@tanstack/router/create-route-property-order": {
8297
+ severity: "warn",
8298
+ reason: "held at warn on the APP tier only: routes live in applications, and libs/front holds 0 of the 227 files that call createFileRoute, the same reason hublo/require-reload-document is here and not in react-lib. Measured over the three fronts, 7 133 files and 226 route files, the two rules report 3 findings, all create-route-property-order on host-admin. The order is not cosmetic: TanStack Router infers types through it"
8299
+ },
8300
+ "@tanstack/router/route-param-names": {
8301
+ severity: "warn",
8302
+ reason: "held at warn on the APP tier only: routes live in applications, and libs/front holds 0 of the 227 files that call createFileRoute, the same reason hublo/require-reload-document is here and not in react-lib. Measured over the three fronts, 7 133 files and 226 route files, the two rules report 3 findings, all create-route-property-order on host-admin. The order is not cosmetic: TanStack Router infers types through it"
8303
+ },
8304
+ curly: ["error", "all"],
8305
+ "for-direction": "error",
8306
+ "hublo/no-palette-common": {
8307
+ severity: "off",
8308
+ reason: "the house rule finds 3 real violations; they are fixed as their own change rather than inside a linter swap, so the rule ships visible-but-off and can be switched on once they are"
8309
+ },
8310
+ "hublo/no-regex-lookbehind": "error",
8311
+ "hublo/require-reload-document": "error",
8312
+ "jest/expect-expect": {
8313
+ severity: "off",
8314
+ reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
8315
+ },
8316
+ "jest/no-alias-methods": {
8317
+ severity: "off",
8318
+ reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
8319
+ },
8320
+ "jest/no-commented-out-tests": {
8321
+ severity: "off",
8322
+ reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
8323
+ },
8324
+ "jest/no-conditional-expect": {
8325
+ severity: "off",
8326
+ reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
8327
+ },
8328
+ "jest/no-deprecated-functions": {
8329
+ severity: "off",
8330
+ reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
8331
+ },
8332
+ "jest/no-disabled-tests": {
8333
+ severity: "off",
8334
+ reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
8335
+ },
8336
+ "jest/no-done-callback": {
8337
+ severity: "off",
8338
+ reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
8339
+ },
8340
+ "jest/no-export": {
8341
+ severity: "off",
8342
+ reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
8343
+ },
8344
+ "jest/no-focused-tests": {
8345
+ severity: "off",
8346
+ reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
8347
+ },
8348
+ "jest/no-identical-title": {
8349
+ severity: "off",
8350
+ reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
8351
+ },
8352
+ "jest/no-interpolation-in-snapshots": {
8353
+ severity: "off",
8354
+ reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
8355
+ },
8356
+ "jest/no-jasmine-globals": {
8357
+ severity: "off",
8358
+ reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
8359
+ },
8360
+ "jest/no-mocks-import": {
8361
+ severity: "off",
8362
+ reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
8363
+ },
8364
+ "jest/no-standalone-expect": {
8365
+ severity: "off",
8366
+ reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
8367
+ },
8368
+ "jest/no-test-prefixes": {
8369
+ severity: "off",
8370
+ reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
8371
+ },
8372
+ "jest/prefer-to-be": {
8373
+ severity: "off",
8374
+ reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
8375
+ },
8376
+ "jest/prefer-to-contain": {
8377
+ severity: "off",
8378
+ reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
8379
+ },
8380
+ "jest/prefer-to-have-length": {
8381
+ severity: "off",
8382
+ reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
8383
+ },
8384
+ "jest/valid-describe-callback": {
8385
+ severity: "off",
8386
+ reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
8387
+ },
8388
+ "jest/valid-expect": {
8389
+ severity: "off",
8390
+ reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
8391
+ },
8392
+ "jest/valid-expect-in-promise": {
8393
+ severity: "off",
8394
+ reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
8395
+ },
8396
+ "jest/valid-title": {
8397
+ severity: "off",
8398
+ reason: "pre-existing test-suite debt; enabling it on adoption would surface a wall of findings and make a lateral move look like a regression"
8399
+ },
8400
+ "jsx-a11y/alt-text": "error",
8401
+ "jsx-a11y/anchor-has-content": "error",
8402
+ "jsx-a11y/anchor-is-valid": "error",
8403
+ "jsx-a11y/aria-activedescendant-has-tabindex": "error",
8404
+ "jsx-a11y/aria-props": "error",
8405
+ "jsx-a11y/aria-proptypes": "error",
8406
+ "jsx-a11y/aria-role": "error",
8407
+ "jsx-a11y/aria-unsupported-elements": "error",
8408
+ "jsx-a11y/autocomplete-valid": "error",
8409
+ "jsx-a11y/click-events-have-key-events": "error",
8410
+ "jsx-a11y/heading-has-content": "error",
8411
+ "jsx-a11y/html-has-lang": "error",
8412
+ "jsx-a11y/iframe-has-title": "error",
8413
+ "jsx-a11y/img-redundant-alt": {
8414
+ severity: "off",
8415
+ reason: 'one real finding, a decorative image whose title is already rendered as a heading beside it, so the fix is alt="". A genuine accessibility issue rather than a false positive: parked only so swapping linters stays a lateral move, and worth switching back on as soon as it is fixed'
8416
+ },
8417
+ "jsx-a11y/interactive-supports-focus": [
8418
+ "error",
8419
+ {
8420
+ tabbable: [
8421
+ "button",
8422
+ "checkbox",
8423
+ "link",
8424
+ "progressbar",
8425
+ "searchbox",
8426
+ "slider",
8427
+ "spinbutton",
8428
+ "switch",
8429
+ "textbox"
8430
+ ]
8431
+ }
8432
+ ],
8433
+ "jsx-a11y/label-has-associated-control": "error",
8434
+ "jsx-a11y/media-has-caption": "error",
8435
+ "jsx-a11y/mouse-events-have-key-events": "error",
8436
+ "jsx-a11y/no-access-key": "error",
8437
+ "jsx-a11y/no-autofocus": "error",
8438
+ "jsx-a11y/no-distracting-elements": "error",
8439
+ "jsx-a11y/no-interactive-element-to-noninteractive-role": "error",
8440
+ "jsx-a11y/no-noninteractive-element-interactions": [
8441
+ "error",
8442
+ {
8443
+ body: ["onError", "onLoad"],
8444
+ iframe: ["onError", "onLoad"],
8445
+ img: ["onError", "onLoad"]
8446
+ }
8447
+ ],
8448
+ "jsx-a11y/no-noninteractive-element-to-interactive-role": "error",
8449
+ "jsx-a11y/no-noninteractive-tabindex": "error",
8450
+ "jsx-a11y/no-redundant-roles": "error",
8451
+ "jsx-a11y/no-static-element-interactions": "error",
8452
+ "jsx-a11y/role-has-required-aria-props": "error",
8453
+ "jsx-a11y/role-supports-aria-props": "error",
8454
+ "jsx-a11y/scope": "error",
8455
+ "jsx-a11y/tabindex-no-positive": "error",
8456
+ "no-async-promise-executor": "error",
8457
+ "no-barrel-files/no-barrel-files": {
8458
+ severity: "warn",
8459
+ reason: "the modules already ran this at warn (confirmed in the host-admin proof-of-concept config); nest disables it outright as deliberate architecture, react keeps it visible"
8460
+ },
8461
+ "no-case-declarations": "error",
8462
+ "no-compare-neg-zero": "error",
8463
+ "no-cond-assign": ["error", "except-parens"],
8464
+ "no-console": {
8465
+ severity: "off",
8466
+ reason: "pre-existing debt measured during the proof of concept; parked so adoption stays non-breaking"
8467
+ },
8468
+ "no-constant-binary-expression": "error",
8469
+ "no-constant-condition": [
8470
+ "error",
8471
+ {
8472
+ checkLoops: "allExceptWhileTrue"
8473
+ }
8474
+ ],
8475
+ "no-control-regex": "error",
8476
+ "no-debugger": "error",
8477
+ "no-delete-var": "error",
8478
+ "no-dupe-else-if": "error",
8479
+ "no-duplicate-case": "error",
8480
+ "no-empty": [
8481
+ "error",
8482
+ {
8483
+ allowEmptyCatch: false
8484
+ }
8485
+ ],
8486
+ "no-empty-character-class": "error",
8487
+ "no-empty-pattern": [
8488
+ "error",
8489
+ {
8490
+ allowObjectPatternsAsParameters: false
8491
+ }
8492
+ ],
8493
+ "no-empty-static-block": "error",
8494
+ "no-ex-assign": "error",
8495
+ "no-extra-boolean-cast": ["error", {}],
8496
+ "no-fallthrough": [
8497
+ "error",
8498
+ {
8499
+ allowEmptyCase: false,
8500
+ reportUnusedFallthroughComment: false
8501
+ }
8502
+ ],
8503
+ "no-global-assign": [
8504
+ "error",
8505
+ {
8506
+ exceptions: []
8507
+ }
8508
+ ],
8509
+ "no-invalid-regexp": ["error", {}],
8510
+ "no-irregular-whitespace": [
8511
+ "error",
8512
+ {
8513
+ skipComments: false,
8514
+ skipJSXText: false,
8515
+ skipRegExps: false,
8516
+ skipStrings: true,
8517
+ skipTemplates: false
8518
+ }
8519
+ ],
8520
+ "no-loss-of-precision": "error",
8521
+ "no-misleading-character-class": "error",
8522
+ "no-nonoctal-decimal-escape": "error",
8523
+ "no-prototype-builtins": "error",
8524
+ "no-regex-spaces": "error",
8525
+ "no-restricted-imports": [
8526
+ "error",
8527
+ {
8528
+ patterns: [
8529
+ {
8530
+ group: ["next/*"],
8531
+ message: "Importing from next/* is not allowed in the admin project."
8532
+ },
8533
+ {
8534
+ group: ["storybook/*"],
8535
+ message: "Importing from storybook/* is not allowed in the admin project."
8536
+ },
8537
+ {
8538
+ group: ["@nestjs/*"],
8539
+ message: "Importing from @nestjs/* is not allowed in the admin project."
8540
+ },
8541
+ {
8542
+ group: ["next-i18next"],
8543
+ message: "Importing from next-i18next is not allowed in the admin project."
8544
+ },
8545
+ {
8546
+ group: ["@hublo/style/colors", "@hublo/style/colors/*"],
8547
+ message: "Importing runtime colors directly is not allowed. Use the MUI theme, theme-derived CSS variables, or an explicit product-specific mapping."
8548
+ }
8549
+ ]
8550
+ }
8551
+ ],
8552
+ "no-self-assign": [
8553
+ "error",
8554
+ {
8555
+ props: true
8556
+ }
8557
+ ],
8558
+ "no-shadow-restricted-names": [
8559
+ "error",
8560
+ {
8561
+ reportGlobalThis: false
8562
+ }
8563
+ ],
8564
+ "no-sparse-arrays": "error",
8565
+ "no-unexpected-multiline": "error",
8566
+ "no-unsafe-finally": "error",
8567
+ "no-unsafe-optional-chaining": {
8568
+ severity: "off",
8569
+ reason: "pre-existing debt measured during the proof of concept; parked so adoption stays non-breaking"
8570
+ },
8571
+ "no-unused-labels": "error",
8572
+ "no-unused-private-class-members": "error",
8573
+ "no-useless-backreference": "error",
8574
+ "no-useless-catch": "error",
8575
+ "no-useless-escape": [
8576
+ "error",
8577
+ {
8578
+ allowRegexCharacters: []
8579
+ }
8580
+ ],
8581
+ "nx/enforce-module-boundaries": [
8582
+ "error",
8583
+ {
8584
+ enforceBuildableLibDependency: true,
8585
+ allow: [],
8586
+ depConstraints: [
8587
+ {
8588
+ sourceTag: "*",
8589
+ onlyDependOnLibsWithTags: ["*"]
8590
+ }
8591
+ ]
8592
+ }
8593
+ ],
8594
+ "react-hooks/exhaustive-deps": {
8595
+ severity: "warn",
8596
+ reason: "the modules already ran this at warn (confirmed in the host-admin proof-of-concept config); its suggested fix can change behaviour, so it reports and a human decides"
8597
+ },
8598
+ "react-hooks/rules-of-hooks": "error",
8599
+ "react-refresh/only-export-components": {
8600
+ severity: "warn",
8601
+ reason: "the modules already ran this at warn (confirmed in the host-admin proof-of-concept config); it guards fast-refresh ergonomics, not correctness",
8602
+ options: [
8603
+ {
8604
+ allowConstantExport: true
8605
+ }
8606
+ ]
8607
+ },
8608
+ "react/jsx-curly-brace-presence": {
8609
+ severity: "off",
8610
+ reason: "pre-existing debt measured during the proof of concept; parked so adoption stays non-breaking"
8611
+ },
8612
+ "require-yield": "error",
8613
+ "styled-components-a11y/alt-text": "error",
8614
+ "styled-components-a11y/anchor-has-content": "error",
8615
+ "styled-components-a11y/anchor-is-valid": "error",
8616
+ "styled-components-a11y/aria-activedescendant-has-tabindex": "error",
8617
+ "styled-components-a11y/aria-props": "error",
8618
+ "styled-components-a11y/aria-proptypes": "error",
8619
+ "styled-components-a11y/aria-role": "error",
8620
+ "styled-components-a11y/aria-unsupported-elements": "error",
8621
+ "styled-components-a11y/autocomplete-valid": "error",
8622
+ "styled-components-a11y/click-events-have-key-events": "error",
8623
+ "styled-components-a11y/control-has-associated-label": {
8624
+ severity: "off",
8625
+ reason: "off in the host-admin proof-of-concept config, with its element and role ignore lists; it fires on composed styled components where the label lives in a wrapper the rule cannot see",
8626
+ options: [
8627
+ {
8628
+ ignoreElements: ["audio", "canvas", "embed", "input", "textarea", "tr", "video"],
8629
+ ignoreRoles: [
8630
+ "grid",
8631
+ "listbox",
8632
+ "menu",
8633
+ "menubar",
8634
+ "radiogroup",
8635
+ "row",
8636
+ "tablist",
8637
+ "toolbar",
8638
+ "tree",
8639
+ "treegrid"
8640
+ ],
8641
+ includeRoles: ["alert", "dialog"]
8642
+ }
8643
+ ]
8644
+ },
8645
+ "styled-components-a11y/heading-has-content": "error",
8646
+ "styled-components-a11y/html-has-lang": "error",
8647
+ "styled-components-a11y/iframe-has-title": "error",
8648
+ "styled-components-a11y/img-redundant-alt": "error",
8649
+ "styled-components-a11y/interactive-supports-focus": [
8650
+ "error",
8651
+ {
8652
+ tabbable: [
8653
+ "button",
8654
+ "checkbox",
8655
+ "link",
8656
+ "progressbar",
8657
+ "searchbox",
8658
+ "slider",
8659
+ "spinbutton",
8660
+ "switch",
8661
+ "textbox"
8662
+ ]
8663
+ }
8664
+ ],
8665
+ "styled-components-a11y/label-has-associated-control": "error",
8666
+ "styled-components-a11y/label-has-for": {
8667
+ severity: "off",
8668
+ reason: "pre-existing debt measured during the proof of concept; parked so adoption stays non-breaking"
8669
+ },
8670
+ "styled-components-a11y/media-has-caption": "error",
8671
+ "styled-components-a11y/mouse-events-have-key-events": "error",
8672
+ "styled-components-a11y/no-access-key": "error",
8673
+ "styled-components-a11y/no-autofocus": "error",
8674
+ "styled-components-a11y/no-distracting-elements": "error",
8675
+ "styled-components-a11y/no-interactive-element-to-noninteractive-role": "error",
8676
+ "styled-components-a11y/no-noninteractive-element-interactions": [
8677
+ "error",
8678
+ {
8679
+ body: ["onError", "onLoad"],
8680
+ iframe: ["onError", "onLoad"],
8681
+ img: ["onError", "onLoad"]
8682
+ }
8683
+ ],
8684
+ "styled-components-a11y/no-noninteractive-element-to-interactive-role": "error",
8685
+ "styled-components-a11y/no-noninteractive-tabindex": "error",
8686
+ "styled-components-a11y/no-redundant-roles": "error",
8687
+ "styled-components-a11y/no-static-element-interactions": "error",
8688
+ "styled-components-a11y/role-has-required-aria-props": "error",
8689
+ "styled-components-a11y/role-supports-aria-props": "error",
8690
+ "styled-components-a11y/scope": "error",
8691
+ "styled-components-a11y/tabindex-no-positive": "error",
8692
+ "typescript/await-thenable": "error",
8693
+ "typescript/no-array-delete": "error",
8694
+ "typescript/no-base-to-string": "error",
8695
+ "typescript/no-duplicate-type-constituents": "error",
8696
+ "typescript/no-empty-function": {
8697
+ severity: "off",
8698
+ reason: "pre-existing debt measured during the proof of concept; parked so adoption stays non-breaking"
8699
+ },
8700
+ "typescript/no-explicit-any": {
8701
+ severity: "off",
8702
+ reason: "pre-existing debt measured during the proof of concept; parked so adoption stays non-breaking"
8703
+ },
8704
+ "typescript/no-floating-promises": [
8705
+ "error",
8706
+ {
8707
+ ignoreVoid: true
8708
+ }
8709
+ ],
8710
+ "typescript/no-for-in-array": "error",
8711
+ "typescript/no-implied-eval": "error",
8712
+ "typescript/no-inferrable-types": "error",
8713
+ "typescript/no-misused-promises": [
8714
+ "error",
8715
+ {
8716
+ checksVoidReturn: {
8717
+ attributes: false
8718
+ }
8719
+ }
8720
+ ],
8721
+ "typescript/no-non-null-assertion": {
8722
+ severity: "warn",
8723
+ reason: "kept at the severity the proof of concept measured; no module config set it, so raising it to error would be a NEW enforcement decision rather than a like-for-like migration, and it needs its own count of violations first"
8724
+ },
8725
+ "typescript/no-redundant-type-constituents": "error",
8726
+ "typescript/no-require-imports": "error",
8727
+ "typescript/no-unnecessary-type-assertion": {
8728
+ severity: "off",
8729
+ reason: "pre-existing debt measured during the proof of concept; parked so adoption stays non-breaking"
8730
+ },
8731
+ "typescript/no-unsafe-argument": {
8732
+ severity: "off",
8733
+ reason: "pre-existing debt measured during the proof of concept; parked so adoption stays non-breaking"
8734
+ },
8735
+ "typescript/no-unsafe-assignment": {
8736
+ severity: "off",
8737
+ reason: "pre-existing debt measured during the proof of concept; parked so adoption stays non-breaking"
8738
+ },
8739
+ "typescript/no-unsafe-call": {
8740
+ severity: "off",
8741
+ reason: "pre-existing debt measured during the proof of concept; parked so adoption stays non-breaking"
8742
+ },
8743
+ "typescript/no-unsafe-enum-comparison": {
8744
+ severity: "off",
8745
+ reason: "pre-existing debt measured during the proof of concept; parked so adoption stays non-breaking"
8746
+ },
8747
+ "typescript/no-unsafe-member-access": {
8748
+ severity: "off",
8749
+ reason: "pre-existing debt measured during the proof of concept; parked so adoption stays non-breaking"
8750
+ },
8751
+ "typescript/no-unsafe-return": {
8752
+ severity: "off",
8753
+ reason: "pre-existing debt measured during the proof of concept; parked so adoption stays non-breaking"
8754
+ },
8755
+ "typescript/no-unsafe-unary-minus": "error",
8756
+ "typescript/only-throw-error": {
8757
+ severity: "off",
8758
+ reason: "pre-existing debt measured during the proof of concept; parked so adoption stays non-breaking"
8759
+ },
8760
+ "typescript/prefer-promise-reject-errors": "error",
8761
+ "typescript/require-await": {
8762
+ severity: "off",
8763
+ reason: "pre-existing debt measured during the proof of concept; parked so adoption stays non-breaking"
8764
+ },
8765
+ "typescript/restrict-plus-operands": "error",
8766
+ "typescript/restrict-template-expressions": "error",
8767
+ "typescript/return-await": {
8768
+ severity: "warn",
8769
+ reason: "replaces the deprecated core `no-return-await`, which both modules set to error but which was never actually reporting: the nx lint target expanded to 2 files of 2888. `in-try-catch` rather than `never`, and the planning adoption is what settled it. `never` forces `return await f()` to become `const x = await f(); return x` even inside a `try`, where the await is REQUIRED for the catch to fire: it produced 10 such edits across 15 modules, every one of them inside a try/catch, and every one of them a rewrite that made the code longer without making it safer. Worse, the obvious reading of the rule is to delete the `await`, which silently stops the catch from running. `in-try-catch` is what typescript-eslint recommends and flags none of those 10. Held at warn so adoption does not turn a green module red, and raised to error once the remaining findings are fixed.",
8770
+ options: ["in-try-catch"]
8771
+ },
8772
+ "typescript/switch-exhaustiveness-check": {
8773
+ severity: "warn",
8774
+ reason: "kept at the severity the proof of concept measured; no module config set it, so raising it to error would be a NEW enforcement decision rather than a like-for-like migration, and it needs its own count of violations first"
8775
+ },
8776
+ "typescript/unbound-method": "error",
8777
+ "use-isnan": [
8778
+ "error",
8779
+ {
8780
+ enforceForIndexOf: false,
8781
+ enforceForSwitchCase: true
8782
+ }
8783
+ ],
8784
+ "valid-typeof": [
8785
+ "error",
8786
+ {
8787
+ requireStringLiterals: false
8788
+ }
8789
+ ],
8790
+ "vitest/expect-expect": {
8791
+ severity: "warn",
8792
+ reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
8793
+ },
8794
+ "vitest/no-alias-methods": {
8795
+ severity: "warn",
8796
+ reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
8797
+ },
8798
+ "vitest/no-commented-out-tests": {
8799
+ severity: "warn",
8800
+ reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
8801
+ },
8802
+ "vitest/no-conditional-expect": {
8803
+ severity: "warn",
8804
+ reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
8805
+ },
8806
+ "vitest/no-disabled-tests": {
8807
+ severity: "warn",
8808
+ reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
8809
+ },
8810
+ "vitest/no-focused-tests": {
8811
+ severity: "warn",
8812
+ reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
8813
+ },
8814
+ "vitest/no-identical-title": {
8815
+ severity: "warn",
8816
+ reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
8817
+ },
8818
+ "vitest/no-interpolation-in-snapshots": {
8819
+ severity: "warn",
8820
+ reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
8821
+ },
8822
+ "vitest/no-mocks-import": {
8823
+ severity: "warn",
8824
+ reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
8825
+ },
8826
+ "vitest/no-standalone-expect": {
8827
+ severity: "warn",
8828
+ reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
8829
+ },
8830
+ "vitest/no-test-prefixes": {
8831
+ severity: "warn",
8832
+ reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
8833
+ },
8834
+ "vitest/prefer-to-be": {
8835
+ severity: "warn",
8836
+ reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
8837
+ },
8838
+ "vitest/prefer-to-contain": {
8839
+ severity: "warn",
8840
+ reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
8841
+ },
8842
+ "vitest/prefer-to-have-length": {
8843
+ severity: "warn",
8844
+ reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
8845
+ },
8846
+ "vitest/require-mock-type-parameters": {
8847
+ severity: "off",
8848
+ reason: "4 479 of the 5 255 findings this plugin reports over this repository, 85% of them. It asks for type parameters on vi.fn<\u2026>(), a convention this codebase never had; adopting it is its own piece of work and not part of reading the right plugin"
8849
+ },
8850
+ "vitest/require-to-throw-message": {
8851
+ severity: "warn",
8852
+ reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
8853
+ },
8854
+ "vitest/valid-describe-callback": {
8855
+ severity: "warn",
8856
+ reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
8857
+ },
8858
+ "vitest/valid-expect": {
8859
+ severity: "warn",
8860
+ reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
8861
+ },
8862
+ "vitest/valid-expect-in-promise": {
8863
+ severity: "warn",
8864
+ reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
8865
+ },
8866
+ "vitest/valid-title": {
8867
+ severity: "warn",
8868
+ reason: "new to this preset and the test suite predates it, so it reports and never blocks. The reason the jest equivalent was parked was that enabling it on adoption would make a lateral move look like a regression; a warning does not"
8869
+ },
8870
+ "vitest/warn-todo": {
8871
+ severity: "warn",
8872
+ reason: "a todo test is a reminder rather than a defect, so it reports and never blocks"
8873
+ }
8874
+ },
8875
+ uncovered: {
8876
+ "import/order": "import ordering is FORMATTING, and the format role owns it: oxfmt's `sortImports` reproduces exactly these groups (builtin, external, internal, parent/index, sibling, alphabetical, blank line between) and sorts a file completely in ONE pass, because it rewrites the whole import block. A lint fixer cannot: it emits text edits over overlapping ranges, so this rule needed several runs to finish (five imports took four passes, measured) and sentinel deliberately runs autofix once. Enforced by `pnpm run format`, not by the linter, which is also why `eslint-plugin-import` is no longer hosted at all: its only other rule, no-duplicates, is native in oxlint.",
8877
+ "no-octal": "no oxlint equivalent",
8878
+ "no-restricted-syntax": "no oxlint equivalent as configuration, so the AST selectors this repo used are shipped as real rules in the local `hublo` plugin instead, which this tier hosts (`../plugins/hublo.js`). Three are hosted today: the eight palette selectors as `hublo/no-palette-common`, the lookbehind selector as `hublo/no-regex-lookbehind`, and the TanStack Router one as `hublo/require-reload-document`, carried here from an ESLint selector in the monorepo (PR #22043) because ADR 0042 makes this the layer that outlives it. App tier only: measured on main, `libs/front` calls `redirect(` nowhere, while host-admin does in 93 files and console in 2. Any selector NOT in that plugin is not enforced here; propose it and it joins the plugin rather than a per-module copy.",
8879
+ semi: "formatting, and the formatter owns it. It moves to oxfmt, which is deliberately the LAST step of the migration, so nothing enforces it in between."
8880
+ },
8881
+ overrides: [
8882
+ {
8883
+ files: [
8884
+ "**/*.test.ts",
8885
+ "**/*.test.tsx",
8886
+ "**/*.spec.ts",
8887
+ "**/*.spec.tsx",
8888
+ "**/*.integration-spec.ts",
8889
+ "**/*.e2e-spec.ts"
8890
+ ],
8891
+ rules: {
8892
+ "no-restricted-properties": {
8893
+ severity: "warn",
8894
+ reason: "held at warn: over the 8 011 test files, 7 call Math.random(), 104 call Date.now(), 3 crypto.randomUUID(), 1 performance.now() and 1 process.hrtime, and 28 of the files that read the clock already install fake timers. A warning says it without turning a suite that was green yesterday red. Verified at error on a fixture carrying all nine forms: these six are reported, new Date('2026-01-01') is not, which is the point",
8895
+ options: [
8896
+ {
8897
+ object: "Math",
8898
+ property: "random",
8899
+ message: "No Math.random() in a test: use a deterministic fixture, or stub the random source."
8900
+ },
8901
+ {
8902
+ object: "Date",
8903
+ property: "now",
8904
+ message: "No Date.now() in a test: use vi.useFakeTimers() with vi.setSystemTime()."
8905
+ },
8906
+ {
8907
+ object: "performance",
8908
+ property: "now",
8909
+ message: "No performance.now() in a test: use vi.useFakeTimers() with vi.setSystemTime()."
8910
+ },
8911
+ {
8912
+ object: "process",
8913
+ property: "hrtime",
8914
+ message: "No process.hrtime in a test: use vi.useFakeTimers() with vi.setSystemTime()."
8915
+ },
8916
+ {
8917
+ object: "crypto",
8918
+ property: "randomUUID",
8919
+ message: "No crypto.randomUUID() in a test: use a fixed id, or stub the random source."
8920
+ },
8921
+ {
8922
+ object: "crypto",
8923
+ property: "getRandomValues",
8924
+ message: "No crypto.getRandomValues() in a test: use a fixed buffer, or stub the random source."
8925
+ }
8926
+ ]
8927
+ },
8928
+ "no-restricted-globals": {
8929
+ severity: "warn",
8930
+ reason: "held at warn: 68 test files call setTimeout and only 2 of them install fake timers, so waiting on the real clock is the second source of flakiness after reading it. The flush idiom await new Promise((resolve) => setTimeout(resolve, 0)) is inside that count and is usually harmless, which is exactly why this reports and never blocks",
8931
+ options: [
8932
+ {
8933
+ name: "setTimeout",
8934
+ message: "No real timer in a test: vi.useFakeTimers() then vi.advanceTimersByTime()."
8935
+ },
8936
+ {
8937
+ name: "setInterval",
8938
+ message: "No real timer in a test: vi.useFakeTimers() then vi.advanceTimersByTime()."
8939
+ }
8940
+ ]
8941
+ }
8942
+ }
8943
+ }
8944
+ ]
8945
+ };
8946
+
8947
+ // src/roles/lint/presets/shared.json
8948
+ var shared_default = {
8949
+ rules: {
8950
+ "no-var": "error",
8951
+ "prefer-const": [
8952
+ "error",
8953
+ {
8954
+ destructuring: "any",
8955
+ ignoreReadBeforeAssign: false
8956
+ }
8957
+ ],
8958
+ "prefer-rest-params": "error",
8959
+ "prefer-spread": "error",
8960
+ "typescript/ban-ts-comment": "error",
8961
+ "typescript/no-array-constructor": "error",
8962
+ "typescript/no-duplicate-enum-values": "error",
8963
+ "typescript/no-empty-object-type": "error",
8964
+ "typescript/no-extra-non-null-assertion": "error",
8965
+ "typescript/no-misused-new": "error",
8966
+ "typescript/no-namespace": "error",
8967
+ "typescript/no-non-null-asserted-optional-chain": "error",
8968
+ "typescript/no-this-alias": "error",
8969
+ "typescript/no-unnecessary-type-constraint": "error",
8970
+ "typescript/no-unsafe-declaration-merging": "error",
8971
+ "typescript/no-unsafe-function-type": "error",
8972
+ "typescript/no-unused-expressions": [
8973
+ "error",
8974
+ {
8975
+ allowShortCircuit: false,
8976
+ allowTaggedTemplates: false,
8977
+ allowTernary: false
8978
+ }
8979
+ ],
8980
+ "typescript/no-unused-vars": [
8981
+ "error",
8982
+ {
8983
+ argsIgnorePattern: "^_",
8984
+ caughtErrors: "none",
8985
+ ignoreRestSiblings: true
8986
+ }
8987
+ ],
8988
+ "typescript/no-wrapper-object-types": "error",
8989
+ "typescript/prefer-as-const": "error",
8990
+ "typescript/prefer-namespace-keyword": "error",
8991
+ "typescript/triple-slash-reference": "error"
8992
+ }
8993
+ };
8994
+
8995
+ // src/roles/lint/presets/svelte.json
8996
+ var svelte_default = {
8997
+ plugins: ["typescript", "oxc"],
8998
+ jsPlugins: [],
8999
+ settings: null,
9000
+ rules: {
9001
+ "constructor-super": "error",
9002
+ "for-direction": "error",
9003
+ "getter-return": [
9004
+ "error",
9005
+ {
9006
+ allowImplicit: false
9007
+ }
9008
+ ],
9009
+ "no-async-promise-executor": "error",
9010
+ "no-case-declarations": "error",
9011
+ "no-class-assign": "error",
9012
+ "no-compare-neg-zero": "error",
9013
+ "no-cond-assign": ["error", "except-parens"],
9014
+ "no-const-assign": "error",
9015
+ "no-constant-binary-expression": "error",
9016
+ "no-constant-condition": [
9017
+ "error",
9018
+ {
9019
+ checkLoops: "allExceptWhileTrue"
9020
+ }
9021
+ ],
9022
+ "no-control-regex": "error",
9023
+ "no-debugger": "error",
9024
+ "no-delete-var": "error",
9025
+ "no-dupe-class-members": "error",
9026
+ "no-dupe-else-if": "error",
9027
+ "no-dupe-keys": "error",
9028
+ "no-duplicate-case": "error",
9029
+ "no-empty": [
9030
+ "error",
9031
+ {
9032
+ allowEmptyCatch: false
9033
+ }
9034
+ ],
9035
+ "no-empty-character-class": "error",
9036
+ "no-empty-pattern": [
9037
+ "error",
9038
+ {
9039
+ allowObjectPatternsAsParameters: false
9040
+ }
9041
+ ],
9042
+ "no-empty-static-block": "error",
9043
+ "no-ex-assign": "error",
9044
+ "no-extra-boolean-cast": ["error", {}],
9045
+ "no-fallthrough": [
9046
+ "error",
9047
+ {
9048
+ allowEmptyCase: false,
9049
+ reportUnusedFallthroughComment: false
9050
+ }
9051
+ ],
9052
+ "no-func-assign": "error",
9053
+ "no-global-assign": [
9054
+ "error",
9055
+ {
9056
+ exceptions: []
9057
+ }
9058
+ ],
9059
+ "no-import-assign": "error",
9060
+ "no-invalid-regexp": ["error", {}],
9061
+ "no-irregular-whitespace": [
9062
+ "error",
9063
+ {
9064
+ skipComments: false,
9065
+ skipJSXText: false,
9066
+ skipRegExps: false,
9067
+ skipStrings: true,
9068
+ skipTemplates: false
9069
+ }
9070
+ ],
9071
+ "no-loss-of-precision": "error",
9072
+ "no-misleading-character-class": "error",
9073
+ "no-new-native-nonconstructor": "error",
9074
+ "no-nonoctal-decimal-escape": "error",
9075
+ "no-obj-calls": "error",
9076
+ "no-prototype-builtins": "error",
9077
+ "no-redeclare": [
9078
+ "error",
9079
+ {
9080
+ builtinGlobals: true
9081
+ }
9082
+ ],
9083
+ "no-regex-spaces": "error",
9084
+ "no-self-assign": [
9085
+ "error",
9086
+ {
9087
+ props: true
9088
+ }
9089
+ ],
9090
+ "no-setter-return": "error",
9091
+ "no-shadow-restricted-names": [
9092
+ "error",
9093
+ {
9094
+ reportGlobalThis: false
9095
+ }
9096
+ ],
9097
+ "no-sparse-arrays": "error",
9098
+ "no-this-before-super": "error",
9099
+ "no-undef": {
9100
+ severity: "off",
9101
+ reason: "unusable under oxlint for Svelte, and not for want of configuration. Svelte 5's runes ($state, $props, $derived, $effect) are compiler globals, and `$store` auto-subscription invents an identifier per store ($_, $page, $currentAdmin, \u2026), so the names cannot be enumerated. eslint-plugin-svelte's PARSER supplies both; oxlint has no Svelte parser, so it reported 1641 undefined identifiers on hr-management, none of them real. TypeScript and svelte-check already report genuinely undefined identifiers, which is why react and nest never enabled this rule either."
9102
+ },
9103
+ "no-unreachable": "error",
9104
+ "no-unsafe-finally": "error",
9105
+ "no-unsafe-negation": [
9106
+ "error",
9107
+ {
9108
+ enforceForOrderingRelations: false
9109
+ }
9110
+ ],
9111
+ "no-unsafe-optional-chaining": [
9112
+ "error",
9113
+ {
9114
+ disallowArithmeticOperators: false
9115
+ }
9116
+ ],
9117
+ "no-unused-labels": "error",
9118
+ "no-unused-private-class-members": "error",
9119
+ "no-useless-backreference": "error",
9120
+ "no-useless-catch": "error",
9121
+ "no-useless-escape": [
9122
+ "error",
9123
+ {
9124
+ allowRegexCharacters: []
9125
+ }
9126
+ ],
9127
+ "no-with": "error",
9128
+ "prefer-rest-params": {
9129
+ severity: "warn",
9130
+ reason: "error in the module's eslint config, but never actually reported: `eslint src/lib/analytics/useAnalytics.js` exits clean today while oxlint finds 3 real violations in it. Held at warn so adoption does not turn a green module red, and restored to error once they are fixed. Not auto-fixable, verified with --fix."
9131
+ },
9132
+ "prefer-spread": {
9133
+ severity: "warn",
9134
+ reason: "error in the module's eslint config, but never actually reported: `eslint src/lib/analytics/useAnalytics.js` exits clean today while oxlint finds 3 real violations in it. Held at warn so adoption does not turn a green module red, and restored to error once they are fixed. Not auto-fixable, verified with --fix."
9135
+ },
9136
+ "require-yield": "error",
9137
+ "typescript/no-explicit-any": {
9138
+ severity: "warn",
9139
+ reason: "libs/front/ui enforces it and apps/front/hr-management turns it off; enforcing it would newly fail hr-management, so it reports for both instead of breaking one"
9140
+ },
9141
+ "typescript/no-require-imports": "error",
9142
+ "use-isnan": [
9143
+ "error",
9144
+ {
9145
+ enforceForIndexOf: false,
9146
+ enforceForSwitchCase: true
9147
+ }
9148
+ ],
9149
+ "valid-typeof": [
9150
+ "error",
9151
+ {
9152
+ requireStringLiterals: false
9153
+ }
9154
+ ]
9155
+ },
9156
+ uncovered: {
9157
+ "svelte/comment-directive": "oxlint cannot parse Svelte templates, so the eslint-disable comments inside markup are neither read nor honoured",
9158
+ "svelte/system": "the plugin internal rule that reports Svelte parse errors; it needs the Svelte parser",
9159
+ "svelte/no-at-debug-tags": "reads {@debug} in the template",
9160
+ "svelte/no-at-html-tags": "reads {@html} in the template, the XSS guard; the highest-value loss in this list",
9161
+ "svelte/no-dupe-else-if-blocks": "reads {#if}/{:else if} chains in the template",
9162
+ "svelte/no-dupe-style-properties": "reads the style block",
9163
+ "svelte/no-dynamic-slot-name": "reads <slot> in the template",
9164
+ "svelte/no-inner-declarations": "the Svelte-aware variant; the core rule it shadows is not a substitute inside markup",
9165
+ "svelte/no-not-function-handler": "reads on:event handlers in the template",
9166
+ "svelte/no-object-in-text-mustaches": "reads {expression} interpolation in the template",
9167
+ "svelte/no-shorthand-style-property-overrides": "reads the style block",
9168
+ "svelte/no-unknown-style-directive-property": "reads style: directives in the template",
9169
+ "svelte/no-unused-svelte-ignore": "reads svelte-ignore comments in the template",
9170
+ "svelte/valid-compile": "runs the Svelte compiler and reports its warnings",
9171
+ "no-dupe-args": "no oxlint equivalent (TypeScript rejects duplicate parameter names anyway)",
9172
+ "no-octal": "no oxlint equivalent"
9173
+ }
9174
+ };
9175
+
9176
+ // src/roles/lint/presets/tools.json
9177
+ var tools_default = {
9178
+ plugins: ["typescript", "oxc", "unicorn", "import", "node"],
9179
+ jsPlugins: [],
9180
+ settings: null,
9181
+ rules: {
9182
+ "for-direction": "error",
9183
+ "no-async-promise-executor": "error",
9184
+ "no-case-declarations": "error",
9185
+ "no-compare-neg-zero": "error",
9186
+ "no-cond-assign": ["error", "except-parens"],
9187
+ "no-constant-binary-expression": [
9188
+ "error",
9189
+ {
9190
+ checkRelationalComparisons: false
9191
+ }
9192
+ ],
9193
+ "no-constant-condition": [
9194
+ "error",
9195
+ {
9196
+ checkLoops: "allExceptWhileTrue"
9197
+ }
9198
+ ],
9199
+ "no-control-regex": "error",
9200
+ "no-debugger": "error",
9201
+ "no-delete-var": "error",
9202
+ "no-dupe-else-if": "error",
9203
+ "no-duplicate-case": "error",
9204
+ "no-empty": [
9205
+ "error",
9206
+ {
9207
+ allowEmptyCatch: false
9208
+ }
9209
+ ],
9210
+ "no-empty-character-class": "error",
9211
+ "no-empty-pattern": [
9212
+ "error",
9213
+ {
9214
+ allowObjectPatternsAsParameters: false
9215
+ }
9216
+ ],
9217
+ "no-empty-static-block": "error",
9218
+ "no-ex-assign": "error",
9219
+ "no-extra-boolean-cast": ["error", {}],
9220
+ "no-fallthrough": [
9221
+ "error",
9222
+ {
9223
+ allowEmptyCase: false,
9224
+ reportUnusedFallthroughComment: false
9225
+ }
9226
+ ],
9227
+ "no-global-assign": [
9228
+ "error",
9229
+ {
9230
+ exceptions: []
9231
+ }
9232
+ ],
9233
+ "no-invalid-regexp": ["error", {}],
9234
+ "no-irregular-whitespace": [
9235
+ "error",
9236
+ {
9237
+ skipComments: false,
9238
+ skipJSXText: false,
9239
+ skipRegExps: false,
9240
+ skipStrings: true,
9241
+ skipTemplates: false
9242
+ }
9243
+ ],
9244
+ "no-loss-of-precision": "error",
9245
+ "no-misleading-character-class": [
9246
+ "error",
9247
+ {
9248
+ allowEscape: false
9249
+ }
9250
+ ],
9251
+ "no-nonoctal-decimal-escape": "error",
9252
+ "no-prototype-builtins": "error",
9253
+ "no-regex-spaces": "error",
9254
+ "no-self-assign": [
9255
+ "error",
9256
+ {
9257
+ props: true
9258
+ }
9259
+ ],
9260
+ "no-shadow-restricted-names": [
9261
+ "error",
9262
+ {
9263
+ reportGlobalThis: true
9264
+ }
9265
+ ],
9266
+ "no-sparse-arrays": "error",
9267
+ "no-unassigned-vars": "error",
9268
+ "no-unsafe-finally": "error",
9269
+ "no-unsafe-optional-chaining": [
9270
+ "error",
9271
+ {
9272
+ disallowArithmeticOperators: false
9273
+ }
9274
+ ],
9275
+ "no-unused-labels": "error",
9276
+ "no-unused-private-class-members": "error",
9277
+ "no-useless-assignment": "error",
9278
+ "no-useless-backreference": "error",
9279
+ "no-useless-catch": "error",
9280
+ "no-useless-escape": [
9281
+ "error",
9282
+ {
9283
+ allowRegexCharacters: []
9284
+ }
9285
+ ],
9286
+ "preserve-caught-error": [
9287
+ "error",
9288
+ {
9289
+ requireCatchParameter: false
9290
+ }
9291
+ ],
9292
+ "require-yield": "error",
9293
+ "typescript/no-explicit-any": "error",
9294
+ "typescript/no-require-imports": "error",
9295
+ "use-isnan": [
9296
+ "error",
9297
+ {
9298
+ enforceForIndexOf: false,
9299
+ enforceForSwitchCase: true
9300
+ }
9301
+ ],
9302
+ "valid-typeof": [
9303
+ "error",
9304
+ {
9305
+ requireStringLiterals: false
9306
+ }
9307
+ ]
9308
+ },
9309
+ uncovered: {
9310
+ "no-octal": "no oxlint equivalent"
9311
+ }
9312
+ };
9313
+
9314
+ // src/roles/lint/preset-data.ts
9315
+ var SHARED_RULES = shared_default.rules;
9316
+ var PRESET_FILES = {
9317
+ nest: nest_default,
9318
+ node: node_default,
9319
+ react: react_default,
9320
+ svelte: svelte_default,
9321
+ tools: tools_default
9322
+ };
9323
+ var VARIANT_FILES = {
9324
+ "react-lib": react_lib_default
9325
+ };
9326
+ var LINT_PRESETS = Object.keys(PRESET_FILES);
9327
+ var GENERATED_LINT_PRESETS = [
9328
+ ...Object.keys(PRESET_FILES),
9329
+ ...Object.keys(VARIANT_FILES)
9330
+ ];
9331
+ function hasLintPreset(preset) {
9332
+ return preset in PRESET_FILES;
9333
+ }
9334
+ function presetFile(preset) {
9335
+ return VARIANT_FILES[preset] ?? PRESET_FILES[preset] ?? node_default;
9336
+ }
9337
+ function sharedRules() {
9338
+ return SHARED_RULES;
9339
+ }
9340
+ function presetRules(preset) {
9341
+ return presetFile(preset).rules;
9342
+ }
9343
+ function uncoveredFor(preset) {
9344
+ return Object.entries(presetFile(preset).uncovered ?? {}).map(([rule, reason]) => ({ rule, reason })).sort((left, right) => left.rule.localeCompare(right.rule));
9345
+ }
9346
+
9347
+ // src/roles/lint/rule-data.ts
9348
+ var sharedRules2 = sharedRules();
9349
+ function isDecision(value) {
9350
+ return typeof value === "object" && value !== null && !Array.isArray(value);
9351
+ }
9352
+ function severityOf(value) {
9353
+ if (isDecision(value)) return value.severity;
9354
+ if (Array.isArray(value)) return String(value[0]);
9355
+ return value;
9356
+ }
9357
+ function validate(preset, rules) {
9358
+ for (const [rule, value] of Object.entries(rules)) {
9359
+ const severity = severityOf(value);
9360
+ if (!["off", "warn", "error"].includes(severity)) {
9361
+ throw new Error(
9362
+ `${preset}: rule "${rule}" has severity "${severity}"; expected off, warn or error`
9363
+ );
9364
+ }
9365
+ if (severity === "error") continue;
9366
+ const reason = isDecision(value) ? value.reason.trim() : "";
9367
+ if (reason === "") {
9368
+ throw new Error(
9369
+ `${preset}: rule "${rule}" is set to "${severity}" without a reason. Every rule that is not enforced must say why, so --inspect can tell a developer what is not running. Use { "severity": "${severity}", "reason": "..." }.`
9370
+ );
9371
+ }
9372
+ }
9373
+ }
9374
+ function rejectTwoSpellings(label, rules) {
9375
+ const seen = /* @__PURE__ */ new Map();
9376
+ for (const rule of Object.keys(rules)) {
9377
+ const canonical = canonicalRuleName(rule);
9378
+ const other = seen.get(canonical);
9379
+ if (other !== void 0) {
9380
+ throw new Error(
9381
+ `${label}: "${other}" and "${rule}" are the same rule to oxlint (${canonical}). Configure it once, under one name: oxlint keeps both and picks one by hash order.`
9382
+ );
9383
+ }
9384
+ seen.set(canonical, rule);
9385
+ }
9386
+ }
9387
+ function layered(preset) {
9388
+ const base = sharedRules();
9389
+ const layer = presetRules(preset);
9390
+ validate("base", base);
9391
+ validate(preset, layer);
9392
+ return { ...base, ...layer };
9393
+ }
9394
+ function toRuleMap(label, rules) {
9395
+ validate(label, rules);
9396
+ rejectTwoSpellings(label, rules);
9397
+ const entries = Object.entries(rules).map(([rule, value]) => {
9398
+ if (!isDecision(value)) return [rule, value];
9399
+ const options = value.options ?? [];
9400
+ return [rule, options.length > 0 ? [value.severity, ...options] : value.severity];
9401
+ });
9402
+ return Object.fromEntries(entries);
9403
+ }
9404
+ function rulesFor(preset) {
9405
+ return toRuleMap(preset, layered(preset));
9406
+ }
9407
+ function disabledFor(preset) {
9408
+ return decisionsAt(preset, "off");
9409
+ }
9410
+ function downgradedFor(preset) {
9411
+ return decisionsAt(preset, "warn");
9412
+ }
9413
+ function decisionsAt(preset, severity) {
9414
+ return Object.entries(layered(preset)).filter(([, value]) => isDecision(value) && value.severity === severity).map(([rule, value]) => ({ rule, reason: value.reason })).sort((left, right) => left.rule.localeCompare(right.rule));
9415
+ }
9416
+
9417
+ // src/roles/lint/presets.ts
9418
+ var hasRuleData = (name) => GENERATED_LINT_PRESETS.includes(name);
9419
+ function lintPresetFor(preset) {
9420
+ const file = presetFile(preset);
9421
+ const resolved = hasRuleData(preset) ? preset : "node";
9422
+ return {
9423
+ plugins: file.plugins,
9424
+ jsPlugins: file.jsPlugins,
9425
+ ...file.settings === null ? {} : { settings: file.settings },
9426
+ ...file.renames ? { renames: file.renames } : {},
9427
+ ...file.overrides ? {
9428
+ overrides: file.overrides.map((override, index) => ({
9429
+ files: override.files,
9430
+ rules: toRuleMap(`${preset} override ${index}`, override.rules)
9431
+ }))
9432
+ } : {},
9433
+ rules: rulesFor(resolved)
9434
+ };
9435
+ }
9436
+
9437
+ // src/roles/lint/read-adoption.ts
9438
+ function shippedPreset(presetPath2) {
9439
+ const variant = presetNameFromPath(presetPath2);
9440
+ return variant !== void 0 && GENERATED_LINT_PRESETS.includes(variant) ? lintPresetFor(variant) : void 0;
9441
+ }
9442
+ function readLintAdoption(cwd) {
9443
+ return readAdoption(cwd, {
9444
+ candidates: [LINT_CONFIG_FILE],
9445
+ markers: ["@hublo/sentinel/oxlint/"],
9446
+ fallback: LINT_CONFIG_FILE,
9447
+ presetPattern: SENTINEL_LINT_PRESET,
9448
+ // Drift for lint is read from the TOP-LEVEL keys beyond `extends`, so the settings the
9449
+ // shared reader inspects are the config's own root rather than a nested options object.
9450
+ settingsKey: null,
9451
+ permitted: PERMITTED_LOCAL_KEYS2,
9452
+ // `rules` and `overrides` are drift only when they CONFLICT with the preset, by the
9453
+ // criterion a re-init keeps or drops them by: a rule the preset does not name is the
9454
+ // module's addition, kept and listed by `--inspect`, not drift. A preset sentinel does not
9455
+ // ship cannot be compared with, so its module keeps the allowlist answer.
9456
+ refineDrift: (drift, config, presetPath2) => {
9457
+ const preset = shippedPreset(presetPath2);
9458
+ return preset !== void 0 ? refineLintDrift(drift, config, preset) : [...drift];
9459
+ }
9460
+ });
9461
+ }
9462
+ var NO_ADDITIONS = { rules: [], config: [] };
9463
+ function readModuleAdditions(cwd) {
9464
+ const adoption = readLintAdoption(cwd);
9465
+ const preset = adoption.adopted ? shippedPreset(adoption.preset) : void 0;
9466
+ if (preset === void 0 || adoption.configFile === null) return NO_ADDITIONS;
9467
+ try {
9468
+ const config = parseJsonc(
9469
+ readFileSync25(join29(cwd, adoption.configFile), "utf8"),
9470
+ adoption.configFile
9471
+ );
9472
+ if (typeof config !== "object" || config === null || Array.isArray(config)) {
9473
+ return NO_ADDITIONS;
9474
+ }
9475
+ const committed = config;
9476
+ return {
9477
+ rules: moduleRuleStanding(committed, preset).added,
9478
+ config: moduleOwnBlocks(committed, preset).added
9479
+ };
9480
+ } catch {
9481
+ return NO_ADDITIONS;
9482
+ }
6815
9483
  }
6816
9484
 
6817
9485
  // src/roles/lint/resolve-oxlint.ts
6818
9486
  import { existsSync as existsSync23 } from "node:fs";
6819
9487
  import { createRequire as createRequire6 } from "node:module";
6820
- import { delimiter as delimiter2, dirname as dirname13, join as join29 } from "node:path";
9488
+ import { delimiter as delimiter2, dirname as dirname13, join as join30 } from "node:path";
6821
9489
  import { fileURLToPath } from "node:url";
6822
9490
  var PACKAGE_OF = {
6823
9491
  oxlint: "oxlint",
@@ -6842,14 +9510,14 @@ function tsgolintShim(cwd) {
6842
9510
  for (const owner of ["oxlint-tsgolint", "oxlint"]) {
6843
9511
  try {
6844
9512
  const packageDir = dirname13(require3.resolve(`${owner}/package.json`));
6845
- candidates.push(join29(packageDir, "node_modules", ".bin", "tsgolint"));
6846
- candidates.push(join29(packageDir, "..", ".bin", "tsgolint"));
9513
+ candidates.push(join30(packageDir, "node_modules", ".bin", "tsgolint"));
9514
+ candidates.push(join30(packageDir, "..", ".bin", "tsgolint"));
6847
9515
  } catch {
6848
9516
  }
6849
9517
  }
6850
9518
  try {
6851
9519
  const ownRoot = dirname13(require3.resolve("@hublo/sentinel/package.json"));
6852
- candidates.push(join29(ownRoot, "node_modules", ".bin", "tsgolint"));
9520
+ candidates.push(join30(ownRoot, "node_modules", ".bin", "tsgolint"));
6853
9521
  } catch {
6854
9522
  candidates.push(resolveBin(dirname13(fileURLToPath(import.meta.url)), "tsgolint") ?? "");
6855
9523
  }
@@ -6867,7 +9535,7 @@ function writtenFileLinter(cwd) {
6867
9535
  return { bin: oxlint, args: ["--fix"], origin: "this module's own oxlint config" };
6868
9536
  }
6869
9537
  }
6870
- const config = ESLINT_CONFIG_FILES.map((name) => join30(cwd, name)).find((path) => existsSync24(path));
9538
+ const config = ESLINT_CONFIG_FILES.map((name) => join31(cwd, name)).find((path) => existsSync24(path));
6871
9539
  const eslint = resolveBin(cwd, "eslint");
6872
9540
  if (config !== void 0 && eslint !== void 0) {
6873
9541
  return {
@@ -6889,7 +9557,7 @@ var FORMATTABLE = /\.(m|c)?(j|t)sx?$|\.json$/;
6889
9557
  var FORMAT_BATCH = 25;
6890
9558
  function readIfPossible(path) {
6891
9559
  try {
6892
- return readFileSync25(path, "utf8");
9560
+ return readFileSync26(path, "utf8");
6893
9561
  } catch {
6894
9562
  return void 0;
6895
9563
  }
@@ -7015,12 +9683,12 @@ var VitestAdapter = class _VitestAdapter extends BaseAdapter {
7015
9683
  const linter = writtenFileLinter(ctx.cwd);
7016
9684
  if (linter === void 0) return;
7017
9685
  const workspaceRoot = findWorkspaceRoot(ctx.cwd) ?? ctx.cwd;
7018
- const fromRoot = (file) => relative7(workspaceRoot, join31(ctx.cwd, file));
9686
+ const fromRoot = (file) => relative7(workspaceRoot, join32(ctx.cwd, file));
7019
9687
  let unsettled = 0;
7020
9688
  const reverted = [];
7021
9689
  for (let at = 0; at < written.length; at += FORMAT_BATCH) {
7022
9690
  const batch = written.slice(at, at + FORMAT_BATCH);
7023
- const before = new Map(batch.map((file) => [file, readIfPossible(join31(ctx.cwd, file))]));
9691
+ const before = new Map(batch.map((file) => [file, readIfPossible(join32(ctx.cwd, file))]));
7024
9692
  const pass = spawnSync(linter.bin, [...linter.args, ...batch.map(fromRoot)], {
7025
9693
  cwd: workspaceRoot,
7026
9694
  encoding: "utf8"
@@ -7029,11 +9697,11 @@ var VitestAdapter = class _VitestAdapter extends BaseAdapter {
7029
9697
  for (const file of batch) {
7030
9698
  const was = before.get(file);
7031
9699
  if (was === void 0) continue;
7032
- const now = readIfPossible(join31(ctx.cwd, file));
9700
+ const now = readIfPossible(join32(ctx.cwd, file));
7033
9701
  if (now === void 0 || now === was) continue;
7034
9702
  const lost = lineLostByTheFixer(was, now);
7035
9703
  if (lost === void 0) continue;
7036
- writeFileSync2(join31(ctx.cwd, file), was);
9704
+ writeFileSync2(join32(ctx.cwd, file), was);
7037
9705
  reverted.push(`${file}: \`${lost.slice(0, 80)}\``);
7038
9706
  }
7039
9707
  }
@@ -7112,7 +9780,7 @@ var VitestAdapter = class _VitestAdapter extends BaseAdapter {
7112
9780
  metrics: { ..._VitestAdapter.NOTHING_TO_REPORT, error: "vitest not available" }
7113
9781
  };
7114
9782
  }
7115
- const out = join31(mkdtempSync3(join31(tmpdir3(), "sentinel-test-report-")), "vitest.json");
9783
+ const out = join32(mkdtempSync3(join32(tmpdir3(), "sentinel-test-report-")), "vitest.json");
7116
9784
  const { cwd: runFrom, options, env } = fromWorkspaceRoot(ctx.cwd, [], []);
7117
9785
  const result = spawnSync(bin, ["run", ...options, "--reporter=json", `--outputFile=${out}`], {
7118
9786
  cwd: runFrom,
@@ -7136,7 +9804,7 @@ var VitestAdapter = class _VitestAdapter extends BaseAdapter {
7136
9804
  }
7137
9805
  let parsed;
7138
9806
  try {
7139
- parsed = JSON.parse(readFileSync25(out, "utf8"));
9807
+ parsed = JSON.parse(readFileSync26(out, "utf8"));
7140
9808
  } catch {
7141
9809
  return {
7142
9810
  ok: false,
@@ -7298,11 +9966,21 @@ export {
7298
9966
  presetNameFromPath,
7299
9967
  ESLINT_CONFIG_FILES,
7300
9968
  lintTarget,
9969
+ LINT_PRESETS,
9970
+ hasLintPreset,
9971
+ uncoveredFor,
9972
+ disabledFor,
9973
+ downgradedFor,
9974
+ governedRules,
9975
+ moduleOwnBlocks,
9976
+ isOffRuleValue,
9977
+ lintPresetFor,
7301
9978
  presetOwnedKeys,
7302
9979
  localOnlyKeys,
7303
9980
  resolveConfigTarget,
7304
9981
  readAdoption,
7305
9982
  readLintAdoption,
9983
+ readModuleAdditions,
7306
9984
  resolveOxlint,
7307
9985
  canRunTypeAware,
7308
9986
  oxlintPath,