@trackunit/eslint-plugin-trackunit 0.6.161 → 0.6.163

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/CHANGELOG.md CHANGED
@@ -1,3 +1,26 @@
1
+ ## 0.6.163 (2026-10-01)
2
+
3
+ ### 🧱 Updated Dependencies
4
+
5
+ - Updated css-classname-utils to 0.0.64
6
+ - Updated shared-utils to 1.18.2
7
+
8
+ ## 0.6.162 (2026-10-01)
9
+
10
+ ### 🩹 Fixes
11
+
12
+ - **eslint-plugin-trackunit:** make no-unused-translation-key report again [GLU-2056] ([#26085](https://github.com/Trackunit/manager/pull/26085))
13
+
14
+ ### 🧱 Updated Dependencies
15
+
16
+ - Updated css-classname-utils to 0.0.63
17
+ - Updated shared-utils to 1.18.1
18
+
19
+ ### ❤️ Thank You
20
+
21
+ - Cursor @cursoragent
22
+ - Mikkel Thorbjørn Andersen @mta-trackunit
23
+
1
24
  ## 0.6.161 (2026-10-01)
2
25
 
3
26
  ### 🧱 Updated Dependencies
package/README.md CHANGED
@@ -99,7 +99,7 @@ project.
99
99
  | `@trackunit/require-storybook-folder-landing-page` | not enabled by default | no | Deprecated alias of `@trackunit/storybook/require-folder-landing-page` — same rule implementation, kept only so configs still referencing the pre-namespace id keep working. Neither the published `react` preset nor the internal `storybook` preset enables it; a consumer must re-enable it explicitly. |
100
100
  | `@trackunit/storybook/require-csf-factory` | warn | no | Detection-only: flags story files in the legacy `export default {...}` shape (`oldFormat`), files mixing that shape with a factory `.meta({...})` call (`mixedFormat`), and files with neither signal (`missingMeta`). Stays silent on files already in the CSF **factory** format (`<binding>.meta({...})` + `<meta>.story({...})`). |
101
101
  | `@trackunit/storybook/no-local-meta-component` | error | no | Detection-only: flags a meta `component` (in `export default {...}`, `const meta = {...}; export default meta`, or any `<binding>.meta({...})`) that resolves to a function/class declared in the story file, an inline component, a wrapper call around a local (`memo(Local)`), or an import from another `*.stories` module. Docgen skips `*.stories.*`, so Controls loses JSDoc prop descriptions and "Show code" names a story-only identifier. Fix by pointing at the real component (`component: MultiSelectField<Option>` for generics) or moving the demo into a sibling `*.demo.tsx`. |
102
- | `storybook/*` (upstream `eslint-plugin-storybook@^10.3.5` `flat/recommended`) | per-rule (upstream defaults), with `storybook/default-exports` forced `off` | per-rule | Upstream Storybook lint rules, spread only by the internal `storybook` preset — never by the published `react` preset. `storybook/default-exports` is turned back off immediately after the spread because it contradicts the CSF factory format's implicit default export via the `meta` object; `require-csf-factory` above already reports a story file with no meta/default export at all, so no detection guarantee is lost by disabling it. |
102
+ | `storybook/*` (upstream `eslint-plugin-storybook@^10.6.0` `flat/recommended`) | per-rule (upstream defaults), with `storybook/default-exports` forced `off` | per-rule | Upstream Storybook lint rules, spread only by the internal `storybook` preset — never by the published `react` preset. `storybook/default-exports` is turned back off immediately after the spread because it contradicts the CSF factory format's implicit default export via the `meta` object; `require-csf-factory` above already reports a story file with no meta/default export at all, so no detection guarantee is lost by disabling it. |
103
103
 
104
104
  **External consumers opt in themselves.** The published `react` preset registers the
105
105
  `@trackunit/storybook` plugin (so its rule ids resolve without extra config) but enables zero
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/eslint-plugin-trackunit",
3
- "version": "0.6.161",
3
+ "version": "0.6.163",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "repository": "https://github.com/Trackunit/manager",
6
6
  "engines": {
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "dependencies": {
10
10
  "@nx/eslint-plugin": "23.1.0",
11
- "@trackunit/css-classname-utils": "0.0.62",
11
+ "@trackunit/css-classname-utils": "0.0.64",
12
12
  "@typescript-eslint/eslint-plugin": "8.58.1",
13
13
  "@typescript-eslint/utils": "8.58.1",
14
14
  "eslint-config-prettier": "^10.1.8",
@@ -24,7 +24,7 @@
24
24
  "typescript": "6.0.2",
25
25
  "tslib": "^2.6.2",
26
26
  "zod": "^3.25.76",
27
- "jsonc-eslint-parser": "^3.1.0"
27
+ "jsonc-eslint-parser": "^3.3.0"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "@typescript-eslint/parser": "^8.58.1",
@@ -1027,6 +1027,16 @@ export declare const configs: {
1027
1027
  Text: string;
1028
1028
  screen: string;
1029
1029
  };
1030
+ parser?: undefined;
1031
+ ecmaVersion?: undefined;
1032
+ sourceType?: undefined;
1033
+ parserOptions?: undefined;
1034
+ };
1035
+ files?: undefined;
1036
+ rules?: undefined;
1037
+ } | {
1038
+ files: string[];
1039
+ languageOptions: {
1030
1040
  parser: import("eslint").Linter.Parser;
1031
1041
  ecmaVersion: number;
1032
1042
  sourceType: string;
@@ -1035,8 +1045,10 @@ export declare const configs: {
1035
1045
  jsx: boolean;
1036
1046
  };
1037
1047
  };
1048
+ globals?: undefined;
1038
1049
  };
1039
- files?: undefined;
1050
+ plugins?: undefined;
1051
+ settings?: undefined;
1040
1052
  rules?: undefined;
1041
1053
  } | {
1042
1054
  files: string[];
@@ -526,6 +526,16 @@ export declare const reactPreset: (import("eslint").Linter.Config<import("eslint
526
526
  Text: string;
527
527
  screen: string;
528
528
  };
529
+ parser?: undefined;
530
+ ecmaVersion?: undefined;
531
+ sourceType?: undefined;
532
+ parserOptions?: undefined;
533
+ };
534
+ files?: undefined;
535
+ rules?: undefined;
536
+ } | {
537
+ files: string[];
538
+ languageOptions: {
529
539
  parser: import("eslint").Linter.Parser;
530
540
  ecmaVersion: number;
531
541
  sourceType: string;
@@ -534,8 +544,10 @@ export declare const reactPreset: (import("eslint").Linter.Config<import("eslint
534
544
  jsx: boolean;
535
545
  };
536
546
  };
547
+ globals?: undefined;
537
548
  };
538
- files?: undefined;
549
+ plugins?: undefined;
550
+ settings?: undefined;
539
551
  rules?: undefined;
540
552
  } | {
541
553
  files: string[];
@@ -6,6 +6,16 @@ const react_rules_1 = require("../fragments/react-rules");
6
6
  const story_relaxations_1 = require("../fragments/story-relaxations");
7
7
  const testing_library_1 = require("../fragments/testing-library");
8
8
  const plugins_1 = require("../plugins");
9
+ /**
10
+ * Files that are parsed as code and therefore need the TypeScript parser.
11
+ *
12
+ * The parser must NOT be set on an unscoped config block: `react` is spread after `base`, and an
13
+ * unscoped `languageOptions.parser` overrides the JSON parser that `base` assigns to
14
+ * `locales/en/translation.json`. The JSON visitor of `@trackunit/no-unused-translation-key` then never
15
+ * fires and the rule silently reports nothing. `.cjs` and `.mjs` are listed so the config files
16
+ * that are linted by default keep the parser they had when it was unscoped.
17
+ */
18
+ const codeFiles = ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx", "**/*.cjs", "**/*.mjs"];
9
19
  exports.reactPreset = [
10
20
  {
11
21
  plugins: {
@@ -34,6 +44,11 @@ exports.reactPreset = [
34
44
  Text: "writable",
35
45
  screen: "writable",
36
46
  },
47
+ },
48
+ },
49
+ {
50
+ files: codeFiles,
51
+ languageOptions: {
37
52
  parser: plugins_1.tsParser,
38
53
  ecmaVersion: 2022,
39
54
  sourceType: "module",
@@ -3,12 +3,21 @@ export declare const server: ({
3
3
  globals: {
4
4
  [x: string]: boolean | "readonly" | "writable";
5
5
  };
6
- parser: import("eslint").Linter.Parser;
6
+ parser?: undefined;
7
7
  parserOptions?: undefined;
8
8
  };
9
9
  files?: undefined;
10
10
  plugins?: undefined;
11
11
  rules?: undefined;
12
+ } | {
13
+ files: string[];
14
+ languageOptions: {
15
+ parser: import("eslint").Linter.Parser;
16
+ globals?: undefined;
17
+ parserOptions?: undefined;
18
+ };
19
+ plugins?: undefined;
20
+ rules?: undefined;
12
21
  } | {
13
22
  files: string[];
14
23
  plugins: {
@@ -5,12 +5,24 @@ const tslib_1 = require("tslib");
5
5
  const compat_1 = require("@eslint/compat");
6
6
  const typeGraphql = tslib_1.__importStar(require("eslint-plugin-type-graphql"));
7
7
  const plugins_1 = require("../plugins");
8
+ /**
9
+ * The parser must NOT be set on an unscoped config block: an unscoped `languageOptions.parser`
10
+ * overrides the JSON parser that `base` assigns to `locales/en/translation.json`, which silently
11
+ * disables `@trackunit/no-unused-translation-key`. `.cjs` and `.mjs` are listed so the config
12
+ * files linted by default keep the parser they had when it was unscoped.
13
+ */
14
+ const codeFiles = ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx", "**/*.cjs", "**/*.mjs"];
8
15
  exports.server = [
9
16
  {
10
17
  languageOptions: {
11
18
  globals: {
12
19
  ...plugins_1.globals.browser,
13
20
  },
21
+ },
22
+ },
23
+ {
24
+ files: codeFiles,
25
+ languageOptions: {
14
26
  parser: plugins_1.tsParser,
15
27
  },
16
28
  },