@trackunit/eslint-plugin-trackunit 0.6.147 → 0.6.148

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,10 @@
1
+ ## 0.6.148 (2026-09-22)
2
+
3
+ ### 🧱 Updated Dependencies
4
+
5
+ - Updated css-classname-utils to 0.0.49
6
+ - Updated shared-utils to 1.16.51
7
+
1
8
  ## 0.6.147 (2026-09-21)
2
9
 
3
10
  ### 🧱 Updated Dependencies
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/eslint-plugin-trackunit",
3
- "version": "0.6.147",
3
+ "version": "0.6.148",
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.48",
11
+ "@trackunit/css-classname-utils": "0.0.49",
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",
@@ -153,6 +153,19 @@ export declare const configs: {
153
153
  };
154
154
  files?: undefined;
155
155
  languageOptions?: undefined;
156
+ } | {
157
+ files: string[];
158
+ rules: {
159
+ [x: string]: string;
160
+ "@trackunit/no-internal-graphql-when-tagged-with-gql-public"?: undefined;
161
+ "@trackunit/no-deprecated-graphql-fields"?: undefined;
162
+ "@trackunit/no-unused-translation-key"?: undefined;
163
+ "@typescript-eslint/no-require-imports"?: undefined;
164
+ "@nx/enforce-module-boundaries"?: undefined;
165
+ "import-x/no-default-export"?: undefined;
166
+ };
167
+ plugins?: undefined;
168
+ languageOptions?: undefined;
156
169
  } | {
157
170
  files: string[];
158
171
  languageOptions: {
@@ -1,4 +1,5 @@
1
1
  import { nx } from "../plugins";
2
+ declare const noExtraneousDependenciesRuleKey: string;
2
3
  export declare const base: (import("eslint").Linter.FlatConfig<import("eslint").Linter.RulesRecord> | {
3
4
  plugins: {
4
5
  "@nx": typeof nx;
@@ -153,6 +154,19 @@ export declare const base: (import("eslint").Linter.FlatConfig<import("eslint").
153
154
  };
154
155
  files?: undefined;
155
156
  languageOptions?: undefined;
157
+ } | {
158
+ files: string[];
159
+ rules: {
160
+ [noExtraneousDependenciesRuleKey]: string;
161
+ "@trackunit/no-internal-graphql-when-tagged-with-gql-public"?: undefined;
162
+ "@trackunit/no-deprecated-graphql-fields"?: undefined;
163
+ "@trackunit/no-unused-translation-key"?: undefined;
164
+ "@typescript-eslint/no-require-imports"?: undefined;
165
+ "@nx/enforce-module-boundaries"?: undefined;
166
+ "import-x/no-default-export"?: undefined;
167
+ };
168
+ plugins?: undefined;
169
+ languageOptions?: undefined;
156
170
  } | {
157
171
  files: string[];
158
172
  languageOptions: {
@@ -478,3 +492,4 @@ export declare const base: (import("eslint").Linter.FlatConfig<import("eslint").
478
492
  plugins?: undefined;
479
493
  languageOptions?: undefined;
480
494
  })[];
495
+ export {};
@@ -12,6 +12,51 @@ const restricted_imports_1 = require("../fragments/restricted-imports");
12
12
  const typescript_rules_1 = require("../fragments/typescript-rules");
13
13
  const plugins_1 = require("../plugins");
14
14
  const utils_1 = require("../utils");
15
+ const noExtraneousDependenciesSkipWhen = (0, create_skip_when_1.createSkipWhen)({
16
+ when: { tags: ["scope:tool"] },
17
+ plugins: {
18
+ "import-x": plugins_1.importPlugin,
19
+ },
20
+ rules: {
21
+ "import-x/no-extraneous-dependencies": [
22
+ "error",
23
+ {
24
+ packageDir: (0, utils_1.findMonorepoRoot)(),
25
+ devDependencies: [
26
+ "**/*.spec.{ts,tsx}",
27
+ "**/*.test.{ts,tsx}",
28
+ "**/jest.setup.*",
29
+ "**/test/**",
30
+ "**/tests/**",
31
+ "**/testing/**",
32
+ "**/test-setup/**",
33
+ "**/test-utils/**",
34
+ "**/vite.setup.*",
35
+ "**/vite.config.ts",
36
+ "**/__tests__/**",
37
+ "**/__mocks__/**",
38
+ "**/mocks.{ts,tsx}",
39
+ "**/core-contexts-test/**",
40
+ "**/*.stories.{ts,tsx}",
41
+ "**/storybookUtils.{ts,tsx}",
42
+ "**/.storybook/**",
43
+ "**/scripts/**",
44
+ "**/tools/**",
45
+ "**/*.config.{ts,js,cjs,mjs}",
46
+ "**/css/tailwind/**",
47
+ "**/css/tailwind-custom-properties-plugin/**",
48
+ "**/css/component-tokens/**",
49
+ ],
50
+ optionalDependencies: false,
51
+ peerDependencies: true,
52
+ bundledDependencies: true,
53
+ },
54
+ ],
55
+ },
56
+ });
57
+ // createSkipWhen wraps the rule behind a uniquely-named plugin (e.g. "skip-when-0");
58
+ // look the name up rather than hardcoding it, so per-lib configs never have to guess it.
59
+ const noExtraneousDependenciesRuleKey = `${Object.keys(noExtraneousDependenciesSkipWhen.plugins ?? {})[0]}/import-x/no-extraneous-dependencies`;
15
60
  exports.base = [
16
61
  ignores_1.globalIgnores,
17
62
  {
@@ -28,48 +73,31 @@ exports.base = [
28
73
  ...restricted_imports_1.restrictedImportRules,
29
74
  },
30
75
  },
31
- (0, create_skip_when_1.createSkipWhen)({
32
- when: { tags: ["scope:tool"] },
33
- plugins: {
34
- "import-x": plugins_1.importPlugin,
35
- },
76
+ noExtraneousDependenciesSkipWhen,
77
+ {
78
+ // Nx migration codemods run inside the consumer's Nx generator context, which
79
+ // supplies @nx/devkit and typescript; declaring those as runtime dependencies
80
+ // would ship an Nx toolchain with every package that ever had a migration.
81
+ // Centralized here so libs with a migrations/ folder never have to restate
82
+ // this locally (see also the no-default-export exemption below).
83
+ //
84
+ // `jsdoc/require-jsdoc` is intentionally not turned off here. Only the
85
+ // public-api preset enables it, and it re-applies that rule on `**/*.ts`
86
+ // after this block, so an override here never wins. That half of the
87
+ // exemption lives in public-api.ts, after `strictJsdocRules`.
88
+ //
89
+ // Scoped to the versioned `v[0-9]*` codemod subfolders and their shared `utils/`
90
+ // helpers (not `**/migrations/**` broadly): the `@trackunit/migrations` package
91
+ // is itself Nx tooling, rooted at a directory literally named `migrations`, and
92
+ // legitimately declares @nx/devkit et al. as real dependencies for its whole
93
+ // source tree — a broad `**/migrations/**` glob would wrongly swallow that
94
+ // entire project too. Only the versioned codemod folders and their utils get
95
+ // the exemption.
96
+ files: ["**/migrations/v[0-9]*/**/*.ts", "**/migrations/utils/**/*.ts"],
36
97
  rules: {
37
- "import-x/no-extraneous-dependencies": [
38
- "error",
39
- {
40
- packageDir: (0, utils_1.findMonorepoRoot)(),
41
- devDependencies: [
42
- "**/*.spec.{ts,tsx}",
43
- "**/*.test.{ts,tsx}",
44
- "**/jest.setup.*",
45
- "**/test/**",
46
- "**/tests/**",
47
- "**/testing/**",
48
- "**/test-setup/**",
49
- "**/test-utils/**",
50
- "**/vite.setup.*",
51
- "**/vite.config.ts",
52
- "**/__tests__/**",
53
- "**/__mocks__/**",
54
- "**/mocks.{ts,tsx}",
55
- "**/core-contexts-test/**",
56
- "**/*.stories.{ts,tsx}",
57
- "**/storybookUtils.{ts,tsx}",
58
- "**/.storybook/**",
59
- "**/scripts/**",
60
- "**/tools/**",
61
- "**/*.config.{ts,js,cjs,mjs}",
62
- "**/css/tailwind/**",
63
- "**/css/tailwind-custom-properties-plugin/**",
64
- "**/css/component-tokens/**",
65
- ],
66
- optionalDependencies: false,
67
- peerDependencies: true,
68
- bundledDependencies: true,
69
- },
70
- ],
98
+ [noExtraneousDependenciesRuleKey]: "off",
71
99
  },
72
- }),
100
+ },
73
101
  {
74
102
  files: ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"],
75
103
  languageOptions: {