@trackunit/eslint-plugin-trackunit 0.6.190 → 0.7.2

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,53 @@
1
+ ## 0.7.2 (2026-10-29)
2
+
3
+ ### 🧱 Updated Dependencies
4
+
5
+ - Updated css-classname-utils to 0.0.95
6
+ - Updated shared-utils to 1.22.14
7
+
8
+ ## 0.7.1 (2026-10-29)
9
+
10
+ ### 🚀 Features
11
+
12
+ - **eslint-plugin-trackunit:** document Vitest-only presets in README [SDK-571] ([6016a0d5ee3](https://github.com/Trackunit/manager/commit/6016a0d5ee3))
13
+ - **eslint-plugin-trackunit:** exempt eslint.config.mjs from module boundaries [SDK-571] ([e3a22ae8d51](https://github.com/Trackunit/manager/commit/e3a22ae8d51))
14
+ - **eslint-plugin-trackunit:** remove jest from published presets [SDK-571] ([533bd2ab1c4](https://github.com/Trackunit/manager/commit/533bd2ab1c4))
15
+
16
+ ### 🧱 Updated Dependencies
17
+
18
+ - Updated css-classname-utils to 0.0.94
19
+ - Updated shared-utils to 1.22.13
20
+
21
+ ### ❤️ Thank You
22
+
23
+ - Mikkel Thorbjørn Andersen
24
+
25
+ ## 0.7.0 (2026-10-29)
26
+
27
+ ### 🚀 Features
28
+
29
+ - ⚠️ **eslint-plugin-trackunit:** published presets work in Vitest workspaces [SDK-571] ([#27023](https://github.com/Trackunit/manager/pull/27023))
30
+
31
+ ### ⚠️ Breaking Changes
32
+
33
+ - **eslint-plugin-trackunit:** published presets work in Vitest workspaces [SDK-571] ([#27023](https://github.com/Trackunit/manager/pull/27023))
34
+
35
+ ### 🧱 Updated Dependencies
36
+
37
+ - Updated css-classname-utils to 0.0.93
38
+ - Updated shared-utils to 1.22.12
39
+
40
+ ### ❤️ Thank You
41
+
42
+ - Mikkel Thorbjørn Andersen @mta-trackunit
43
+
44
+ ## 0.6.191 (2026-10-29)
45
+
46
+ ### 🧱 Updated Dependencies
47
+
48
+ - Updated css-classname-utils to 0.0.92
49
+ - Updated shared-utils to 1.22.11
50
+
1
51
  ## 0.6.190 (2026-10-28)
2
52
 
3
53
  ### 🧱 Updated Dependencies
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @trackunit/eslint-plugin-trackunit
2
2
 
3
- A shared ESLint plugin and configuration preset for Trackunit projects. It bundles Trackunit-specific custom rules alongside curated third-party plugin configurations into ready-to-use flat-config presets for ESLint 9+.
3
+ A shared ESLint plugin and configuration preset for Trackunit projects. It bundles Trackunit-specific custom rules alongside curated third-party plugin configurations into ready-to-use flat-config presets for ESLint 9.
4
4
 
5
5
  ## Quick Start
6
6
 
@@ -16,13 +16,17 @@ module.exports = [...configs.base, ...configs.react];
16
16
 
17
17
  > For server, public API, and E2E presets see `@trackunit/eslint-plugin-trackunit-internal` (internal, not published to npm).
18
18
 
19
+ To set up the presets in an IrisX App workspace, see [Linting](https://developers.trackunit.com/docs/apps-and-extensions/overview/iris-app-sdk-reference/linting/) on the Developer Hub.
20
+
19
21
  ## Presets
20
22
 
21
23
 
22
- | Preset | Purpose | Includes |
23
- | --------------- | ---------------------------- | ---------------------------------------------------------------------- |
24
- | `configs.base` | Foundation for every project | TypeScript, import, module-boundary, JSDoc, and custom Trackunit rules |
25
- | `configs.react` | React / browser applications | React, React Hooks, Storybook, Jest + Testing Library overrides |
24
+ | Preset | Purpose | Includes |
25
+ | --------------- | ---------------------------- | ------------------------------------------------------------------------------------ |
26
+ | `configs.base` | Foundation for every project | TypeScript, import, module-boundary, JSDoc, and custom Trackunit rules |
27
+ | `configs.react` | React / browser applications | React, React Hooks, Storybook plugin (rules opt-in), Vitest globals, Testing Library |
28
+
29
+ Jest rules are not included: the presets target Vitest and do not configure `eslint-plugin-jest`. In `*.spec.ts(x)` files, `configs.base` turns off rules such as `no-console` and `@trackunit/no-typescript-assertion`, and `configs.react` enables Testing Library rules. `configs.react` also declares the Vitest globals (`describe`, `it`, `expect`, `vi`, …).
26
30
 
27
31
 
28
32
  ### Combining Presets
@@ -160,8 +164,8 @@ const root = findMonorepoRoot();
160
164
  ## Requirements
161
165
 
162
166
  - Node.js >= 24
163
- - ESLint 9+
164
- - TypeScript 5.9+
167
+ - ESLint 9 (9.33.0 or later; ESLint 10 is not supported yet)
168
+ - TypeScript 5.9 or 6.0
165
169
 
166
170
  For more info and a full guide on Iris App SDK Development, please visit our [Developer Hub](https://developers.trackunit.com/).
167
171
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/eslint-plugin-trackunit",
3
- "version": "0.6.190",
3
+ "version": "0.7.2",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "repository": "https://github.com/Trackunit/manager",
6
6
  "engines": {
@@ -8,12 +8,11 @@
8
8
  },
9
9
  "dependencies": {
10
10
  "@nx/eslint-plugin": "23.3.0",
11
- "@trackunit/css-classname-utils": "0.0.91",
11
+ "@trackunit/css-classname-utils": "0.0.95",
12
12
  "@typescript-eslint/eslint-plugin": "8.71.2",
13
13
  "@typescript-eslint/utils": "8.71.2",
14
14
  "eslint-config-prettier": "^10.1.8",
15
15
  "eslint-plugin-import": "2.32.0",
16
- "eslint-plugin-jest": "^29.15.2",
17
16
  "eslint-plugin-jsdoc": "^62.9.0",
18
17
  "eslint-plugin-no-null": "^1.0.2",
19
18
  "eslint-plugin-react": "7.37.5",
@@ -12,20 +12,13 @@ exports.baseJestOverrides = {
12
12
  },
13
13
  },
14
14
  plugins: {
15
- jest: plugins_1.jest,
16
15
  "testing-library": plugins_1.testingLibrary,
17
16
  },
18
17
  rules: {
19
- ...plugins_1.jest.configs.recommended.rules,
20
- ...plugins_1.jest.configs.style.rules,
21
- // Recognise vitest's `expectTypeOf` (compile-time-only type assertions) alongside `expect`,
22
- // otherwise specs that only assert types are flagged as having no assertions.
23
- "jest/expect-expect": ["error", { assertFunctionNames: ["expect", "expectTypeOf"] }],
24
18
  "@typescript-eslint/no-explicit-any": "off",
25
19
  "@typescript-eslint/no-empty-function": "off",
26
20
  "@typescript-eslint/no-non-null-assertion": "off",
27
21
  "@trackunit/no-typescript-assertion": "off",
28
- "@trackunit/no-jest-mock-trackunit-react-core-hooks": "error",
29
22
  "no-console": "off",
30
23
  "no-restricted-globals": "off",
31
24
  "no-restricted-properties": "off",
@@ -1,4 +1,3 @@
1
1
  import type { Linter } from "eslint";
2
2
  export declare const reactRules: Linter.RulesRecord;
3
3
  export declare const reactCustomRules: Linter.RulesRecord;
4
- export declare const reactTestingLibraryOverrides: Linter.Config;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.reactTestingLibraryOverrides = exports.reactCustomRules = exports.reactRules = void 0;
3
+ exports.reactCustomRules = exports.reactRules = void 0;
4
4
  exports.reactRules = {
5
5
  "react-hooks/rules-of-hooks": "error",
6
6
  "react-hooks/exhaustive-deps": "error",
@@ -135,11 +135,4 @@ exports.reactCustomRules = {
135
135
  },
136
136
  ],
137
137
  };
138
- exports.reactTestingLibraryOverrides = {
139
- files: ["**/*.spec.ts", "**/*.spec.tsx"],
140
- rules: {
141
- "jest/no-commented-out-tests": "error",
142
- "jest/expect-expect": "error",
143
- },
144
- };
145
138
  //# sourceMappingURL=react-rules.js.map
@@ -1015,7 +1015,6 @@ export declare const configs: {
1015
1015
  };
1016
1016
  };
1017
1017
  "@nx": typeof import("@nx/eslint-plugin");
1018
- jest?: undefined;
1019
1018
  };
1020
1019
  settings: {
1021
1020
  react: {
@@ -1026,6 +1025,15 @@ export declare const configs: {
1026
1025
  globals: {
1027
1026
  Text: string;
1028
1027
  screen: string;
1028
+ describe: "readonly";
1029
+ it: "readonly";
1030
+ test: "readonly";
1031
+ expect: "readonly";
1032
+ vi: "readonly";
1033
+ beforeEach: "readonly";
1034
+ afterEach: "readonly";
1035
+ beforeAll: "readonly";
1036
+ afterAll: "readonly";
1029
1037
  };
1030
1038
  parser?: undefined;
1031
1039
  ecmaVersion?: undefined;
@@ -1082,30 +1090,6 @@ export declare const configs: {
1082
1090
  } | {
1083
1091
  files: string[];
1084
1092
  plugins: {
1085
- jest: {
1086
- meta: {
1087
- name: string;
1088
- version: string;
1089
- };
1090
- environments: {
1091
- globals: {
1092
- globals: {
1093
- [key: string]: boolean;
1094
- };
1095
- };
1096
- };
1097
- configs: {
1098
- all: import("eslint").Linter.LegacyConfig;
1099
- recommended: import("eslint").Linter.LegacyConfig;
1100
- style: import("eslint").Linter.LegacyConfig;
1101
- "flat/all": import("eslint").Linter.FlatConfig;
1102
- "flat/recommended": import("eslint").Linter.FlatConfig;
1103
- "flat/style": import("eslint").Linter.FlatConfig;
1104
- };
1105
- rules: {
1106
- [key: string]: import("eslint").Rule.RuleModule;
1107
- };
1108
- };
1109
1093
  "testing-library": {
1110
1094
  readonly meta: {
1111
1095
  readonly name: string;
@@ -1139,6 +1123,15 @@ export declare const configs: {
1139
1123
  globals: {
1140
1124
  Text: string;
1141
1125
  screen: string;
1126
+ describe: "readonly";
1127
+ it: "readonly";
1128
+ test: "readonly";
1129
+ expect: "readonly";
1130
+ vi: "readonly";
1131
+ beforeEach: "readonly";
1132
+ afterEach: "readonly";
1133
+ beforeAll: "readonly";
1134
+ afterAll: "readonly";
1142
1135
  };
1143
1136
  parser: import("eslint").Linter.Parser;
1144
1137
  ecmaVersion?: undefined;
@@ -1146,8 +1139,7 @@ export declare const configs: {
1146
1139
  parserOptions?: undefined;
1147
1140
  };
1148
1141
  rules: {
1149
- "jest/no-commented-out-tests": string;
1150
- "jest/expect-expect": string;
1142
+ [rule: string]: import("eslint").Linter.RuleEntry<any[]>;
1151
1143
  "@trackunit/one-component-per-file"?: undefined;
1152
1144
  "@trackunit/component-name-matches-filename"?: undefined;
1153
1145
  "no-restricted-properties"?: undefined;
@@ -12,7 +12,6 @@ import * as typescriptEslint from "@typescript-eslint/eslint-plugin";
12
12
  import * as tsParser from "@typescript-eslint/parser";
13
13
  import eslintConfigPrettier from "eslint-config-prettier/flat";
14
14
  import * as importPlugin from "eslint-plugin-import";
15
- import * as jest from "eslint-plugin-jest";
16
15
  import * as jsdoc from "eslint-plugin-jsdoc";
17
16
  import * as noNull from "eslint-plugin-no-null";
18
17
  import * as react from "eslint-plugin-react";
@@ -143,4 +142,4 @@ export declare const storybookPlugin: {
143
142
  };
144
143
  };
145
144
  };
146
- export { eslintConfigPrettier, globals, importPlugin, jest, jsdoc, jsoncParser, noNull, nx, react, reactHooks, testingLibrary, tsParser, typescriptEslint, };
145
+ export { eslintConfigPrettier, globals, importPlugin, jsdoc, jsoncParser, noNull, nx, react, reactHooks, testingLibrary, tsParser, typescriptEslint, };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.typescriptEslint = exports.tsParser = exports.testingLibrary = exports.reactHooks = exports.react = exports.nx = exports.noNull = exports.jsoncParser = exports.jsdoc = exports.jest = exports.importPlugin = exports.globals = exports.eslintConfigPrettier = exports.storybookPlugin = exports.localRulesPlugin = void 0;
3
+ exports.typescriptEslint = exports.tsParser = exports.testingLibrary = exports.reactHooks = exports.react = exports.nx = exports.noNull = exports.jsoncParser = exports.jsdoc = exports.importPlugin = exports.globals = exports.eslintConfigPrettier = exports.storybookPlugin = exports.localRulesPlugin = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  /**
6
6
  * Shared plugin instances for ESLint flat config.
@@ -21,8 +21,6 @@ const flat_1 = tslib_1.__importDefault(require("eslint-config-prettier/flat"));
21
21
  exports.eslintConfigPrettier = flat_1.default;
22
22
  const importPlugin = tslib_1.__importStar(require("eslint-plugin-import"));
23
23
  exports.importPlugin = importPlugin;
24
- const jest = tslib_1.__importStar(require("eslint-plugin-jest"));
25
- exports.jest = jest;
26
24
  const jsdoc = tslib_1.__importStar(require("eslint-plugin-jsdoc"));
27
25
  exports.jsdoc = jsdoc;
28
26
  const noNull = tslib_1.__importStar(require("eslint-plugin-no-null"));
@@ -182,7 +182,7 @@ exports.base = [
182
182
  },
183
183
  },
184
184
  {
185
- files: ["**/eslint.config.cjs"],
185
+ files: ["**/eslint.config.{cjs,mjs}"],
186
186
  rules: {
187
187
  "@nx/enforce-module-boundaries": "off",
188
188
  },
@@ -514,7 +514,6 @@ export declare const reactPreset: (import("eslint").Linter.Config<import("eslint
514
514
  };
515
515
  };
516
516
  "@nx": typeof nx;
517
- jest?: undefined;
518
517
  };
519
518
  settings: {
520
519
  react: {
@@ -525,6 +524,15 @@ export declare const reactPreset: (import("eslint").Linter.Config<import("eslint
525
524
  globals: {
526
525
  Text: string;
527
526
  screen: string;
527
+ describe: "readonly";
528
+ it: "readonly";
529
+ test: "readonly";
530
+ expect: "readonly";
531
+ vi: "readonly";
532
+ beforeEach: "readonly";
533
+ afterEach: "readonly";
534
+ beforeAll: "readonly";
535
+ afterAll: "readonly";
528
536
  };
529
537
  parser?: undefined;
530
538
  ecmaVersion?: undefined;
@@ -581,30 +589,6 @@ export declare const reactPreset: (import("eslint").Linter.Config<import("eslint
581
589
  } | {
582
590
  files: string[];
583
591
  plugins: {
584
- jest: {
585
- meta: {
586
- name: string;
587
- version: string;
588
- };
589
- environments: {
590
- globals: {
591
- globals: {
592
- [key: string]: boolean;
593
- };
594
- };
595
- };
596
- configs: {
597
- all: import("eslint").Linter.LegacyConfig;
598
- recommended: import("eslint").Linter.LegacyConfig;
599
- style: import("eslint").Linter.LegacyConfig;
600
- "flat/all": import("eslint").Linter.FlatConfig;
601
- "flat/recommended": import("eslint").Linter.FlatConfig;
602
- "flat/style": import("eslint").Linter.FlatConfig;
603
- };
604
- rules: {
605
- [key: string]: import("eslint").Rule.RuleModule;
606
- };
607
- };
608
592
  "testing-library": {
609
593
  readonly meta: {
610
594
  readonly name: string;
@@ -638,6 +622,15 @@ export declare const reactPreset: (import("eslint").Linter.Config<import("eslint
638
622
  globals: {
639
623
  Text: string;
640
624
  screen: string;
625
+ describe: "readonly";
626
+ it: "readonly";
627
+ test: "readonly";
628
+ expect: "readonly";
629
+ vi: "readonly";
630
+ beforeEach: "readonly";
631
+ afterEach: "readonly";
632
+ beforeAll: "readonly";
633
+ afterAll: "readonly";
641
634
  };
642
635
  parser: import("eslint").Linter.Parser;
643
636
  ecmaVersion?: undefined;
@@ -645,8 +638,7 @@ export declare const reactPreset: (import("eslint").Linter.Config<import("eslint
645
638
  parserOptions?: undefined;
646
639
  };
647
640
  rules: {
648
- "jest/no-commented-out-tests": string;
649
- "jest/expect-expect": string;
641
+ [rule: string]: import("eslint").Linter.RuleEntry<any[]>;
650
642
  "@trackunit/one-component-per-file"?: undefined;
651
643
  "@trackunit/component-name-matches-filename"?: undefined;
652
644
  "no-restricted-properties"?: undefined;
@@ -16,6 +16,21 @@ const plugins_1 = require("../plugins");
16
16
  * that are linted by default keep the parser they had when it was unscoped.
17
17
  */
18
18
  const codeFiles = ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx", "**/*.cjs", "**/*.mjs"];
19
+ /**
20
+ * Test-runner globals for specs that rely on Vitest's `globals: true`. Spelled out because the pinned
21
+ * `globals` package has no `vitest` key.
22
+ */
23
+ const vitestGlobals = {
24
+ describe: "readonly",
25
+ it: "readonly",
26
+ test: "readonly",
27
+ expect: "readonly",
28
+ vi: "readonly",
29
+ beforeEach: "readonly",
30
+ afterEach: "readonly",
31
+ beforeAll: "readonly",
32
+ afterAll: "readonly",
33
+ };
19
34
  exports.reactPreset = [
20
35
  {
21
36
  plugins: {
@@ -39,7 +54,7 @@ exports.reactPreset = [
39
54
  languageOptions: {
40
55
  globals: {
41
56
  ...plugins_1.globals.browser,
42
- ...plugins_1.jest.environments.globals.globals,
57
+ ...vitestGlobals,
43
58
  ...plugins_1.globals.node,
44
59
  Text: "writable",
45
60
  screen: "writable",
@@ -100,13 +115,12 @@ exports.reactPreset = [
100
115
  {
101
116
  files: ["**/*.spec.ts", "**/*.spec.tsx"],
102
117
  plugins: {
103
- jest: plugins_1.jest,
104
118
  "testing-library": plugins_1.testingLibrary,
105
119
  },
106
120
  languageOptions: {
107
121
  globals: {
108
122
  ...plugins_1.globals.browser,
109
- ...plugins_1.jest.environments.globals.globals,
123
+ ...vitestGlobals,
110
124
  ...plugins_1.globals.node,
111
125
  Text: "writable",
112
126
  screen: "writable",
@@ -114,11 +128,7 @@ exports.reactPreset = [
114
128
  parser: plugins_1.tsParser,
115
129
  },
116
130
  rules: {
117
- ...plugins_1.jest.configs.recommended.rules,
118
- ...plugins_1.jest.configs.style.rules,
119
131
  ...testing_library_1.reactTestingLibraryRules,
120
- "jest/no-commented-out-tests": "error",
121
- "jest/expect-expect": "error",
122
132
  },
123
133
  },
124
134
  ];