@trebired/code-discipline 1.5.0 → 2.0.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.
Files changed (76) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +164 -266
  3. package/dist/checks/fix-folderization.d.ts.map +1 -1
  4. package/dist/checks/fix-folderization.js +3 -0
  5. package/dist/checks/fix-folderization.js.map +1 -1
  6. package/dist/checks/index.d.ts +4 -2
  7. package/dist/checks/index.d.ts.map +1 -1
  8. package/dist/checks/index.js +102 -37
  9. package/dist/checks/index.js.map +1 -1
  10. package/dist/checks/rule-slugs.d.ts +15 -0
  11. package/dist/checks/rule-slugs.d.ts.map +1 -0
  12. package/dist/checks/rule-slugs.js +62 -0
  13. package/dist/checks/rule-slugs.js.map +1 -0
  14. package/dist/checks/rules/dry.d.ts +7 -0
  15. package/dist/checks/rules/dry.d.ts.map +1 -0
  16. package/dist/checks/rules/dry.js +922 -0
  17. package/dist/checks/rules/dry.js.map +1 -0
  18. package/dist/checks/types.d.ts +48 -17
  19. package/dist/checks/types.d.ts.map +1 -1
  20. package/dist/cli/run-cli.d.ts.map +1 -1
  21. package/dist/cli/run-cli.js +15 -21
  22. package/dist/cli/run-cli.js.map +1 -1
  23. package/dist/cli.d.ts.map +1 -1
  24. package/dist/cli.js +2 -3
  25. package/dist/cli.js.map +1 -1
  26. package/dist/config/index.d.ts +1 -1
  27. package/dist/config/index.d.ts.map +1 -1
  28. package/dist/config/index.js +122 -16
  29. package/dist/config/index.js.map +1 -1
  30. package/dist/config/normalize-check-options.d.ts +2 -2
  31. package/dist/config/normalize-check-options.d.ts.map +1 -1
  32. package/dist/config/normalize-check-options.js +6 -2
  33. package/dist/config/normalize-check-options.js.map +1 -1
  34. package/dist/config/normalize-rule-options.d.ts +9 -4
  35. package/dist/config/normalize-rule-options.d.ts.map +1 -1
  36. package/dist/config/normalize-rule-options.js +42 -1
  37. package/dist/config/normalize-rule-options.js.map +1 -1
  38. package/dist/config/normalize-sync-imports-options.d.ts.map +1 -1
  39. package/dist/config/normalize-sync-imports-options.js +2 -0
  40. package/dist/config/normalize-sync-imports-options.js.map +1 -1
  41. package/dist/imports/aliases.d.ts.map +1 -1
  42. package/dist/imports/aliases.js +6 -2
  43. package/dist/imports/aliases.js.map +1 -1
  44. package/dist/imports/check-sync-imports.d.ts.map +1 -1
  45. package/dist/imports/check-sync-imports.js +19 -0
  46. package/dist/imports/check-sync-imports.js.map +1 -1
  47. package/dist/imports/sync-imports.d.ts.map +1 -1
  48. package/dist/imports/sync-imports.js +11 -1
  49. package/dist/imports/sync-imports.js.map +1 -1
  50. package/dist/imports/types.d.ts +10 -1
  51. package/dist/imports/types.d.ts.map +1 -1
  52. package/dist/index.d.ts +3 -3
  53. package/dist/index.d.ts.map +1 -1
  54. package/dist/run.d.ts +15 -18
  55. package/dist/run.d.ts.map +1 -1
  56. package/dist/run.js +9 -38
  57. package/dist/run.js.map +1 -1
  58. package/dist/runtime/orchestrate.d.ts +2 -3
  59. package/dist/runtime/orchestrate.d.ts.map +1 -1
  60. package/dist/runtime/orchestrate.js +0 -10
  61. package/dist/runtime/orchestrate.js.map +1 -1
  62. package/dist/runtime/runtime-imports-sync.d.ts +12 -3
  63. package/dist/runtime/runtime-imports-sync.d.ts.map +1 -1
  64. package/dist/runtime/runtime-imports-sync.js +34 -32
  65. package/dist/runtime/runtime-imports-sync.js.map +1 -1
  66. package/dist/runtime/tsconfig-paths.d.ts +1 -1
  67. package/dist/runtime/tsconfig-paths.d.ts.map +1 -1
  68. package/dist/runtime/tsconfig-paths.js +1 -1
  69. package/dist/runtime/tsconfig-paths.js.map +1 -1
  70. package/dist/shared/discipline-types.d.ts +1 -1
  71. package/dist/shared/discipline-types.d.ts.map +1 -1
  72. package/dist/shared/utils.d.ts +2 -1
  73. package/dist/shared/utils.d.ts.map +1 -1
  74. package/dist/shared/utils.js +14 -1
  75. package/dist/shared/utils.js.map +1 -1
  76. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  All notable changes to `@trebired/code-discipline` will be documented here.
4
4
 
5
+ ## 2.0.0
6
+
7
+ - Removed the top-level `code-discipline sync` command and the runtime `sync` / `startup` modes.
8
+ - Changed the package-owned surface to `check` and `fix`, with positional rule selectors such as `code-discipline fix sync-imports`.
9
+ - Changed config auto-discovery to the new `tb.code-discipline.*` filenames and added package-owned TypeScript config loading for Node and Bun.
10
+ - Added the `dry` rule for canonical helper registration, duplicate detection, and full-removal standalone autofix.
11
+ - Moved optional `package.json#imports` syncing under `rules.syncImports.packageJsonImports`.
12
+ - Changed `fixCodeDiscipline()` from a folderization-only mutation path into a rule-ordered fix pipeline with `ruleResults`.
13
+
5
14
  ## 1.5.0
6
15
 
7
16
  - Added direct config auto-discovery so the CLI can be used as `code-discipline check`, `fix`, and `sync` without mandatory wrapper scripts or `--config` flags.
package/README.md CHANGED
@@ -1,178 +1,95 @@
1
1
  # @trebired/code-discipline
2
2
 
3
- Configurable repository discipline checks, structural fixes, and import syncing for Bun and Node.js projects.
3
+ Configurable repository discipline checks and rule-driven fixes for Bun and Node.js projects.
4
4
 
5
- `@trebired/code-discipline` is intentionally focused. It helps you keep a source tree disciplined without turning into a full linter, formatter, or build system.
5
+ `@trebired/code-discipline` stays in one lane:
6
+
7
+ - code shape rules such as max lines per file or function
8
+ - structural rules such as folderizing compound files
9
+ - sync rules such as keeping source imports, `tsconfig.json`, and optional `package.json#imports` aligned
10
+ - DRY enforcement against registered canonical helper functions
11
+
12
+ It is not a formatter, linter replacement, or build system.
6
13
 
7
14
  ## Install
8
15
 
9
- Runtime support: Bun 1+ and Node.js 18+.
16
+ Runtime support:
17
+
18
+ - Bun 1+
19
+ - Node.js 18+
10
20
 
11
21
  ```sh
12
22
  npm install @trebired/code-discipline
13
23
  ```
14
24
 
15
- ## Why This Package
16
-
17
- Some repository rules are not really single-file lint rules. They are about the shape of the tree:
18
-
19
- - files growing too large
20
- - functions growing too large
21
- - compound filenames that want to become folders
22
- - alias drift between `tsconfig.json` and source imports
23
- - returning structured policy results that a caller can interpret
24
-
25
- That is the lane of this package.
26
-
27
25
  ## Commands
28
26
 
29
27
  ```sh
30
28
  code-discipline check
31
- code-discipline sync
29
+ code-discipline check max-function-lines dry
32
30
  code-discipline fix
31
+ code-discipline fix sync-imports dry
33
32
  ```
34
33
 
35
- The CLI auto-discovers a config module in the current project root. Supported default names:
36
-
37
- - `discipline.config.mjs`
38
- - `discipline.config.js`
39
- - `discipline.config.cjs`
40
- - `code-discipline.config.mjs`
41
- - `code-discipline.config.js`
42
- - `code-discipline.config.cjs`
34
+ Top-level `sync` is gone.
43
35
 
44
- You can still override discovery explicitly:
36
+ `sync-imports` is now just another fixable rule, so targeted sync work is done through:
45
37
 
46
38
  ```sh
47
- code-discipline check --config ./discipline.config.mjs
39
+ code-discipline fix sync-imports
48
40
  ```
49
41
 
50
- Typical `package.json` scripts can now stay direct and generic:
42
+ Typical `package.json` scripts can stay simple:
51
43
 
52
44
  ```json
53
45
  {
54
46
  "scripts": {
55
47
  "discipline:check": "code-discipline check",
56
- "discipline:fix": "code-discipline fix",
57
- "discipline:sync": "code-discipline sync"
48
+ "discipline:fix": "code-discipline fix"
58
49
  }
59
50
  }
60
51
  ```
61
52
 
62
- Command responsibilities stay clean:
63
-
64
- - `check`: read-only validation and logging
65
- - `sync`: package-owned synchronization work from config
66
- - `fix`: configured structural fixes only
53
+ ## Config
67
54
 
68
- Mutations stay opt-in:
55
+ The CLI auto-discovers a top-level config module in this order:
69
56
 
70
- - `syncImports` rewrites imports and `tsconfig.json` only when `syncImports.fix` is `true`
71
- - `runtimeImportsSync` updates `package.json#imports` only when that feature is enabled
72
- - `fix` applies folderization moves only when `folderizeCompoundFiles.fix` is `true`
57
+ - `tb.code-discipline.ts`
58
+ - `tb.code-discipline.mts`
59
+ - `tb.code-discipline.mjs`
60
+ - `tb.code-discipline.js`
61
+ - `tb.code-discipline.cts`
62
+ - `tb.code-discipline.cjs`
73
63
 
74
- ## Simple Runtime API
64
+ `tb.code-discipline.ts` is the recommended default.
75
65
 
76
- For app startup or scripts, you can now use one package-owned entrypoint instead of hand-rolling mode dispatch in app code.
66
+ You can still point at an explicit module path:
77
67
 
78
- ```ts
79
- import { codeDiscipline } from "@trebired/code-discipline";
80
-
81
- const result = await codeDiscipline({
82
- mode: "check",
83
- projectRoot: process.cwd(),
84
- rules: {
85
- maxFileLines: {
86
- severity: "warning",
87
- max: 500,
88
- },
89
- maxFunctionLines: {
90
- severity: "warning",
91
- max: 80,
92
- },
93
- },
94
- });
68
+ ```sh
69
+ code-discipline check --config ./discipline.config.mjs
95
70
  ```
96
71
 
97
- `mode: "startup"` is a convenience alias for sync-oriented startup flows:
72
+ Legacy config filenames are no longer auto-discovered, but they still work when passed explicitly with `--config`.
98
73
 
99
- ```ts
100
- import { codeDiscipline } from "@trebired/code-discipline";
74
+ Rules are enabled by presence. If a rule object exists under `rules`, it runs.
101
75
 
102
- await codeDiscipline({
103
- mode: "startup",
104
- projectRoot: PROJECT_ROOT,
105
- logger,
106
- rules: {
107
- syncImports: {
108
- severity: "error",
109
- fix: true,
110
- alias: {
111
- strategy: "relative-path-slug",
112
- },
113
- allowRelative: ["./"],
114
- },
115
- },
116
- });
117
- ```
118
-
119
- If you want to define repo rules once and reuse them, create a bound helper:
76
+ Example `tb.code-discipline.ts`:
120
77
 
121
78
  ```ts
122
- import { createCodeDiscipline } from "@trebired/code-discipline";
79
+ import { defineCodeDisciplineConfig } from "@trebired/code-discipline";
123
80
 
124
- const discipline = createCodeDiscipline({
125
- sourceRoot: "src",
126
- rules: {
127
- syncImports: {
128
- severity: "error",
129
- fix: true,
130
- alias: {
131
- strategy: "relative-path-slug",
132
- },
133
- allowRelative: ["./"],
134
- },
135
- },
136
- });
137
-
138
- await discipline.startup({ projectRoot: PROJECT_ROOT, logger });
139
- process.exitCode = (await discipline.check({ projectRoot: process.cwd() })).ok ? 0 : 1;
140
- ```
141
-
142
- ## Config
143
-
144
- Rules are enabled by presence. If a rule object exists under `rules`, it runs. If the rule is omitted, it is disabled.
145
-
146
- `severity` is discipline metadata, not a logger level and not process control. The library never calls `process.exit()` from core APIs. Callers decide what to do with `ok`, `errors`, and `warnings`.
147
-
148
- Example config module:
149
-
150
- ```js
151
- export default {
81
+ export default defineCodeDisciplineConfig({
152
82
  sourceRoot: "src",
153
83
  sourceExtensions: [".ts", ".tsx", ".js", ".jsx"],
154
84
  excludeDirs: ["node_modules", "dist", ".vite"],
155
- logging: {
156
- enabled: true,
157
- quiet: false,
158
- },
159
85
  tsconfigPaths: {
160
86
  normalize: "relative-dot-prefix",
161
87
  restoreAfterRun: true,
162
88
  },
163
- runtimeImportsSync: {
164
- enabled: true,
165
- source: "tsconfig.paths",
166
- target: "package.json.imports",
167
- aliasPrefix: "#",
168
- },
169
89
  lifecycle: {
170
90
  async beforeRun(context) {
171
91
  context.state.started = true;
172
92
  },
173
- async afterRun(context, result) {
174
- context.state.finished = result.ok;
175
- },
176
93
  },
177
94
  rules: {
178
95
  maxFileLines: {
@@ -192,220 +109,201 @@ export default {
192
109
  severity: "error",
193
110
  fix: true,
194
111
  alias: {
112
+ prefix: "#",
195
113
  strategy: "relative-path-slug",
196
114
  },
197
115
  allowRelative: ["./"],
116
+ packageJsonImports: {
117
+ enabled: true,
118
+ aliasPrefix: "#",
119
+ },
120
+ },
121
+ dry: {
122
+ severity: "error",
123
+ fix: true,
124
+ helpers: [
125
+ {
126
+ from: "./src/shared/to-text.ts",
127
+ exportName: "toText",
128
+ },
129
+ ],
198
130
  },
199
131
  },
200
- };
132
+ });
201
133
  ```
202
134
 
203
- ## Generic Lifecycle Hooks
204
-
205
- If a project needs package-owned preprocessing or postprocessing around discipline commands, use config hooks instead of wrapper scripts.
135
+ ## Rule Selectors
206
136
 
207
- Available hooks:
137
+ `check` and `fix` both accept positional rule selectors:
208
138
 
209
- - `lifecycle.beforeRun(context)`
210
- - `lifecycle.afterRun(context, result)`
211
- - `lifecycle.beforeMode(context)`
212
- - `lifecycle.afterMode(context, result)`
213
-
214
- The hook context includes:
215
-
216
- - `mode`
217
- - `projectRoot`
218
- - `configPath`
219
- - `config`
220
- - mutable `state`
221
-
222
- ## Optional Tsconfig Path Normalization
139
+ ```sh
140
+ code-discipline check max-file-lines max-function-lines
141
+ code-discipline fix sync-imports dry
142
+ ```
223
143
 
224
- Use `tsconfigPaths` when a project needs temporary normalization of `compilerOptions.paths` before discipline runs.
144
+ Rules use kebab-case public slugs:
225
145
 
226
- ```js
227
- export default {
228
- tsconfigPaths: {
229
- normalize: "relative-dot-prefix",
230
- restoreAfterRun: true,
231
- },
232
- };
233
- ```
146
+ - `max-file-lines`
147
+ - `max-function-lines`
148
+ - `folderize-compound-files`
149
+ - `sync-imports`
150
+ - `dry`
234
151
 
235
- Supported normalization modes:
152
+ `fix` only accepts fixable rules. Trying to run `code-discipline fix max-function-lines` fails clearly.
236
153
 
237
- - `"relative-dot-prefix"`: turns `src/x.ts` into `./src/x.ts`
238
- - `"strip-dot-prefix"`: turns `./src/x.ts` into `src/x.ts`
239
- - `"none"`: disables the helper
154
+ ## Runtime API
240
155
 
241
- `restoreAfterRun: true` restores the original `tsconfig.json` after read-oriented runs so the normalization can stay package-owned instead of living in shell wrappers.
156
+ The package-owned runtime dispatcher now has two modes only:
242
157
 
243
- ## Optional Package Imports Sync
158
+ - `check`
159
+ - `fix`
244
160
 
245
- Use `runtimeImportsSync` when a project wants `package.json#imports` mirrored from `tsconfig.compilerOptions.paths`.
161
+ ```ts
162
+ import { codeDiscipline } from "@trebired/code-discipline";
246
163
 
247
- ```js
248
- export default {
249
- runtimeImportsSync: {
250
- enabled: true,
251
- source: "tsconfig.paths",
252
- target: "package.json.imports",
253
- aliasPrefix: "#",
164
+ const result = await codeDiscipline({
165
+ mode: "fix",
166
+ projectRoot: process.cwd(),
167
+ onlyRules: ["sync-imports"],
168
+ rules: {
169
+ syncImports: {
170
+ fix: true,
171
+ alias: {
172
+ strategy: "relative-path-slug",
173
+ },
174
+ },
254
175
  },
255
- };
176
+ });
256
177
  ```
257
178
 
258
- Behavior:
259
-
260
- - only aliases matching the configured prefix or prefixes are managed
261
- - unrelated existing `package.json#imports` entries are preserved
262
- - the feature runs through `code-discipline sync` and `mode: "sync"` / `mode: "startup"`
263
-
264
- ## Checks
265
-
266
- `checkCodeDiscipline()` is read-only. It never moves files, rewrites imports, or updates `tsconfig.json`.
179
+ You can also bind config once:
267
180
 
268
181
  ```ts
269
- import { checkCodeDiscipline } from "@trebired/code-discipline";
182
+ import { createCodeDiscipline } from "@trebired/code-discipline";
270
183
 
271
- const result = await checkCodeDiscipline({
272
- projectRoot: "/repo",
184
+ const discipline = createCodeDiscipline({
185
+ sourceRoot: "src",
273
186
  rules: {
274
- maxFileLines: {
275
- severity: "warning",
276
- max: 500,
277
- },
278
187
  maxFunctionLines: {
279
188
  severity: "warning",
280
189
  max: 80,
281
190
  },
282
- folderizeCompoundFiles: {
283
- severity: "error",
284
- separators: ["_", "-"],
285
- },
286
191
  syncImports: {
287
- severity: "error",
288
- fix: false,
192
+ fix: true,
289
193
  alias: {
290
194
  strategy: "relative-path-slug",
291
195
  },
292
- allowRelative: ["./"],
293
196
  },
294
197
  },
295
198
  });
199
+
200
+ await discipline.fix({
201
+ projectRoot: process.cwd(),
202
+ onlyRules: ["sync-imports"],
203
+ });
296
204
  ```
297
205
 
298
- Result shape:
206
+ ## Rules
299
207
 
300
- ```ts
301
- type CodeDisciplineSeverity = "error" | "warning";
302
-
303
- type CodeDisciplineViolation = {
304
- rule: "max-file-lines" | "max-function-lines" | "folderize-compound-files" | "sync-imports";
305
- severity: CodeDisciplineSeverity;
306
- fix: boolean;
307
- filePath: string;
308
- message: string;
309
- details: Record<string, unknown>;
310
- suggestedPath?: string;
311
- };
312
-
313
- type CodeDisciplineResult = {
314
- ok: boolean;
315
- errors: number;
316
- warnings: number;
317
- violations: CodeDisciplineViolation[];
318
- };
319
- ```
208
+ ### `maxFileLines`
320
209
 
321
- `ok` becomes `false` only when at least one returned violation has `severity: "error"`.
210
+ Reports files whose total line count exceeds `max`.
322
211
 
323
- ## Function Length
212
+ ### `maxFunctionLines`
324
213
 
325
- `maxFunctionLines` reports function-like declarations whose total span exceeds a configured limit.
214
+ Reports function-like declarations whose total span exceeds `max`.
326
215
 
327
- - function declarations
328
- - function expressions
329
- - arrow functions
330
- - class methods
331
- - constructors
332
- - getters and setters
216
+ ### `folderizeCompoundFiles`
333
217
 
334
- Violations include the function name when available, plus `startLine` and `endLine` details.
218
+ Detects flat compound names such as `user_route.ts` and can move them into structural folders such as `user/route.ts`.
335
219
 
336
- ## Folderization
220
+ ### `syncImports`
337
221
 
338
- `folderizeCompoundFiles` is structural. It does not depend on configured suffix lists.
222
+ Validates and optionally fixes:
339
223
 
340
- Same-directory groups:
224
+ - `tsconfig.compilerOptions.paths`
225
+ - relative source imports that should become aliases
226
+ - optional `package.json#imports` drift through `packageJsonImports`
341
227
 
342
- ```txt
343
- src/api/user_route.ts
344
- src/api/user_schema.ts
345
- src/api/user_controller.ts
228
+ Example targeted CLI usage:
229
+
230
+ ```sh
231
+ code-discipline fix sync-imports
346
232
  ```
347
233
 
348
- suggest:
234
+ ### `dry`
349
235
 
350
- ```txt
351
- src/api/user/route.ts
352
- src/api/user/schema.ts
353
- src/api/user/controller.ts
354
- ```
236
+ Registers canonical helper functions and reports exact normalized duplicates.
355
237
 
356
- Repeated folder-prefix files are also detected:
238
+ The first version is intentionally conservative:
357
239
 
358
- ```txt
359
- src/api/user/user_route.ts
360
- ```
240
+ - matching is exact normalized structure, not heuristic similarity
241
+ - whitespace, comments, function names, and local identifier names do not matter
242
+ - class/object methods are report-only
243
+ - autofix only runs when the duplicate can be removed completely and replaced by a canonical import
361
244
 
362
- suggests:
245
+ Canonical helpers are registered by module export reference:
363
246
 
364
- ```txt
365
- src/api/user/route.ts
247
+ ```ts
248
+ dry: {
249
+ fix: true,
250
+ helpers: [
251
+ {
252
+ from: "./src/shared/to-text.ts",
253
+ exportName: "toText",
254
+ },
255
+ {
256
+ from: "./src/shared/normalize.ts",
257
+ exportName: "default",
258
+ },
259
+ ],
260
+ }
366
261
  ```
367
262
 
368
- `check` only reports these candidates.
263
+ Supported canonical helper exports:
369
264
 
370
- `fix` may apply them only when `folderizeCompoundFiles.fix` is `true`, and it rewrites affected relative imports after the move.
265
+ - exported function declarations
266
+ - exported const bindings initialized with function expressions or arrow functions
267
+ - default exports of those function shapes
371
268
 
372
- ## Import Sync
269
+ ## Lifecycle Hooks
373
270
 
374
- `syncImports()` and `code-discipline sync` use the same severity-aware config shape.
271
+ Hooks remain package-owned and generic:
375
272
 
376
- ```ts
377
- import { syncImports } from "@trebired/code-discipline";
273
+ - `beforeRun(context)`
274
+ - `afterRun(context, result)`
275
+ - `beforeMode(context)`
276
+ - `afterMode(context, result)`
378
277
 
379
- const result = await syncImports({
380
- projectRoot: "/repo",
381
- severity: "error",
382
- fix: true,
383
- alias: {
384
- strategy: "relative-path-slug",
385
- },
386
- allowRelative: ["./"],
387
- });
388
- ```
278
+ The hook context includes:
389
279
 
390
- Behavior:
280
+ - `mode`
281
+ - `projectRoot`
282
+ - `configPath`
283
+ - `config`
284
+ - mutable `state`
391
285
 
392
- - `fix: false` reports alias/import drift as violations
393
- - `fix: true` rewrites imports and updates `tsconfig.json`
394
- - `allowRelative: ["./"]` keeps same-folder relative imports
395
- - upward relative imports can be reported or rewritten through the configured alias policy
286
+ ## Tsconfig Path Normalization
396
287
 
397
- `syncImports()` keeps its operational result fields and also returns `errors`, `warnings`, and `violations`.
288
+ Use `tsconfigPaths` when a run needs temporary `compilerOptions.paths` normalization:
289
+
290
+ ```ts
291
+ tsconfigPaths: {
292
+ normalize: "relative-dot-prefix",
293
+ restoreAfterRun: true,
294
+ }
295
+ ```
398
296
 
399
- ## Logging
297
+ Available modes:
400
298
 
401
- When you provide a logger, discipline results are emitted through it. Trebired-style loggers are supported directly, and the package falls back safely when no logger is provided.
299
+ - `"relative-dot-prefix"` turns `src/x.ts` into `./src/x.ts`
300
+ - `"strip-dot-prefix"` turns `./src/x.ts` into `src/x.ts`
301
+ - `"none"` leaves values unchanged
402
302
 
403
- The default/common logger adaptation path is powered by `@trebired/logger-adapter`, while `logging.adapter(event)` remains available when you want exact control over the emitted event shape.
303
+ ## Advanced Helpers
404
304
 
405
- ## Public API
305
+ Low-level helpers are still exported for advanced tooling:
406
306
 
407
- - `codeDiscipline()`
408
- - `createCodeDiscipline()`
409
307
  - `checkCodeDiscipline()`
410
308
  - `fixCodeDiscipline()`
411
309
  - `syncImports()`
@@ -416,4 +314,4 @@ The default/common logger adaptation path is powered by `@trebired/logger-adapte
416
314
  - `restoreTsconfigPaths()`
417
315
  - `syncPackageJsonImportsFromTsconfigPaths()`
418
316
 
419
- The package also exports the public TypeScript types for severity, rule config, results, violations, alias strategies, logging adapters, and source scan rows.
317
+ `syncImports()` remains available as a lower-level helper, but the package CLI no longer exposes a separate `sync` command.
@@ -1 +1 @@
1
- {"version":3,"file":"fix-folderization.d.ts","sourceRoot":"","sources":["../../src/checks/fix-folderization.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,uBAAuB,EACvB,oCAAoC,EACrC,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAO7E,KAAK,WAAW,GAAG;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,iBAAS,4BAA4B,CACnC,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,oCAAoC,EAC7C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,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;CAAE,CAqBjE;AAsKD,iBAAe,gBAAgB,CAC7B,WAAW,EAAE,iBAAiB,EAAE,EAChC,OAAO,EAAE,oCAAoC,EAC7C,MAAM,EAAE,8BAA8B,GACrC,OAAO,CAAC,uBAAuB,CAAC,CAgFlC;AAED,OAAO,EAAE,aAAa,EAAE,4BAA4B,EAAE,gBAAgB,EAAE,CAAC"}
@@ -168,6 +168,7 @@ async function fixFolderization(sourceFiles, options, logger) {
168
168
  moved_files: 0,
169
169
  rewritten_files: 0,
170
170
  rewritten_imports: 0,
171
+ ruleResults: {},
171
172
  warnings,
172
173
  violations: [],
173
174
  };
@@ -186,6 +187,7 @@ async function fixFolderization(sourceFiles, options, logger) {
186
187
  moved_files: 0,
187
188
  rewritten_files: 0,
188
189
  rewritten_imports: 0,
190
+ ruleResults: {},
189
191
  warnings,
190
192
  violations,
191
193
  };
@@ -210,6 +212,7 @@ async function fixFolderization(sourceFiles, options, logger) {
210
212
  moved_files: movedFiles,
211
213
  rewritten_files: rewriteState.rewrittenFiles,
212
214
  rewritten_imports: rewriteState.rewrittenImports,
215
+ ruleResults: {},
213
216
  warnings: 0,
214
217
  violations: [],
215
218
  };
@@ -1 +1 @@
1
- {"version":3,"file":"fix-folderization.js","sourceRoot":"","sources":["../../src/checks/fix-folderization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAS7B,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AACjG,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC9F,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtG,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,C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