@krizaka/config 0.4.2 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/eslint/plugin.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // The `krizaka` ESLint plugin: one object carrying every rule, so that configs registering it compose (flat config
2
2
  // refuses two different objects under the same plugin name).
3
- import { envName, noDirectTanstackImport, noFetchInClientEffect, noLightVariant, noLocaleTernaryRule, noLocalTableOrForm, noRawPalette } from "./rules.js";
3
+ import { envName, noDirectTanstackImport, noFamilySwitcher, noFetchInClientEffect, noLightVariant, noLocaleTernaryRule, noLocalTableOrForm, noRawPalette } from "./rules.js";
4
4
 
5
5
  /** @type {import("eslint").ESLint.Plugin} */
6
6
  export const krizakaPlugin = {
@@ -13,6 +13,7 @@ export const krizakaPlugin = {
13
13
  "no-light-variant": noLightVariant,
14
14
  "no-raw-palette": noRawPalette,
15
15
  "env-name": envName,
16
+ "no-family-switcher": noFamilySwitcher,
16
17
  },
17
18
  };
18
19
 
package/eslint/rules.js CHANGED
@@ -100,6 +100,27 @@ export const noDirectTanstackImport = {
100
100
  },
101
101
  };
102
102
 
103
+ /** Oussama, 2026-10-22: krizaka.com is the only way back between the sites; no site carries the family switcher. */
104
+ /** @type {RuleModule} */
105
+ export const noFamilySwitcher = {
106
+ meta: {
107
+ type: "problem",
108
+ docs: { description: "Forbid the family switcher (NavBar.Family): krizaka.com is the only link back between the Krizaka sites." },
109
+ schema: [],
110
+ messages: {
111
+ family:
112
+ "No family switcher (NavBar.Family) on any site: krizaka.com is the only way back. The footer carries one quiet « A Krizaka project » link to https://www.krizaka.com (SiteFooter).",
113
+ },
114
+ },
115
+ create(context) {
116
+ return {
117
+ "JSXMemberExpression[object.name='NavBar'][property.name='Family']": (/** @type {Node} */ node) => context.report({ node, messageId: "family" }),
118
+ "JSXIdentifier[name='NavBarFamily']": (/** @type {Node} */ node) => context.report({ node, messageId: "family" }),
119
+ "ImportSpecifier[imported.name='NavBarFamily']": (/** @type {Node} */ node) => context.report({ node, messageId: "family" }),
120
+ };
121
+ },
122
+ };
123
+
103
124
  /** S2, S3: a table is `@krizaka/ui/data-table`, a form is `@krizaka/ui/form` — except a form of a single field. */
104
125
  /** @type {RuleModule} */
105
126
  export const noLocalTableOrForm = {
package/eslint/stack.js CHANGED
@@ -8,6 +8,7 @@ export const STACK_RULES = Object.freeze([
8
8
  "krizaka/no-fetch-in-client-effect",
9
9
  "krizaka/no-direct-tanstack-import",
10
10
  "krizaka/no-local-table-or-form",
11
+ "krizaka/no-family-switcher",
11
12
  ]);
12
13
 
13
14
  /**
@@ -32,6 +33,8 @@ export function krizakaStack({
32
33
  "krizaka/no-fetch-in-client-effect": severity,
33
34
  "krizaka/no-direct-tanstack-import": severity,
34
35
  "krizaka/no-local-table-or-form": [severity, { maxFormFields }],
36
+ // Never a warning: the family switcher is gone from every site (krizaka.com is the only way back).
37
+ "krizaka/no-family-switcher": "error",
35
38
  },
36
39
  },
37
40
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@krizaka/config",
3
- "version": "0.4.2",
3
+ "version": "0.5.0",
4
4
  "description": "The shared configuration of every Krizaka JavaScript repository: ESLint flat configs (base, Next.js, the four UI rules, the three stack rules, no locale ternary), the dependency-cruiser boundary, tsconfig bases, Prettier, EditorConfig, and the krizaka-ratchet debt counter.",
5
5
  "keywords": [
6
6
  "krizaka",