@futdevpro/dynamo-eslint 1.15.28 → 1.20.3
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/README.md +13 -16
- package/__documentations/2026-08-22-angular-20-phase2-release.md +83 -0
- package/build/configs/base.d.ts +8 -9
- package/build/configs/base.d.ts.map +1 -1
- package/build/configs/base.js +149 -150
- package/build/configs/base.js.map +1 -1
- 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 +2 -4
- package/build/configs/ngx.d.ts.map +1 -1
- package/build/configs/ngx.js +88 -91
- package/build/configs/ngx.js.map +1 -1
- 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/no-getter-logic.js.map +1 -1
- 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-enum-over-string-union.js.map +1 -1
- 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/prefer-interface-over-duplicate-types.js.map +1 -1
- 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-jsdoc-description.js.map +1 -1
- 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/dynamo-fix.js.map +1 -1
- 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.d.ts.map +1 -1
- package/build/scripts/fix-return-types.js +226 -226
- package/build/scripts/fix-return-types.js.map +1 -1
- package/build/scripts/validate-imports.d.ts +26 -26
- package/build/scripts/validate-imports.js +170 -157
- package/build/scripts/validate-imports.js.map +1 -1
- package/build/scripts/validate-naming.d.ts +26 -26
- package/build/scripts/validate-naming.js +170 -157
- package/build/scripts/validate-naming.js.map +1 -1
- package/eslint.config.js +1 -1
- package/package.json +104 -105
- package/pnpm-workspace.yaml +2 -0
- package/samples/package.json.example +5 -9
- package/src/configs/angular20-compatibility.spec.ts +73 -0
- package/src/configs/base.ts +3 -4
- package/src/configs/ngx.ts +7 -10
- package/src/plugin/rules/no-getter-logic.ts +1 -1
- package/src/plugin/rules/prefer-enum-over-string-union.spec.ts +9 -9
- package/src/plugin/rules/prefer-enum-over-string-union.ts +7 -8
- package/src/plugin/rules/prefer-interface-over-duplicate-types.spec.ts +22 -22
- package/src/plugin/rules/prefer-interface-over-duplicate-types.ts +2 -2
- package/src/plugin/rules/require-jsdoc-description.spec.ts +2 -2
- package/src/plugin/rules/require-jsdoc-description.ts +7 -7
- package/src/scripts/dynamo-fix.ts +1 -1
- package/src/scripts/fix-return-types.ts +4 -3
- package/src/scripts/validate-imports.ts +29 -15
- package/src/scripts/validate-naming.ts +29 -20
- package/src/scripts/validator-cli.integration.spec.ts +11 -8
|
@@ -31,10 +31,9 @@ import { DyFM_Log } from '@futdevpro/fsm-dynamo';
|
|
|
31
31
|
|
|
32
32
|
import namingPatternsRule from '../plugin/rules/naming-patterns';
|
|
33
33
|
|
|
34
|
-
// The parser is
|
|
35
|
-
//
|
|
36
|
-
|
|
37
|
-
const tsParser = require('@typescript-eslint/parser');
|
|
34
|
+
// The parser is provided by the unified typescript-eslint consumer peer.
|
|
35
|
+
// eslint-disable-next-line @futdevpro/dynamo/no-dynamic-imports, @typescript-eslint/no-require-imports
|
|
36
|
+
const tsParser = require('typescript-eslint').parser;
|
|
38
37
|
|
|
39
38
|
interface LineColumnMessage_Interface {
|
|
40
39
|
line: number;
|
|
@@ -47,12 +46,17 @@ interface LineColumnMessage_Interface {
|
|
|
47
46
|
/**
|
|
48
47
|
* Result of validating naming conventions in a single file
|
|
49
48
|
*/
|
|
50
|
-
interface NamingValidationResult {
|
|
49
|
+
interface NamingValidationResult {
|
|
51
50
|
/** Path to the file that was validated */
|
|
52
51
|
file: string;
|
|
53
52
|
/** Array of naming validation errors found in the file */
|
|
54
53
|
errors: LineColumnMessage_Interface[];
|
|
55
|
-
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/** Identifies the informational diagnostic emitted when isolated validators intentionally ignore inline config. */
|
|
57
|
+
function isIgnoredInlineConfigDiagnostic(message: ESLint.LintResult['messages'][number]): boolean {
|
|
58
|
+
return !message.ruleId && message.message.includes("has no effect because you have 'noInlineConfig'");
|
|
59
|
+
}
|
|
56
60
|
|
|
57
61
|
/**
|
|
58
62
|
* Validates naming conventions in a single TypeScript file
|
|
@@ -76,8 +80,9 @@ async function validateNamingInFile(filePath: string): Promise<NamingValidationR
|
|
|
76
80
|
overrideConfigFile: true,
|
|
77
81
|
overrideConfig: [{
|
|
78
82
|
files: [ '**/*.{ts,tsx}' ],
|
|
79
|
-
linterOptions: {
|
|
80
|
-
|
|
83
|
+
linterOptions: {
|
|
84
|
+
noInlineConfig: true,
|
|
85
|
+
reportUnusedDisableDirectives: 'off',
|
|
81
86
|
},
|
|
82
87
|
languageOptions: {
|
|
83
88
|
parser: tsParser,
|
|
@@ -106,17 +111,14 @@ async function validateNamingInFile(filePath: string): Promise<NamingValidationR
|
|
|
106
111
|
// Transform ESLint messages into our result format
|
|
107
112
|
return {
|
|
108
113
|
file: filePath,
|
|
109
|
-
errors: result.messages
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
message: msg.message,
|
|
118
|
-
ruleId: msg.ruleId || 'unknown',
|
|
119
|
-
})),
|
|
114
|
+
errors: result.messages
|
|
115
|
+
.filter((message: ESLint.LintResult['messages'][number]): boolean => !isIgnoredInlineConfigDiagnostic(message))
|
|
116
|
+
.map((message: ESLint.LintResult['messages'][number]): LineColumnMessage_Interface => ({
|
|
117
|
+
line: message.line,
|
|
118
|
+
column: message.column,
|
|
119
|
+
message: message.message,
|
|
120
|
+
ruleId: message.ruleId || 'unknown',
|
|
121
|
+
})),
|
|
120
122
|
};
|
|
121
123
|
}
|
|
122
124
|
|
|
@@ -134,7 +136,14 @@ async function validateNamingInFile(filePath: string): Promise<NamingValidationR
|
|
|
134
136
|
async function main(): Promise<void> {
|
|
135
137
|
// Find all TypeScript files, excluding common directories and test files
|
|
136
138
|
const files: string[] = await fg([ '**/*.{ts,tsx}' ], {
|
|
137
|
-
ignore: [
|
|
139
|
+
ignore: [
|
|
140
|
+
'**/node_modules/**',
|
|
141
|
+
'**/build/**',
|
|
142
|
+
'**/dist/**',
|
|
143
|
+
'**/samples/**',
|
|
144
|
+
'**/*.spec.ts',
|
|
145
|
+
'**/*.test.ts',
|
|
146
|
+
],
|
|
138
147
|
});
|
|
139
148
|
|
|
140
149
|
DyFM_Log.log(`[dynamo-validate-naming] Scanning ${files.length} files...`);
|
|
@@ -46,14 +46,15 @@ describe('| Dynamo validator CLI flat-config integration', (): void => {
|
|
|
46
46
|
const result: DyESL_ValidatorResult_Interface = runValidator(
|
|
47
47
|
'validate-imports.js',
|
|
48
48
|
'clean.ts',
|
|
49
|
-
'/* eslint-disable
|
|
49
|
+
'/* eslint-disable @consumer-only/plugin-rule */\n'
|
|
50
50
|
+ 'import { join } from \'path\';\n\n'
|
|
51
51
|
+ 'export const value: string = join(\'a\', \'b\');\n',
|
|
52
52
|
);
|
|
53
53
|
|
|
54
|
-
expect(result.status).toBe(0);
|
|
55
|
-
expect(result.output).toContain('All import validations passed');
|
|
56
|
-
expect(result.output).not.toContain('ConfigError');
|
|
54
|
+
expect(result.status).toBe(0);
|
|
55
|
+
expect(result.output).toContain('All import validations passed');
|
|
56
|
+
expect(result.output).not.toContain('ConfigError');
|
|
57
|
+
expect(result.output).not.toContain('Definition for rule');
|
|
57
58
|
});
|
|
58
59
|
|
|
59
60
|
it('| fails only for an import-order violation', (): void => {
|
|
@@ -74,12 +75,14 @@ describe('| Dynamo validator CLI flat-config integration', (): void => {
|
|
|
74
75
|
const result: DyESL_ValidatorResult_Interface = runValidator(
|
|
75
76
|
'validate-naming.js',
|
|
76
77
|
'clean.control-service.ts',
|
|
77
|
-
'/* eslint-disable
|
|
78
|
+
'/* eslint-disable @consumer-only/plugin-rule */\n'
|
|
79
|
+
+ 'export class DyESL_Clean_ControlService { public value: string = "ok"; }\n',
|
|
78
80
|
);
|
|
79
81
|
|
|
80
|
-
expect(result.status).toBe(0);
|
|
81
|
-
expect(result.output).toContain('All naming validations passed');
|
|
82
|
-
expect(result.output).not.toContain('JSDoc');
|
|
82
|
+
expect(result.status).toBe(0);
|
|
83
|
+
expect(result.output).toContain('All naming validations passed');
|
|
84
|
+
expect(result.output).not.toContain('JSDoc');
|
|
85
|
+
expect(result.output).not.toContain('Definition for rule');
|
|
83
86
|
});
|
|
84
87
|
|
|
85
88
|
it('| fails for a naming-pattern violation', (): void => {
|