@futdevpro/dynamo-eslint 1.15.25 → 1.15.28
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/.c8rc.json +26 -26
- package/.cursor/rules/__assistant_guide.mdc +30 -30
- package/.cursor/rules/__main.mdc +64 -64
- package/.cursor/rules/_ag_backend-structure.mdc +85 -85
- package/.cursor/rules/_ag_backend.mdc +16 -16
- package/.cursor/rules/_ag_debug.mdc +7 -7
- package/.cursor/rules/_ag_documentation_writing_rules.mdc +372 -372
- package/.cursor/rules/_ag_file-refactoring.mdc +113 -113
- package/.cursor/rules/_ag_fixes_rules.mdc +5 -5
- package/.cursor/rules/_ag_frontend-structure.mdc +86 -86
- package/.cursor/rules/_ag_frontend.mdc +39 -39
- package/.cursor/rules/_ag_import-rules.mdc +44 -44
- package/.cursor/rules/_ag_naming.mdc +115 -115
- package/.cursor/rules/_ag_running_commands.mdc +4 -4
- package/.cursor/rules/_ag_server-controller.mdc +5 -5
- package/.cursor/rules/_ag_should-be.mdc +6 -6
- package/.cursor/rules/_ag_swearing.mdc +47 -47
- package/.cursor/rules/ai_development_guide.md +60 -60
- package/.cursor/rules/ai_directives.md +114 -114
- package/.cursor/rules/cursor-rules.md +160 -160
- package/.cursor/rules/default-command.mdc +464 -464
- package/.cursor/rules/error_code_pattern.md +39 -39
- package/.cursor/rules/saved rule mcp server use.md +15 -15
- package/.dynamo/pipeline.cicd.config.json +184 -184
- package/.dynamo/version-bump.config.json +5 -5
- package/.eslintrc.json +4 -4
- package/.github/workflows/main.yml +436 -436
- package/.husky/pre-commit +2 -2
- package/.vscode/settings.json +11 -11
- package/README.md +319 -319
- package/__documentations/2026-04-18-ccap-review-integration.md +173 -173
- package/__documentations/2026-08-18-bfr-ctm-005-eslint9-validator-report.md +45 -0
- package/build/configs/base.d.ts +9 -9
- package/build/configs/base.js +150 -150
- package/build/configs/fsm.d.ts +1 -1
- package/build/configs/fsm.js +7 -7
- package/build/configs/ngx-package.d.ts +1 -1
- package/build/configs/ngx-package.js +7 -7
- package/build/configs/ngx.d.ts +4 -4
- package/build/configs/ngx.js +91 -91
- package/build/configs/nts-package.d.ts +1 -1
- package/build/configs/nts-package.js +17 -17
- package/build/configs/nts.d.ts +1 -1
- package/build/configs/nts.js +31 -31
- package/build/index.d.ts +1 -1
- package/build/index.js +2 -2
- package/build/plugin/index.d.ts +52 -52
- package/build/plugin/index.js +80 -80
- package/build/plugin/rules/angular/angular-for-track-logic.d.ts +7 -7
- package/build/plugin/rules/angular/angular-for-track-logic.js +81 -81
- package/build/plugin/rules/angular/effect-signal-loop.d.ts +9 -9
- package/build/plugin/rules/angular/effect-signal-loop.js +112 -112
- package/build/plugin/rules/angular/no-async-ngoninit.d.ts +8 -8
- package/build/plugin/rules/angular/no-async-ngoninit.js +42 -42
- package/build/plugin/rules/angular/no-component-direct-api.d.ts +9 -9
- package/build/plugin/rules/angular/no-component-direct-api.js +75 -75
- package/build/plugin/rules/angular/no-method-call-in-template.d.ts +8 -8
- package/build/plugin/rules/angular/no-method-call-in-template.js +79 -79
- package/build/plugin/rules/angular/no-ngfor-directive.d.ts +7 -7
- package/build/plugin/rules/angular/no-ngfor-directive.js +59 -59
- package/build/plugin/rules/angular/no-ngif-directive.d.ts +7 -7
- package/build/plugin/rules/angular/no-ngif-directive.js +59 -59
- package/build/plugin/rules/explicit-types.d.ts +3 -3
- package/build/plugin/rules/explicit-types.js +178 -178
- package/build/plugin/rules/import/import-order.d.ts +3 -3
- package/build/plugin/rules/import/import-order.js +154 -154
- package/build/plugin/rules/import/no-import-type.d.ts +3 -3
- package/build/plugin/rules/import/no-import-type.js +45 -45
- package/build/plugin/rules/import/no-js-import.d.ts +3 -3
- package/build/plugin/rules/import/no-js-import.js +40 -40
- package/build/plugin/rules/naming-patterns.d.ts +7 -7
- package/build/plugin/rules/naming-patterns.js +366 -366
- package/build/plugin/rules/no-getter-logic.d.ts +3 -3
- package/build/plugin/rules/no-getter-logic.js +194 -194
- package/build/plugin/rules/prefer-enum-over-string-union.d.ts +3 -3
- package/build/plugin/rules/prefer-enum-over-string-union.js +289 -289
- package/build/plugin/rules/prefer-interface-over-duplicate-types.d.ts +3 -3
- package/build/plugin/rules/prefer-interface-over-duplicate-types.js +264 -264
- package/build/plugin/rules/require-jsdoc-description.d.ts +3 -3
- package/build/plugin/rules/require-jsdoc-description.js +496 -496
- package/build/plugin/rules/require-test-description-prefix.d.ts +3 -3
- package/build/plugin/rules/require-test-description-prefix.js +135 -135
- package/build/plugin/rules/ts/data-model-extends.d.ts +8 -8
- package/build/plugin/rules/ts/data-model-extends.js +94 -94
- package/build/plugin/rules/ts/no-any-type.d.ts +8 -8
- package/build/plugin/rules/ts/no-any-type.js +36 -36
- package/build/plugin/rules/ts/no-as-cast.d.ts +8 -8
- package/build/plugin/rules/ts/no-as-cast.js +49 -49
- package/build/plugin/rules/ts/no-dynamic-imports.d.ts +8 -8
- package/build/plugin/rules/ts/no-dynamic-imports.js +50 -50
- package/build/plugin/rules/ts/no-native-browser-dialogs.d.ts +8 -8
- package/build/plugin/rules/ts/no-native-browser-dialogs.js +78 -78
- package/build/plugin/rules/ts/no-plain-function-export.d.ts +9 -9
- package/build/plugin/rules/ts/no-plain-function-export.js +69 -69
- package/build/plugin/rules/ts/one-export-per-file.d.ts +8 -8
- package/build/plugin/rules/ts/one-export-per-file.js +73 -73
- package/build/scripts/dynamo-fix.d.ts +26 -26
- package/build/scripts/dynamo-fix.js +146 -146
- package/build/scripts/eslintrc-audit.d.ts +26 -26
- package/build/scripts/eslintrc-audit.js +100 -100
- package/build/scripts/fix-return-types.d.ts +74 -74
- package/build/scripts/fix-return-types.js +226 -226
- package/build/scripts/validate-imports.d.ts +26 -26
- package/build/scripts/validate-imports.js +157 -146
- package/build/scripts/validate-imports.js.map +1 -1
- package/build/scripts/validate-naming.d.ts +26 -26
- package/build/scripts/validate-naming.js +157 -131
- package/build/scripts/validate-naming.js.map +1 -1
- package/eslint.config.js +15 -15
- package/package.json +105 -105
- package/samples/.vscode/settings.json +13 -13
- package/samples/base/.eslintrc.json +6 -6
- package/samples/base/eslint.config.js +3 -3
- package/samples/fsm/.eslintrc.json +4 -4
- package/samples/fsm/eslint.config.js +3 -3
- package/samples/ngx/.eslintrc.json +6 -6
- package/samples/ngx/eslint.config.js +3 -3
- package/samples/ngx-package/.eslintrc.json +4 -4
- package/samples/ngx-package/eslint.config.js +3 -3
- package/samples/nts/.eslintrc.json +6 -6
- package/samples/nts/eslint.config.js +3 -3
- package/samples/nts-package/.eslintrc.json +4 -4
- package/samples/nts-package/eslint.config.js +3 -3
- package/samples/package.json.example +26 -26
- package/samples/poc-sample.ts +38 -38
- package/samples/poc-violations.ts +54 -54
- package/scripts/run-coverage-tests.js +24 -24
- package/spec/support/helpers/ts-node-helper.js +9 -9
- package/spec/support/jasmine.coverage.json +23 -23
- package/spec/support/jasmine.json +24 -24
- package/src/configs/base.ts +157 -157
- package/src/configs/fsm.ts +10 -10
- package/src/configs/ngx-package.ts +10 -10
- package/src/configs/ngx.ts +96 -96
- package/src/configs/nts-package.ts +20 -20
- package/src/configs/nts.ts +34 -34
- package/src/index.ts +4 -4
- package/src/plugin/index.ts +86 -86
- package/src/plugin/rules/angular/angular-for-track-logic.spec.ts +44 -44
- package/src/plugin/rules/angular/angular-for-track-logic.ts +88 -88
- package/src/plugin/rules/angular/effect-signal-loop.spec.ts +89 -89
- package/src/plugin/rules/angular/effect-signal-loop.ts +125 -125
- package/src/plugin/rules/angular/no-async-ngoninit.spec.ts +50 -50
- package/src/plugin/rules/angular/no-async-ngoninit.ts +43 -43
- package/src/plugin/rules/angular/no-component-direct-api.spec.ts +78 -78
- package/src/plugin/rules/angular/no-component-direct-api.ts +82 -82
- package/src/plugin/rules/angular/no-method-call-in-template.spec.ts +63 -63
- package/src/plugin/rules/angular/no-method-call-in-template.ts +89 -89
- package/src/plugin/rules/angular/no-ngfor-directive.spec.ts +44 -44
- package/src/plugin/rules/angular/no-ngfor-directive.ts +62 -62
- package/src/plugin/rules/angular/no-ngif-directive.spec.ts +44 -44
- package/src/plugin/rules/angular/no-ngif-directive.ts +62 -62
- package/src/plugin/rules/explicit-types.spec.ts +190 -190
- package/src/plugin/rules/explicit-types.ts +186 -186
- package/src/plugin/rules/import/import-order.spec.ts +219 -219
- package/src/plugin/rules/import/import-order.ts +197 -197
- package/src/plugin/rules/import/no-import-type.spec.ts +69 -69
- package/src/plugin/rules/import/no-import-type.ts +46 -46
- package/src/plugin/rules/import/no-js-import.spec.ts +82 -82
- package/src/plugin/rules/import/no-js-import.ts +45 -45
- package/src/plugin/rules/naming-patterns.spec.ts +189 -189
- package/src/plugin/rules/naming-patterns.ts +426 -426
- package/src/plugin/rules/no-getter-logic.spec.ts +591 -591
- package/src/plugin/rules/no-getter-logic.ts +220 -220
- package/src/plugin/rules/prefer-enum-over-string-union.spec.ts +583 -583
- package/src/plugin/rules/prefer-enum-over-string-union.ts +333 -333
- package/src/plugin/rules/prefer-interface-over-duplicate-types.spec.ts +404 -404
- package/src/plugin/rules/prefer-interface-over-duplicate-types.ts +314 -314
- package/src/plugin/rules/require-jsdoc-description.spec.ts +779 -779
- package/src/plugin/rules/require-jsdoc-description.ts +572 -572
- package/src/plugin/rules/require-test-description-prefix.spec.ts +459 -459
- package/src/plugin/rules/require-test-description-prefix.ts +154 -154
- package/src/plugin/rules/ts/data-model-extends.spec.ts +84 -84
- package/src/plugin/rules/ts/data-model-extends.ts +100 -100
- package/src/plugin/rules/ts/no-any-type.spec.ts +28 -28
- package/src/plugin/rules/ts/no-any-type.ts +36 -36
- package/src/plugin/rules/ts/no-as-cast.spec.ts +51 -51
- package/src/plugin/rules/ts/no-as-cast.ts +51 -51
- package/src/plugin/rules/ts/no-dynamic-imports.spec.ts +54 -54
- package/src/plugin/rules/ts/no-dynamic-imports.ts +49 -49
- package/src/plugin/rules/ts/no-native-browser-dialogs.spec.ts +54 -54
- package/src/plugin/rules/ts/no-native-browser-dialogs.ts +84 -84
- package/src/plugin/rules/ts/no-plain-function-export.spec.ts +72 -72
- package/src/plugin/rules/ts/no-plain-function-export.ts +73 -73
- package/src/plugin/rules/ts/one-export-per-file.spec.ts +64 -64
- package/src/plugin/rules/ts/one-export-per-file.ts +77 -77
- package/src/scripts/dynamo-fix.ts +172 -172
- package/src/scripts/eslintrc-audit.ts +116 -116
- package/src/scripts/fix-return-types.spec.ts +65 -65
- package/src/scripts/fix-return-types.ts +288 -288
- package/src/scripts/validate-imports.ts +278 -261
- package/src/scripts/validate-naming.ts +204 -187
- package/src/scripts/validator-cli.integration.spec.ts +96 -0
- package/tsconfig.json +31 -31
|
@@ -1,173 +1,173 @@
|
|
|
1
|
-
# CCAP Revisioned Review integráció a Dynamo ESLint-be
|
|
2
|
-
|
|
3
|
-
**Dátum:** 2026-04-18
|
|
4
|
-
|
|
5
|
-
## Összefoglaló
|
|
6
|
-
|
|
7
|
-
A `ccap-revisioned/server/src/_modules/developer-tools/` alatti **Code Review
|
|
8
|
-
toolkit** AST-portable részének átültetése a `@futdevpro/dynamo-eslint`
|
|
9
|
-
plugin-be. Eredmény: az IDE a háttér-ben azonnal mutatja a CCAP-szintű
|
|
10
|
-
review-violation-öket — `eslint --fix`-szel a fixálható-k automatikusan
|
|
11
|
-
javíthatók.
|
|
12
|
-
|
|
13
|
-
Az eredeti `ccap-revisioned` projekt-hez **nem** nyúltunk hozzá.
|
|
14
|
-
|
|
15
|
-
## Áttekintés: 25 AST-portable review
|
|
16
|
-
|
|
17
|
-
A 38 CCAP review-ból:
|
|
18
|
-
|
|
19
|
-
- **8 review** csak filesystem-szinten értelmezhető (cross-file konzisztencia,
|
|
20
|
-
file-rename autofix) → **csak `dc rev`-ben** él (lásd `dynamo-cli` doc).
|
|
21
|
-
- **6 review** lefedve **ESLint built-in** vagy `@typescript-eslint`
|
|
22
|
-
szabállyal — `base.ts`-ben aktiválva.
|
|
23
|
-
- **4 review** **megerősítve** meglévő `@futdevpro/dynamo` szabályokon
|
|
24
|
-
belül (sub-check-ek + szigorúbb logika).
|
|
25
|
-
- **14 review** **új AST-szabály-ként** implementálva.
|
|
26
|
-
|
|
27
|
-
## 1. Új ESLint built-in / typescript-eslint aktiválás (`base.ts`)
|
|
28
|
-
|
|
29
|
-
| Szabály | Megfelelő CCAP review |
|
|
30
|
-
| ------------------------------------------------ | ---------------------------- |
|
|
31
|
-
| `max-params: [warn, 3]` (régről 4) | `method-input-count` |
|
|
32
|
-
| `object-shorthand: [warn, never]` | `no-object-shorthand` |
|
|
33
|
-
| `dot-notation: warn` | `no-bracket-property-access` |
|
|
34
|
-
| `@typescript-eslint/array-type: [warn, array]` | `no-array-generic` |
|
|
35
|
-
| `@typescript-eslint/prefer-optional-chain: warn` | `prefer-optional-chaining` |
|
|
36
|
-
| `@typescript-eslint/no-require-imports: warn` | `no-dynamic-imports` (CJS) |
|
|
37
|
-
|
|
38
|
-
## 2. Megerősített meglévő szabályok
|
|
39
|
-
|
|
40
|
-
### `naming-patterns` (komplett rewrite)
|
|
41
|
-
|
|
42
|
-
Konfigurálható sub-check-ek `checks` schema option-nel — mind a 7 CCAP
|
|
43
|
-
naming-review egy szabály-on belül, AST-alapú PropertyDefinition /
|
|
44
|
-
ClassDeclaration / TSEnumDeclaration visitor-okkal.
|
|
45
|
-
|
|
46
|
-
Sub-check-ek (default: mind aktív):
|
|
47
|
-
|
|
48
|
-
- `booleanIsPrefix` — boolean property `is`-prefix
|
|
49
|
-
- `signalPostfix` — `signal()` / `computed()` factory `_$` postfix
|
|
50
|
-
- `rxjsPostfix` — `BehaviorSubject` `_BS`, `Subject` `_S`, `Observable` `$`
|
|
51
|
-
- `fileClassPostfix` — class-postfix illeszkedik a fájl-pattern-hez
|
|
52
|
-
- `enumValueFormat` — enum kulcs camelCase, érték kebab-case (`*.type-enum.ts`)
|
|
53
|
-
- `servicePropertyPostfix` — `_DataService` injektált prop `_DS`-re végződik (`_AS`, `_CS`, `_MS` is)
|
|
54
|
-
- `fileClassNameConsistency` — fájl-entity rész = class-entity rész (kebab-átkonvertálva)
|
|
55
|
-
|
|
56
|
-
### `no-getter-logic` (CCAP-megerősítés)
|
|
57
|
-
|
|
58
|
-
- Új tiltott AST node-ok: `IfStatement`, `ForStatement`, `WhileStatement`,
|
|
59
|
-
`SwitchStatement`, `TryStatement`, `ThrowStatement`, `VariableDeclaration`
|
|
60
|
-
- Új ellenőrzés: `BlockStatement.body.length > 1` — több-utasításos getter tilos
|
|
61
|
-
|
|
62
|
-
### `require-jsdoc-description` (CCAP-megerősítés)
|
|
63
|
-
|
|
64
|
-
- Új visitor: `TSTypeAliasDeclaration` — exportált `type X = …` is kötelező
|
|
65
|
-
JSDoc-os
|
|
66
|
-
|
|
67
|
-
### `import-order` (változatlanul lefedi)
|
|
68
|
-
|
|
69
|
-
A CCAP `import-group-order` review 4-csoport-os elvét már a meglévő rule
|
|
70
|
-
implementálja.
|
|
71
|
-
|
|
72
|
-
## 3. Új TypeScript szabályok (`src/plugin/rules/ts/`)
|
|
73
|
-
|
|
74
|
-
| Szabály | CCAP review |
|
|
75
|
-
| ----------------------------- | ---------------------------- |
|
|
76
|
-
| `no-as-cast` | `no-as-cast` (kivéve `as const`) |
|
|
77
|
-
| `no-any-type` | `no-any-type` |
|
|
78
|
-
| `no-dynamic-imports` | `no-dynamic-imports` (ES + CJS) |
|
|
79
|
-
| `one-export-per-file` | `one-export-per-file` (kivételek: `.const.ts`, `.type-enum.ts`, `.interface.ts`, `.data-model.ts`, `.control-model.ts`) |
|
|
80
|
-
| `no-plain-function-export` | `no-plain-function-export` (kivéve `.spec.ts`) |
|
|
81
|
-
| `data-model-extends` | `data-model-extends-metadata` + `parallel-date-fields` (egy szabály) |
|
|
82
|
-
| `no-native-browser-dialogs` | `no-native-browser-dialogs` |
|
|
83
|
-
|
|
84
|
-
## 4. Új Angular szabályok (`src/plugin/rules/angular/`)
|
|
85
|
-
|
|
86
|
-
### TypeScript-AST (alkalmazva `*.ts` fájlokra)
|
|
87
|
-
|
|
88
|
-
| Szabály | CCAP review |
|
|
89
|
-
| ----------------------------- | ---------------------------- |
|
|
90
|
-
| `no-async-ngoninit` | `no-async-ngoninit` — `async ngOnInit` tilos |
|
|
91
|
-
| `no-component-direct-api` | `no-component-direct-api` — komponens nem importálhat `*ApiService`-t / `HttpClient`-et |
|
|
92
|
-
| `effect-signal-loop` | `effect-signal-loop` — `effect()` signal read+write detection |
|
|
93
|
-
|
|
94
|
-
### Template-text-scan (alkalmazva `*.html` fájlokra)
|
|
95
|
-
|
|
96
|
-
| Szabály | CCAP review |
|
|
97
|
-
| ----------------------------- | ---------------------------- |
|
|
98
|
-
| `no-method-call-in-template` | `no-method-call-in-template` — `{{ method() }}` / `[attr]="m()"` / `@if (m())` tilos |
|
|
99
|
-
| `angular-for-track-logic` | `angular-for-track-logic` — `@for track` csak property access lehet |
|
|
100
|
-
| `no-ngif-directive` | `no-ngif-directive` — `*ngIf` helyett `@if` |
|
|
101
|
-
| `no-ngfor-directive` | `no-ngfor-directive` — `*ngFor` helyett `@for` |
|
|
102
|
-
|
|
103
|
-
> **Megjegyzés**: A 4 template-szabály nem AST-t, hanem source-text regex-et
|
|
104
|
-
> használ a `Program` visitor-ban. Ez direkt döntés — robosztusabb a többféle
|
|
105
|
-
> Angular template-parser verzió ellenében, és a CCAP review is ugyanígy
|
|
106
|
-
> szöveg-szinten skennel.
|
|
107
|
-
|
|
108
|
-
## Aktiválás
|
|
109
|
-
|
|
110
|
-
A 7 új TS szabály mind regisztrálódik a `base.ts`-ben (default: `warn`).
|
|
111
|
-
|
|
112
|
-
A 7 Angular szabály a `ngx.ts`-ben aktiválódik:
|
|
113
|
-
|
|
114
|
-
- 3 darab a `*.ts` block-ban (no-async-ngoninit, no-component-direct-api, effect-signal-loop)
|
|
115
|
-
- 4 darab a `*.html` block-ban (template-szabályok)
|
|
116
|
-
|
|
117
|
-
A `ngx.ts` html-block plugins szekcióját kibővítettük `...ngxBaseConfig[1].plugins`-szal,
|
|
118
|
-
hogy a `@futdevpro/dynamo` plugin a html files alatt is regisztrált legyen.
|
|
119
|
-
|
|
120
|
-
## Tesztek
|
|
121
|
-
|
|
122
|
-
Minden új szabály-hoz `*.spec.ts` (mock-context pattern, ahogy a meglévő
|
|
123
|
-
specek is csinálták):
|
|
124
|
-
|
|
125
|
-
- 7 darab `src/plugin/rules/ts/*.spec.ts`
|
|
126
|
-
- 7 darab `src/plugin/rules/angular/*.spec.ts`
|
|
127
|
-
- `naming-patterns.spec.ts` — komplett rewrite a 7 sub-check-hez
|
|
128
|
-
- `no-getter-logic.spec.ts` — multi-statement + if-statement edge case-ek
|
|
129
|
-
- `require-jsdoc-description.spec.ts` — `TSTypeAliasDeclaration` visitor expose
|
|
130
|
-
|
|
131
|
-
Eredmény: **186 spec, 0 failure** (a meglévő 167-en felül a 19 új).
|
|
132
|
-
|
|
133
|
-
Futtatás: `pnpm test`.
|
|
134
|
-
|
|
135
|
-
## Disable comment
|
|
136
|
-
|
|
137
|
-
ESLint natív disable-komment-tel kapcsolható ki egy adott rule:
|
|
138
|
-
|
|
139
|
-
```typescript
|
|
140
|
-
// eslint-disable-next-line @futdevpro/dynamo/no-as-cast
|
|
141
|
-
const x: MyType = (someUnknown as MyType);
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
A CCAP `// ccap-review-disable` és az új `// dy-review-disable` szintaxis
|
|
145
|
-
**csak** a CLI-szintű `dc rev` által értelmezett — ESLint-en nem hat. Ha
|
|
146
|
-
mindkét toolból ki akarsz tiltani egy violation-t, mindkét komment-stílust
|
|
147
|
-
használd.
|
|
148
|
-
|
|
149
|
-
## When to use which?
|
|
150
|
-
|
|
151
|
-
| Helyzet | CLI (`dc rev`) | ESLint plugin |
|
|
152
|
-
| ------------------------------------------------ | -------------- | ------------- |
|
|
153
|
-
| IDE inline-hint, save-on-format autofix | | ✓ |
|
|
154
|
-
| Pre-commit hook (gyors, fájlonkénti) | | ✓ |
|
|
155
|
-
| CI repo-wide audit JSON output-tal | ✓ | |
|
|
156
|
-
| Cross-file konzisztencia (module-export-prefix) | ✓ | |
|
|
157
|
-
| File-rename autofix (file-class-name-consistency) | ✓ | |
|
|
158
|
-
| Bulk autofix (`--fix --apply`) | ✓ | |
|
|
159
|
-
| Per-fájl, AST-pontosságú szabály-violation | | ✓ |
|
|
160
|
-
| Naming + signal + rxjs postfix | ✓ | ✓ (mindkettő) |
|
|
161
|
-
| Template `*ngIf` / `@for track` ellenőrzés | ✓ | ✓ (mindkettő) |
|
|
162
|
-
|
|
163
|
-
A két toolkit **komplementer**: az ESLint az IDE-szintű real-time feedback,
|
|
164
|
-
a CLI a repo-szintű audit + bulk-autofix. Ahol mindkét tool implementálja
|
|
165
|
-
ugyanazt a review-t, ott double-coverage van — ez szándékos: az ESLint az
|
|
166
|
-
IDE-ben azonnal jelez, a CLI pedig CI-ben még egyszer leellenőriz.
|
|
167
|
-
|
|
168
|
-
## Kapcsolódó dokumentumok
|
|
169
|
-
|
|
170
|
-
- `dynamo-cli/__documentations/2026-04-18-ccap-review-integration.md` — CLI oldal
|
|
171
|
-
- `dynamo-eslint/src/configs/base.ts` — base ruleset (összes új TS szabály)
|
|
172
|
-
- `dynamo-eslint/src/configs/ngx.ts` — Angular ruleset (új Angular + template szabályok)
|
|
173
|
-
- `dynamo-eslint/src/plugin/index.ts` — plugin export + recommended config
|
|
1
|
+
# CCAP Revisioned Review integráció a Dynamo ESLint-be
|
|
2
|
+
|
|
3
|
+
**Dátum:** 2026-04-18
|
|
4
|
+
|
|
5
|
+
## Összefoglaló
|
|
6
|
+
|
|
7
|
+
A `ccap-revisioned/server/src/_modules/developer-tools/` alatti **Code Review
|
|
8
|
+
toolkit** AST-portable részének átültetése a `@futdevpro/dynamo-eslint`
|
|
9
|
+
plugin-be. Eredmény: az IDE a háttér-ben azonnal mutatja a CCAP-szintű
|
|
10
|
+
review-violation-öket — `eslint --fix`-szel a fixálható-k automatikusan
|
|
11
|
+
javíthatók.
|
|
12
|
+
|
|
13
|
+
Az eredeti `ccap-revisioned` projekt-hez **nem** nyúltunk hozzá.
|
|
14
|
+
|
|
15
|
+
## Áttekintés: 25 AST-portable review
|
|
16
|
+
|
|
17
|
+
A 38 CCAP review-ból:
|
|
18
|
+
|
|
19
|
+
- **8 review** csak filesystem-szinten értelmezhető (cross-file konzisztencia,
|
|
20
|
+
file-rename autofix) → **csak `dc rev`-ben** él (lásd `dynamo-cli` doc).
|
|
21
|
+
- **6 review** lefedve **ESLint built-in** vagy `@typescript-eslint`
|
|
22
|
+
szabállyal — `base.ts`-ben aktiválva.
|
|
23
|
+
- **4 review** **megerősítve** meglévő `@futdevpro/dynamo` szabályokon
|
|
24
|
+
belül (sub-check-ek + szigorúbb logika).
|
|
25
|
+
- **14 review** **új AST-szabály-ként** implementálva.
|
|
26
|
+
|
|
27
|
+
## 1. Új ESLint built-in / typescript-eslint aktiválás (`base.ts`)
|
|
28
|
+
|
|
29
|
+
| Szabály | Megfelelő CCAP review |
|
|
30
|
+
| ------------------------------------------------ | ---------------------------- |
|
|
31
|
+
| `max-params: [warn, 3]` (régről 4) | `method-input-count` |
|
|
32
|
+
| `object-shorthand: [warn, never]` | `no-object-shorthand` |
|
|
33
|
+
| `dot-notation: warn` | `no-bracket-property-access` |
|
|
34
|
+
| `@typescript-eslint/array-type: [warn, array]` | `no-array-generic` |
|
|
35
|
+
| `@typescript-eslint/prefer-optional-chain: warn` | `prefer-optional-chaining` |
|
|
36
|
+
| `@typescript-eslint/no-require-imports: warn` | `no-dynamic-imports` (CJS) |
|
|
37
|
+
|
|
38
|
+
## 2. Megerősített meglévő szabályok
|
|
39
|
+
|
|
40
|
+
### `naming-patterns` (komplett rewrite)
|
|
41
|
+
|
|
42
|
+
Konfigurálható sub-check-ek `checks` schema option-nel — mind a 7 CCAP
|
|
43
|
+
naming-review egy szabály-on belül, AST-alapú PropertyDefinition /
|
|
44
|
+
ClassDeclaration / TSEnumDeclaration visitor-okkal.
|
|
45
|
+
|
|
46
|
+
Sub-check-ek (default: mind aktív):
|
|
47
|
+
|
|
48
|
+
- `booleanIsPrefix` — boolean property `is`-prefix
|
|
49
|
+
- `signalPostfix` — `signal()` / `computed()` factory `_$` postfix
|
|
50
|
+
- `rxjsPostfix` — `BehaviorSubject` `_BS`, `Subject` `_S`, `Observable` `$`
|
|
51
|
+
- `fileClassPostfix` — class-postfix illeszkedik a fájl-pattern-hez
|
|
52
|
+
- `enumValueFormat` — enum kulcs camelCase, érték kebab-case (`*.type-enum.ts`)
|
|
53
|
+
- `servicePropertyPostfix` — `_DataService` injektált prop `_DS`-re végződik (`_AS`, `_CS`, `_MS` is)
|
|
54
|
+
- `fileClassNameConsistency` — fájl-entity rész = class-entity rész (kebab-átkonvertálva)
|
|
55
|
+
|
|
56
|
+
### `no-getter-logic` (CCAP-megerősítés)
|
|
57
|
+
|
|
58
|
+
- Új tiltott AST node-ok: `IfStatement`, `ForStatement`, `WhileStatement`,
|
|
59
|
+
`SwitchStatement`, `TryStatement`, `ThrowStatement`, `VariableDeclaration`
|
|
60
|
+
- Új ellenőrzés: `BlockStatement.body.length > 1` — több-utasításos getter tilos
|
|
61
|
+
|
|
62
|
+
### `require-jsdoc-description` (CCAP-megerősítés)
|
|
63
|
+
|
|
64
|
+
- Új visitor: `TSTypeAliasDeclaration` — exportált `type X = …` is kötelező
|
|
65
|
+
JSDoc-os
|
|
66
|
+
|
|
67
|
+
### `import-order` (változatlanul lefedi)
|
|
68
|
+
|
|
69
|
+
A CCAP `import-group-order` review 4-csoport-os elvét már a meglévő rule
|
|
70
|
+
implementálja.
|
|
71
|
+
|
|
72
|
+
## 3. Új TypeScript szabályok (`src/plugin/rules/ts/`)
|
|
73
|
+
|
|
74
|
+
| Szabály | CCAP review |
|
|
75
|
+
| ----------------------------- | ---------------------------- |
|
|
76
|
+
| `no-as-cast` | `no-as-cast` (kivéve `as const`) |
|
|
77
|
+
| `no-any-type` | `no-any-type` |
|
|
78
|
+
| `no-dynamic-imports` | `no-dynamic-imports` (ES + CJS) |
|
|
79
|
+
| `one-export-per-file` | `one-export-per-file` (kivételek: `.const.ts`, `.type-enum.ts`, `.interface.ts`, `.data-model.ts`, `.control-model.ts`) |
|
|
80
|
+
| `no-plain-function-export` | `no-plain-function-export` (kivéve `.spec.ts`) |
|
|
81
|
+
| `data-model-extends` | `data-model-extends-metadata` + `parallel-date-fields` (egy szabály) |
|
|
82
|
+
| `no-native-browser-dialogs` | `no-native-browser-dialogs` |
|
|
83
|
+
|
|
84
|
+
## 4. Új Angular szabályok (`src/plugin/rules/angular/`)
|
|
85
|
+
|
|
86
|
+
### TypeScript-AST (alkalmazva `*.ts` fájlokra)
|
|
87
|
+
|
|
88
|
+
| Szabály | CCAP review |
|
|
89
|
+
| ----------------------------- | ---------------------------- |
|
|
90
|
+
| `no-async-ngoninit` | `no-async-ngoninit` — `async ngOnInit` tilos |
|
|
91
|
+
| `no-component-direct-api` | `no-component-direct-api` — komponens nem importálhat `*ApiService`-t / `HttpClient`-et |
|
|
92
|
+
| `effect-signal-loop` | `effect-signal-loop` — `effect()` signal read+write detection |
|
|
93
|
+
|
|
94
|
+
### Template-text-scan (alkalmazva `*.html` fájlokra)
|
|
95
|
+
|
|
96
|
+
| Szabály | CCAP review |
|
|
97
|
+
| ----------------------------- | ---------------------------- |
|
|
98
|
+
| `no-method-call-in-template` | `no-method-call-in-template` — `{{ method() }}` / `[attr]="m()"` / `@if (m())` tilos |
|
|
99
|
+
| `angular-for-track-logic` | `angular-for-track-logic` — `@for track` csak property access lehet |
|
|
100
|
+
| `no-ngif-directive` | `no-ngif-directive` — `*ngIf` helyett `@if` |
|
|
101
|
+
| `no-ngfor-directive` | `no-ngfor-directive` — `*ngFor` helyett `@for` |
|
|
102
|
+
|
|
103
|
+
> **Megjegyzés**: A 4 template-szabály nem AST-t, hanem source-text regex-et
|
|
104
|
+
> használ a `Program` visitor-ban. Ez direkt döntés — robosztusabb a többféle
|
|
105
|
+
> Angular template-parser verzió ellenében, és a CCAP review is ugyanígy
|
|
106
|
+
> szöveg-szinten skennel.
|
|
107
|
+
|
|
108
|
+
## Aktiválás
|
|
109
|
+
|
|
110
|
+
A 7 új TS szabály mind regisztrálódik a `base.ts`-ben (default: `warn`).
|
|
111
|
+
|
|
112
|
+
A 7 Angular szabály a `ngx.ts`-ben aktiválódik:
|
|
113
|
+
|
|
114
|
+
- 3 darab a `*.ts` block-ban (no-async-ngoninit, no-component-direct-api, effect-signal-loop)
|
|
115
|
+
- 4 darab a `*.html` block-ban (template-szabályok)
|
|
116
|
+
|
|
117
|
+
A `ngx.ts` html-block plugins szekcióját kibővítettük `...ngxBaseConfig[1].plugins`-szal,
|
|
118
|
+
hogy a `@futdevpro/dynamo` plugin a html files alatt is regisztrált legyen.
|
|
119
|
+
|
|
120
|
+
## Tesztek
|
|
121
|
+
|
|
122
|
+
Minden új szabály-hoz `*.spec.ts` (mock-context pattern, ahogy a meglévő
|
|
123
|
+
specek is csinálták):
|
|
124
|
+
|
|
125
|
+
- 7 darab `src/plugin/rules/ts/*.spec.ts`
|
|
126
|
+
- 7 darab `src/plugin/rules/angular/*.spec.ts`
|
|
127
|
+
- `naming-patterns.spec.ts` — komplett rewrite a 7 sub-check-hez
|
|
128
|
+
- `no-getter-logic.spec.ts` — multi-statement + if-statement edge case-ek
|
|
129
|
+
- `require-jsdoc-description.spec.ts` — `TSTypeAliasDeclaration` visitor expose
|
|
130
|
+
|
|
131
|
+
Eredmény: **186 spec, 0 failure** (a meglévő 167-en felül a 19 új).
|
|
132
|
+
|
|
133
|
+
Futtatás: `pnpm test`.
|
|
134
|
+
|
|
135
|
+
## Disable comment
|
|
136
|
+
|
|
137
|
+
ESLint natív disable-komment-tel kapcsolható ki egy adott rule:
|
|
138
|
+
|
|
139
|
+
```typescript
|
|
140
|
+
// eslint-disable-next-line @futdevpro/dynamo/no-as-cast
|
|
141
|
+
const x: MyType = (someUnknown as MyType);
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
A CCAP `// ccap-review-disable` és az új `// dy-review-disable` szintaxis
|
|
145
|
+
**csak** a CLI-szintű `dc rev` által értelmezett — ESLint-en nem hat. Ha
|
|
146
|
+
mindkét toolból ki akarsz tiltani egy violation-t, mindkét komment-stílust
|
|
147
|
+
használd.
|
|
148
|
+
|
|
149
|
+
## When to use which?
|
|
150
|
+
|
|
151
|
+
| Helyzet | CLI (`dc rev`) | ESLint plugin |
|
|
152
|
+
| ------------------------------------------------ | -------------- | ------------- |
|
|
153
|
+
| IDE inline-hint, save-on-format autofix | | ✓ |
|
|
154
|
+
| Pre-commit hook (gyors, fájlonkénti) | | ✓ |
|
|
155
|
+
| CI repo-wide audit JSON output-tal | ✓ | |
|
|
156
|
+
| Cross-file konzisztencia (module-export-prefix) | ✓ | |
|
|
157
|
+
| File-rename autofix (file-class-name-consistency) | ✓ | |
|
|
158
|
+
| Bulk autofix (`--fix --apply`) | ✓ | |
|
|
159
|
+
| Per-fájl, AST-pontosságú szabály-violation | | ✓ |
|
|
160
|
+
| Naming + signal + rxjs postfix | ✓ | ✓ (mindkettő) |
|
|
161
|
+
| Template `*ngIf` / `@for track` ellenőrzés | ✓ | ✓ (mindkettő) |
|
|
162
|
+
|
|
163
|
+
A két toolkit **komplementer**: az ESLint az IDE-szintű real-time feedback,
|
|
164
|
+
a CLI a repo-szintű audit + bulk-autofix. Ahol mindkét tool implementálja
|
|
165
|
+
ugyanazt a review-t, ott double-coverage van — ez szándékos: az ESLint az
|
|
166
|
+
IDE-ben azonnal jelez, a CLI pedig CI-ben még egyszer leellenőriz.
|
|
167
|
+
|
|
168
|
+
## Kapcsolódó dokumentumok
|
|
169
|
+
|
|
170
|
+
- `dynamo-cli/__documentations/2026-04-18-ccap-review-integration.md` — CLI oldal
|
|
171
|
+
- `dynamo-eslint/src/configs/base.ts` — base ruleset (összes új TS szabály)
|
|
172
|
+
- `dynamo-eslint/src/configs/ngx.ts` — Angular ruleset (új Angular + template szabályok)
|
|
173
|
+
- `dynamo-eslint/src/plugin/index.ts` — plugin export + recommended config
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# BFR-CTM-005 — ESLint 9 validator flat-config correction
|
|
2
|
+
|
|
3
|
+
**Date:** 2026-08-18
|
|
4
|
+
|
|
5
|
+
**Target release:** `@futdevpro/dynamo-eslint@1.15.28`
|
|
6
|
+
|
|
7
|
+
**Consumer:** Company Toolmaker
|
|
8
|
+
|
|
9
|
+
## Failure reproduced
|
|
10
|
+
|
|
11
|
+
The published `1.15.25` `dynamo-validate-imports` CLI supplied an eslintrc-shaped `baseConfig` to ESLint 9.
|
|
12
|
+
Every scanned file failed with `ConfigError: Key "parser" ... eslintrc format`, and the existing fail-hard guard
|
|
13
|
+
correctly rejected the untrustworthy result. The naming CLI loaded the package's full NTS config, so formatting,
|
|
14
|
+
JSDoc and TypeScript rules were incorrectly reported as naming violations.
|
|
15
|
+
|
|
16
|
+
## Correction
|
|
17
|
+
|
|
18
|
+
- Both CLIs now set `overrideConfigFile: true` and supply an isolated ESLint 9 flat config.
|
|
19
|
+
- Import validation enables only `@futdevpro/dynamo/import-order`.
|
|
20
|
+
- Naming validation enables only `@futdevpro/dynamo/naming-patterns`.
|
|
21
|
+
- Unused disable-directive diagnostics are disabled inside the narrow validators because they are unrelated to
|
|
22
|
+
either target rule and otherwise produce false failures.
|
|
23
|
+
- Parser resolution remains a consumer peer dependency; the explicit top-level runtime load preserves the
|
|
24
|
+
package's legacy TypeScript module-resolution compatibility.
|
|
25
|
+
- Runtime/config processing failures remain fail-hard.
|
|
26
|
+
|
|
27
|
+
## Evidence
|
|
28
|
+
|
|
29
|
+
- TypeScript compile: PASS.
|
|
30
|
+
- Modified-source ESLint: PASS with zero warnings.
|
|
31
|
+
- Jasmine: 202 specs, 0 failures after the final isolation fixture extension.
|
|
32
|
+
- New subprocess integration coverage proves clean/violating fixtures for both CLIs, absence of `ConfigError`,
|
|
33
|
+
and isolation from unrelated disable/JSDoc diagnostics.
|
|
34
|
+
- Company Toolmaker verification against the built fix:
|
|
35
|
+
- server import validation: PASS;
|
|
36
|
+
- server naming validation: PASS;
|
|
37
|
+
- client naming validation: PASS;
|
|
38
|
+
- client import baseline exposed two real ordering findings, corrected in the consumer change-set.
|
|
39
|
+
|
|
40
|
+
## Release hygiene
|
|
41
|
+
|
|
42
|
+
The working directory contains a pre-existing untracked `SKILLS.md` owned by another change-set. npm's default
|
|
43
|
+
file discovery would include it in a package built directly from this dirty directory. The `1.15.28` publish must
|
|
44
|
+
therefore run from a clean worktree at the reviewed commit with lifecycle scripts disabled; the packed manifest
|
|
45
|
+
must be rechecked there before publication. The unrelated file is preserved and excluded from this commit.
|
package/build/configs/base.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Base Rulesets For Dynamo Based Systems
|
|
3
|
-
* ESLint v9 Flat Config Format
|
|
4
|
-
*/
|
|
5
|
-
declare const tsParser: any;
|
|
6
|
-
declare const tsPlugin: any;
|
|
7
|
-
declare const unusedImportsPlugin: any;
|
|
8
|
-
declare const maxParamsNoConstructorPlugin: any;
|
|
9
|
-
declare const dynamoPlugin: any;
|
|
1
|
+
/**
|
|
2
|
+
* Base Rulesets For Dynamo Based Systems
|
|
3
|
+
* ESLint v9 Flat Config Format
|
|
4
|
+
*/
|
|
5
|
+
declare const tsParser: any;
|
|
6
|
+
declare const tsPlugin: any;
|
|
7
|
+
declare const unusedImportsPlugin: any;
|
|
8
|
+
declare const maxParamsNoConstructorPlugin: any;
|
|
9
|
+
declare const dynamoPlugin: any;
|
|
10
10
|
//# sourceMappingURL=base.d.ts.map
|