@zintrust/governance 0.4.50 → 0.4.59

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.
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@zintrust/governance",
3
- "version": "0.4.50",
4
- "buildDate": "2026-04-04T10:00:13.604Z",
3
+ "version": "0.4.59",
4
+ "buildDate": "2026-04-04T22:07:49.795Z",
5
5
  "buildEnvironment": {
6
- "node": "v20.20.2",
7
- "platform": "linux",
8
- "arch": "x64"
6
+ "node": "v22.22.1",
7
+ "platform": "darwin",
8
+ "arch": "arm64"
9
9
  },
10
10
  "git": {
11
- "commit": "fb0e4df9",
12
- "branch": "master"
11
+ "commit": "99e4d331",
12
+ "branch": "release"
13
13
  },
14
14
  "package": {
15
15
  "engines": {
@@ -27,13 +27,17 @@
27
27
  ]
28
28
  },
29
29
  "files": {
30
+ "build-manifest.json": {
31
+ "size": 1189,
32
+ "sha256": "c63e64fc058dffd6e171bbc941e5803edaa26bf74f94755509c29edd6a6f72a4"
33
+ },
30
34
  "eslint.d.ts": {
31
- "size": 198,
32
- "sha256": "ab21570cfead63487d42131027b9891b166d2f7fc3f5f68466a1f6a1287f7871"
35
+ "size": 232,
36
+ "sha256": "f8b2d18866a4e33cf2b975acfdb8b6a686efef0c607915f2ea757e3a4e340b2a"
33
37
  },
34
38
  "eslint.js": {
35
- "size": 3834,
36
- "sha256": "ce618408ef72143f024d03633c2e918ad7350215b42acfeaf56ac0a5a6b89e32"
39
+ "size": 4062,
40
+ "sha256": "fa41555adaeaab9a3de8f6961f49681ded99e3f5c78beaa09bc6da550de4f065"
37
41
  },
38
42
  "index.d.ts": {
39
43
  "size": 344,
@@ -41,7 +45,7 @@
41
45
  },
42
46
  "index.js": {
43
47
  "size": 487,
44
- "sha256": "9980e94d50c1bab90e95e9b9ecd0c2b0c82ac8616524903c6bd2163a384405f0"
48
+ "sha256": "99230769e6f066128022d547ead65bac4abd07fe5eebe9467e7cd71b29cb1959"
45
49
  }
46
50
  }
47
51
  }
package/dist/eslint.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export type ZintrustEslintOptions = Readonly<{
2
2
  tsconfigPath?: string;
3
3
  tsconfigRootDir?: string;
4
+ enforcePathAliases?: boolean;
4
5
  }>;
5
6
  export declare function zintrustAppEslintConfig(opts?: ZintrustEslintOptions): unknown[];
package/dist/eslint.js CHANGED
@@ -49,7 +49,23 @@ const testGlobalsConfig = () => ({
49
49
  'no-empty': 'off',
50
50
  },
51
51
  });
52
- const zintrustRulesConfig = () => ({
52
+ const createPathAliasRule = (enforcePathAliases) => {
53
+ if (!enforcePathAliases) {
54
+ return 'off';
55
+ }
56
+ return [
57
+ 'error',
58
+ {
59
+ patterns: [
60
+ {
61
+ group: ['./*', '../*'],
62
+ message: 'Please use path aliases (e.g., @app/Controllers/UserController) instead of relative imports.',
63
+ },
64
+ ],
65
+ },
66
+ ];
67
+ };
68
+ const zintrustRulesConfig = (enforcePathAliases) => ({
53
69
  rules: {
54
70
  '@typescript-eslint/no-unused-vars': [
55
71
  'error',
@@ -60,17 +76,7 @@ const zintrustRulesConfig = () => ({
60
76
  eqeqeq: ['error', 'always'],
61
77
  'prefer-const': 'warn',
62
78
  // Keep app code on aliases (relative imports are allowed in tests).
63
- 'no-restricted-imports': [
64
- 'error',
65
- {
66
- patterns: [
67
- {
68
- group: ['./*', '../*'],
69
- message: 'Please use path aliases (e.g., @app/Controllers/UserController) instead of relative imports.',
70
- },
71
- ],
72
- },
73
- ],
79
+ 'no-restricted-imports': createPathAliasRule(enforcePathAliases),
74
80
  // Avoid raw throw Error(...) in app code.
75
81
  'no-restricted-syntax': [
76
82
  'warn',
@@ -102,6 +108,7 @@ const zintrustRulesConfig = () => ({
102
108
  export function zintrustAppEslintConfig(opts = {}) {
103
109
  const tsconfigPath = opts.tsconfigPath ?? './tsconfig.json';
104
110
  const tsconfigRootDir = opts.tsconfigRootDir ?? process.cwd();
111
+ const enforcePathAliases = opts.enforcePathAliases ?? true;
105
112
  return [
106
113
  {
107
114
  ignores: DEFAULT_IGNORES,
@@ -113,6 +120,6 @@ export function zintrustAppEslintConfig(opts = {}) {
113
120
  // Enable type-aware linting for app source.
114
121
  typeAwareAppConfig(tsconfigPath, tsconfigRootDir),
115
122
  testGlobalsConfig(),
116
- zintrustRulesConfig(),
123
+ zintrustRulesConfig(enforcePathAliases),
117
124
  ];
118
125
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zintrust/governance",
3
- "version": "0.4.50",
3
+ "version": "0.4.59",
4
4
  "description": "ESLint and governance tooling package for ZinTrust.",
5
5
  "private": false,
6
6
  "type": "module",
@@ -23,7 +23,7 @@
23
23
  "node": ">=20.0.0"
24
24
  },
25
25
  "peerDependencies": {
26
- "@zintrust/core": "^0.4.50",
26
+ "@zintrust/core": "^0.4.59",
27
27
  "eslint": "^10.0.0",
28
28
  "typescript": ">=5.0.0"
29
29
  },