@futdevpro/dynamo-eslint 1.15.25 → 1.20.2
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 +312 -315
- 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/__documentations/2026-08-22-angular-20-phase2-release.md +79 -0
- package/build/configs/base.d.ts +1 -2
- package/build/configs/base.d.ts.map +1 -1
- package/build/configs/base.js +3 -4
- package/build/configs/base.js.map +1 -1
- package/build/configs/ngx.d.ts +1 -3
- package/build/configs/ngx.d.ts.map +1 -1
- package/build/configs/ngx.js +4 -7
- package/build/configs/ngx.js.map +1 -1
- package/build/plugin/index.d.ts +24 -24
- package/build/plugin/rules/no-getter-logic.js +1 -1
- package/build/plugin/rules/no-getter-logic.js.map +1 -1
- package/build/plugin/rules/prefer-enum-over-string-union.js +7 -7
- package/build/plugin/rules/prefer-enum-over-string-union.js.map +1 -1
- package/build/plugin/rules/prefer-interface-over-duplicate-types.js +2 -2
- package/build/plugin/rules/prefer-interface-over-duplicate-types.js.map +1 -1
- package/build/plugin/rules/require-jsdoc-description.js +7 -7
- package/build/plugin/rules/require-jsdoc-description.js.map +1 -1
- package/build/scripts/dynamo-fix.js +1 -1
- package/build/scripts/dynamo-fix.js.map +1 -1
- package/build/scripts/fix-return-types.d.ts.map +1 -1
- package/build/scripts/fix-return-types.js.map +1 -1
- package/build/scripts/validate-imports.js +51 -27
- package/build/scripts/validate-imports.js.map +1 -1
- package/build/scripts/validate-naming.js +49 -10
- package/build/scripts/validate-naming.js.map +1 -1
- package/eslint.config.js +15 -15
- package/package.json +27 -28
- package/pnpm-workspace.yaml +2 -0
- 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 +22 -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/angular20-compatibility.spec.ts +62 -0
- package/src/configs/base.ts +156 -157
- package/src/configs/fsm.ts +10 -10
- package/src/configs/ngx-package.ts +10 -10
- package/src/configs/ngx.ts +92 -95
- 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 -334
- 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 +286 -285
- package/src/scripts/validate-imports.ts +288 -257
- package/src/scripts/validate-naming.ts +209 -183
- package/src/scripts/validator-cli.integration.spec.ts +99 -0
- package/tsconfig.json +31 -31
|
@@ -26,9 +26,17 @@
|
|
|
26
26
|
*/
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
28
|
const tslib_1 = require("tslib");
|
|
29
|
-
const fast_glob_1 = tslib_1.__importDefault(require("fast-glob"));
|
|
30
29
|
const eslint_1 = require("eslint");
|
|
30
|
+
const fast_glob_1 = tslib_1.__importDefault(require("fast-glob"));
|
|
31
31
|
const fsm_dynamo_1 = require("@futdevpro/fsm-dynamo");
|
|
32
|
+
const naming_patterns_1 = tslib_1.__importDefault(require("../plugin/rules/naming-patterns"));
|
|
33
|
+
// The parser is provided by the unified typescript-eslint consumer peer.
|
|
34
|
+
// eslint-disable-next-line @futdevpro/dynamo/no-dynamic-imports, @typescript-eslint/no-require-imports
|
|
35
|
+
const tsParser = require('typescript-eslint').parser;
|
|
36
|
+
/** Identifies the informational diagnostic emitted when isolated validators intentionally ignore inline config. */
|
|
37
|
+
function isIgnoredInlineConfigDiagnostic(message) {
|
|
38
|
+
return !message.ruleId && message.message.includes("has no effect because you have 'noInlineConfig'");
|
|
39
|
+
}
|
|
32
40
|
/**
|
|
33
41
|
* Validates naming conventions in a single TypeScript file
|
|
34
42
|
*
|
|
@@ -47,10 +55,32 @@ const fsm_dynamo_1 = require("@futdevpro/fsm-dynamo");
|
|
|
47
55
|
* ```
|
|
48
56
|
*/
|
|
49
57
|
async function validateNamingInFile(filePath) {
|
|
50
|
-
// Configure ESLint using the main Dynamo configuration
|
|
51
58
|
const eslint = new eslint_1.ESLint({
|
|
52
|
-
|
|
53
|
-
|
|
59
|
+
overrideConfigFile: true,
|
|
60
|
+
overrideConfig: [{
|
|
61
|
+
files: ['**/*.{ts,tsx}'],
|
|
62
|
+
linterOptions: {
|
|
63
|
+
noInlineConfig: true,
|
|
64
|
+
reportUnusedDisableDirectives: 'off',
|
|
65
|
+
},
|
|
66
|
+
languageOptions: {
|
|
67
|
+
parser: tsParser,
|
|
68
|
+
parserOptions: {
|
|
69
|
+
ecmaVersion: 'latest',
|
|
70
|
+
sourceType: 'module',
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
plugins: {
|
|
74
|
+
'@futdevpro/dynamo': {
|
|
75
|
+
rules: {
|
|
76
|
+
'naming-patterns': naming_patterns_1.default,
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
rules: {
|
|
81
|
+
'@futdevpro/dynamo/naming-patterns': 'error',
|
|
82
|
+
},
|
|
83
|
+
}],
|
|
54
84
|
});
|
|
55
85
|
// Run ESLint on the file
|
|
56
86
|
const results = await eslint.lintFiles([filePath]);
|
|
@@ -58,11 +88,13 @@ async function validateNamingInFile(filePath) {
|
|
|
58
88
|
// Transform ESLint messages into our result format
|
|
59
89
|
return {
|
|
60
90
|
file: filePath,
|
|
61
|
-
errors: result.messages
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
91
|
+
errors: result.messages
|
|
92
|
+
.filter((message) => !isIgnoredInlineConfigDiagnostic(message))
|
|
93
|
+
.map((message) => ({
|
|
94
|
+
line: message.line,
|
|
95
|
+
column: message.column,
|
|
96
|
+
message: message.message,
|
|
97
|
+
ruleId: message.ruleId || 'unknown',
|
|
66
98
|
})),
|
|
67
99
|
};
|
|
68
100
|
}
|
|
@@ -80,7 +112,14 @@ async function validateNamingInFile(filePath) {
|
|
|
80
112
|
async function main() {
|
|
81
113
|
// Find all TypeScript files, excluding common directories and test files
|
|
82
114
|
const files = await (0, fast_glob_1.default)(['**/*.{ts,tsx}'], {
|
|
83
|
-
ignore: [
|
|
115
|
+
ignore: [
|
|
116
|
+
'**/node_modules/**',
|
|
117
|
+
'**/build/**',
|
|
118
|
+
'**/dist/**',
|
|
119
|
+
'**/samples/**',
|
|
120
|
+
'**/*.spec.ts',
|
|
121
|
+
'**/*.test.ts',
|
|
122
|
+
],
|
|
84
123
|
});
|
|
85
124
|
fsm_dynamo_1.DyFM_Log.log(`[dynamo-validate-naming] Scanning ${files.length} files...`);
|
|
86
125
|
const results = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate-naming.js","sourceRoot":"","sources":["../../src/scripts/validate-naming.ts"],"names":[],"mappings":";;AACA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"validate-naming.js","sourceRoot":"","sources":["../../src/scripts/validate-naming.ts"],"names":[],"mappings":";;AACA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;;;AAEH,mCAAgC;AAChC,kEAA2B;AAE3B,sDAAiD;AAEjD,8FAAiE;AAEjE,yEAAyE;AACzE,uGAAuG;AACvG,MAAM,QAAQ,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC,MAAM,CAAC;AAoBrD,mHAAmH;AACnH,SAAS,+BAA+B,CAAC,OAA8C;IACrF,OAAO,CAAC,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,iDAAiD,CAAC,CAAC;AACxG,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,KAAK,UAAU,oBAAoB,CAAC,QAAgB;IAClD,MAAM,MAAM,GAAG,IAAI,eAAM,CAAC;QACxB,kBAAkB,EAAE,IAAI;QACxB,cAAc,EAAE,CAAC;gBACf,KAAK,EAAE,CAAE,eAAe,CAAE;gBAC1B,aAAa,EAAE;oBACb,cAAc,EAAE,IAAI;oBACpB,6BAA6B,EAAE,KAAK;iBACrC;gBACD,eAAe,EAAE;oBACf,MAAM,EAAE,QAAQ;oBAChB,aAAa,EAAE;wBACb,WAAW,EAAE,QAAQ;wBACrB,UAAU,EAAE,QAAQ;qBACrB;iBACF;gBACD,OAAO,EAAE;oBACP,mBAAmB,EAAE;wBACnB,KAAK,EAAE;4BACL,iBAAiB,EAAE,yBAAkB;yBACtC;qBACF;iBACF;gBACD,KAAK,EAAE;oBACL,mCAAmC,EAAE,OAAO;iBAC7C;aACF,CAAC;KACH,CAAC,CAAC;IAEH,yBAAyB;IACzB,MAAM,OAAO,GAAwB,MAAM,MAAM,CAAC,SAAS,CAAC,CAAE,QAAQ,CAAE,CAAC,CAAC;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AC;IACnB,CAAC,CAAC,CAAC;IAEH,sDAAsD;IACtD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,kDAAkD;AAClD,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAU,EAAQ,EAAE;IAChC,qBAAQ,CAAC,KAAK,CAAC,oBAAoB,EAAE,GAAG,CAAC,CAAC;IAC1C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/eslint.config.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
const ntsPackageConfig = require('./build/configs/nts-package');
|
|
2
|
-
|
|
3
|
-
module.exports = [
|
|
4
|
-
...ntsPackageConfig,
|
|
5
|
-
{
|
|
6
|
-
files: ['**/*.ts', '**/*.tsx'],
|
|
7
|
-
languageOptions: {
|
|
8
|
-
parser: require('
|
|
9
|
-
parserOptions: {
|
|
10
|
-
ecmaVersion: 'latest',
|
|
11
|
-
sourceType: 'module'
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
];
|
|
1
|
+
const ntsPackageConfig = require('./build/configs/nts-package');
|
|
2
|
+
|
|
3
|
+
module.exports = [
|
|
4
|
+
...ntsPackageConfig,
|
|
5
|
+
{
|
|
6
|
+
files: ['**/*.ts', '**/*.tsx'],
|
|
7
|
+
languageOptions: {
|
|
8
|
+
parser: require('typescript-eslint').parser,
|
|
9
|
+
parserOptions: {
|
|
10
|
+
ecmaVersion: 'latest',
|
|
11
|
+
sourceType: 'module'
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@futdevpro/dynamo-eslint",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.20.2",
|
|
4
4
|
"description": "Shared ESLint configs, Dynamo-powered plugin and validators for FutDevPro stacks",
|
|
5
5
|
"author": "Future Development Program Ltd.",
|
|
6
6
|
"license": "ISC",
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"lint": "eslint src --ext .ts",
|
|
37
37
|
"lint:fix": "eslint src --ext .ts --fix --fix-type problem,suggestion,layout",
|
|
38
38
|
"lint:fix-all": "eslint src --ext .ts --fix && dynamo-fix-return-types",
|
|
39
|
-
"validate:imports": "
|
|
40
|
-
"validate:naming": "
|
|
41
|
-
"audit:eslintrc": "
|
|
42
|
-
"fix": "dynamo-fix",
|
|
43
|
-
"fix:return-types": "
|
|
39
|
+
"validate:imports": "node ./build/scripts/validate-imports.js",
|
|
40
|
+
"validate:naming": "node ./build/scripts/validate-naming.js",
|
|
41
|
+
"audit:eslintrc": "node ./build/scripts/eslintrc-audit.js",
|
|
42
|
+
"fix": "node ./build/scripts/dynamo-fix.js",
|
|
43
|
+
"fix:return-types": "node ./build/scripts/fix-return-types.js",
|
|
44
44
|
"prepare": "husky"
|
|
45
45
|
},
|
|
46
46
|
"exports": {
|
|
@@ -71,35 +71,34 @@
|
|
|
71
71
|
"dynamo"
|
|
72
72
|
],
|
|
73
73
|
"peerDependencies": {
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
"eslint
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
"prettier": "^3.3.0"
|
|
74
|
+
"angular-eslint": "~20.7.0",
|
|
75
|
+
"eslint": "~9.39.5",
|
|
76
|
+
"typescript": ">=5.8.2 <6.0.0",
|
|
77
|
+
"typescript-eslint": "~8.67.0"
|
|
78
|
+
},
|
|
79
|
+
"peerDependenciesMeta": {
|
|
80
|
+
"angular-eslint": {
|
|
81
|
+
"optional": true
|
|
82
|
+
}
|
|
84
83
|
},
|
|
85
84
|
"dependencies": {
|
|
86
|
-
"@futdevpro/fsm-dynamo": "1.
|
|
85
|
+
"@futdevpro/fsm-dynamo": "1.20.2",
|
|
87
86
|
"eslint-plugin-max-params-no-constructor": "0.0.4",
|
|
88
|
-
"eslint-plugin-unused-imports": "4.
|
|
89
|
-
"fast-glob": "3.3.
|
|
87
|
+
"eslint-plugin-unused-imports": "4.4.1",
|
|
88
|
+
"fast-glob": "3.3.3",
|
|
90
89
|
"tslib": "2.8.1"
|
|
91
90
|
},
|
|
92
91
|
"devDependencies": {
|
|
93
|
-
"@types/jasmine": "
|
|
94
|
-
"@types/node": "20.
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"eslint": "9.0.0",
|
|
92
|
+
"@types/jasmine": "5.1.15",
|
|
93
|
+
"@types/node": "22.20.1",
|
|
94
|
+
"angular-eslint": "20.7.0",
|
|
95
|
+
"eslint": "9.39.5",
|
|
98
96
|
"jasmine": "5.10.0",
|
|
99
97
|
"jasmine-spec-reporter": "7.0.0",
|
|
100
|
-
"rimraf": "
|
|
101
|
-
"ts-node": "~10.9.
|
|
102
|
-
"typescript": "5.
|
|
103
|
-
"
|
|
98
|
+
"rimraf": "6.1.3",
|
|
99
|
+
"ts-node": "~10.9.2",
|
|
100
|
+
"typescript": "5.9.3",
|
|
101
|
+
"typescript-eslint": "8.67.0",
|
|
102
|
+
"husky": "9.1.7"
|
|
104
103
|
}
|
|
105
104
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
{
|
|
2
|
-
"eslint.run": "onSave",
|
|
3
|
-
"eslint.workingDirectories": [{ "mode": "auto" }],
|
|
4
|
-
"editor.codeActionsOnSave": {
|
|
5
|
-
"source.fixAll.eslint": "explicit"
|
|
6
|
-
},
|
|
7
|
-
"eslint.validate": [
|
|
8
|
-
"javascript",
|
|
9
|
-
"typescript"
|
|
10
|
-
],
|
|
11
|
-
"editor.formatOnSave": false,
|
|
12
|
-
"prettier.requireConfig": true
|
|
13
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"eslint.run": "onSave",
|
|
3
|
+
"eslint.workingDirectories": [{ "mode": "auto" }],
|
|
4
|
+
"editor.codeActionsOnSave": {
|
|
5
|
+
"source.fixAll.eslint": "explicit"
|
|
6
|
+
},
|
|
7
|
+
"eslint.validate": [
|
|
8
|
+
"javascript",
|
|
9
|
+
"typescript"
|
|
10
|
+
],
|
|
11
|
+
"editor.formatOnSave": false,
|
|
12
|
+
"prettier.requireConfig": true
|
|
13
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
{
|
|
2
|
-
"root": true,
|
|
3
|
-
"extends": ["@futdevpro/dynamo-eslint/base"]
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
{
|
|
2
|
+
"root": true,
|
|
3
|
+
"extends": ["@futdevpro/dynamo-eslint/base"]
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
const baseConfig = require('@futdevpro/dynamo-eslint/base');
|
|
2
|
-
|
|
3
|
-
module.exports = baseConfig;
|
|
1
|
+
const baseConfig = require('@futdevpro/dynamo-eslint/base');
|
|
2
|
+
|
|
3
|
+
module.exports = baseConfig;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{
|
|
2
|
-
"root": true,
|
|
3
|
-
"extends": ["@futdevpro/dynamo-eslint/fsm"]
|
|
4
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"root": true,
|
|
3
|
+
"extends": ["@futdevpro/dynamo-eslint/fsm"]
|
|
4
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
const fsmConfig = require('@futdevpro/dynamo-eslint/fsm');
|
|
2
|
-
|
|
3
|
-
module.exports = fsmConfig;
|
|
1
|
+
const fsmConfig = require('@futdevpro/dynamo-eslint/fsm');
|
|
2
|
+
|
|
3
|
+
module.exports = fsmConfig;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
{
|
|
2
|
-
"root": true,
|
|
3
|
-
"extends": ["@futdevpro/dynamo-eslint/ngx"]
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
{
|
|
2
|
+
"root": true,
|
|
3
|
+
"extends": ["@futdevpro/dynamo-eslint/ngx"]
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
const ngxConfig = require('@futdevpro/dynamo-eslint/ngx');
|
|
2
|
-
|
|
3
|
-
module.exports = ngxConfig;
|
|
1
|
+
const ngxConfig = require('@futdevpro/dynamo-eslint/ngx');
|
|
2
|
+
|
|
3
|
+
module.exports = ngxConfig;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{
|
|
2
|
-
"root": true,
|
|
3
|
-
"extends": ["@futdevpro/dynamo-eslint/ngx-package"]
|
|
4
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"root": true,
|
|
3
|
+
"extends": ["@futdevpro/dynamo-eslint/ngx-package"]
|
|
4
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
const ngxPackageConfig = require('@futdevpro/dynamo-eslint/ngx-package');
|
|
2
|
-
|
|
3
|
-
module.exports = ngxPackageConfig;
|
|
1
|
+
const ngxPackageConfig = require('@futdevpro/dynamo-eslint/ngx-package');
|
|
2
|
+
|
|
3
|
+
module.exports = ngxPackageConfig;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
{
|
|
2
|
-
"root": true,
|
|
3
|
-
"extends": ["@futdevpro/dynamo-eslint/nts"]
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
{
|
|
2
|
+
"root": true,
|
|
3
|
+
"extends": ["@futdevpro/dynamo-eslint/nts"]
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
const ntsConfig = require('@futdevpro/dynamo-eslint/nts');
|
|
2
|
-
|
|
3
|
-
module.exports = ntsConfig;
|
|
1
|
+
const ntsConfig = require('@futdevpro/dynamo-eslint/nts');
|
|
2
|
+
|
|
3
|
+
module.exports = ntsConfig;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{
|
|
2
|
-
"root": true,
|
|
3
|
-
"extends": ["@futdevpro/dynamo-eslint/nts-package"]
|
|
4
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"root": true,
|
|
3
|
+
"extends": ["@futdevpro/dynamo-eslint/nts-package"]
|
|
4
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
const ntsPackageConfig = require('@futdevpro/dynamo-eslint/nts-package');
|
|
2
|
-
|
|
3
|
-
module.exports = ntsPackageConfig;
|
|
1
|
+
const ntsPackageConfig = require('@futdevpro/dynamo-eslint/nts-package');
|
|
2
|
+
|
|
3
|
+
module.exports = ntsPackageConfig;
|
|
@@ -1,26 +1,22 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "example-project",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"scripts": {
|
|
5
|
-
"lint": "eslint src --ext .ts",
|
|
6
|
-
"lint:fix": "eslint src --ext .ts --fix",
|
|
7
|
-
"lint:fix-all": "eslint src --ext .ts --fix && dynamo-fix-return-types",
|
|
8
|
-
"validate:imports": "dynamo-validate-imports",
|
|
9
|
-
"validate:naming": "dynamo-validate-naming",
|
|
10
|
-
"audit:eslintrc": "dynamo-eslintrc-audit",
|
|
11
|
-
"fix": "dynamo-fix",
|
|
12
|
-
"fix:return-types": "dynamo-fix-return-types",
|
|
13
|
-
"test": "npm run lint && npm run validate:imports && npm run validate:naming"
|
|
14
|
-
},
|
|
15
|
-
"devDependencies": {
|
|
16
|
-
"@futdevpro/dynamo-eslint": "1.
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"eslint
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"prettier": "^3.3.0",
|
|
24
|
-
"typescript": "^5.5.4"
|
|
25
|
-
}
|
|
26
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "example-project",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"scripts": {
|
|
5
|
+
"lint": "eslint src --ext .ts",
|
|
6
|
+
"lint:fix": "eslint src --ext .ts --fix",
|
|
7
|
+
"lint:fix-all": "eslint src --ext .ts --fix && dynamo-fix-return-types",
|
|
8
|
+
"validate:imports": "dynamo-validate-imports",
|
|
9
|
+
"validate:naming": "dynamo-validate-naming",
|
|
10
|
+
"audit:eslintrc": "dynamo-eslintrc-audit",
|
|
11
|
+
"fix": "dynamo-fix",
|
|
12
|
+
"fix:return-types": "dynamo-fix-return-types",
|
|
13
|
+
"test": "npm run lint && npm run validate:imports && npm run validate:naming"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@futdevpro/dynamo-eslint": "1.20.2",
|
|
17
|
+
"angular-eslint": "~20.7.0",
|
|
18
|
+
"eslint": "~9.39.5",
|
|
19
|
+
"typescript": "5.9.3",
|
|
20
|
+
"typescript-eslint": "~8.67.0"
|
|
21
|
+
}
|
|
22
|
+
}
|
package/samples/poc-sample.ts
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
// POC Sample demonstrating Dynamo ESLint import ordering rules
|
|
2
|
-
// This file shows the correct import ordering according to the new rules
|
|
3
|
-
|
|
4
|
-
// Group 1: Non-FutDevPro packages
|
|
5
|
-
import { Component, OnInit } from '@angular/core';
|
|
6
|
-
import { Router } from '@angular/router';
|
|
7
|
-
import { HttpClient } from '@angular/common/http';
|
|
8
|
-
|
|
9
|
-
// Group 2: FutDevPro packages
|
|
10
|
-
import { DyFM_Error, DyFM_Log } from '@futdevpro/fsm-dynamo';
|
|
11
|
-
import { FDP_User, FDP_Account } from '@futdevpro/fdp-templates';
|
|
12
|
-
|
|
13
|
-
// Group 3: Scripts from other modules (3+ levels without underscore, or 3+ levels with underscore)
|
|
14
|
-
import { SomeService } from '../../../services/some.service';
|
|
15
|
-
import { AnotherService } from '../../../../models/another.interface';
|
|
16
|
-
|
|
17
|
-
// Group 4: Scripts from same module (up to 2 levels, or up to 3 levels with underscore)
|
|
18
|
-
import { LocalComponent } from './local.component';
|
|
19
|
-
import { LocalService } from '../_services/local.service';
|
|
20
|
-
import { LocalInterface } from '../../../_models/local.interface';
|
|
21
|
-
|
|
22
|
-
export class PocSampleComponent implements OnInit {
|
|
23
|
-
constructor(
|
|
24
|
-
private router: Router,
|
|
25
|
-
private http: HttpClient,
|
|
26
|
-
private localService: LocalService
|
|
27
|
-
) {}
|
|
28
|
-
|
|
29
|
-
ngOnInit(): void {
|
|
30
|
-
// Example usage
|
|
31
|
-
DyFM_Log.info('Component initialized');
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// This would be flagged as errors:
|
|
35
|
-
// import { Something } from '../../../NPM-packages/some-package'; // ❌ Forbidden NPM-packages
|
|
36
|
-
// import { Something } from './some-file.js'; // ❌ Forbidden .js extension
|
|
37
|
-
// import type { SomeType } from './some-file'; // ❌ Forbidden import type
|
|
38
|
-
}
|
|
1
|
+
// POC Sample demonstrating Dynamo ESLint import ordering rules
|
|
2
|
+
// This file shows the correct import ordering according to the new rules
|
|
3
|
+
|
|
4
|
+
// Group 1: Non-FutDevPro packages
|
|
5
|
+
import { Component, OnInit } from '@angular/core';
|
|
6
|
+
import { Router } from '@angular/router';
|
|
7
|
+
import { HttpClient } from '@angular/common/http';
|
|
8
|
+
|
|
9
|
+
// Group 2: FutDevPro packages
|
|
10
|
+
import { DyFM_Error, DyFM_Log } from '@futdevpro/fsm-dynamo';
|
|
11
|
+
import { FDP_User, FDP_Account } from '@futdevpro/fdp-templates';
|
|
12
|
+
|
|
13
|
+
// Group 3: Scripts from other modules (3+ levels without underscore, or 3+ levels with underscore)
|
|
14
|
+
import { SomeService } from '../../../services/some.service';
|
|
15
|
+
import { AnotherService } from '../../../../models/another.interface';
|
|
16
|
+
|
|
17
|
+
// Group 4: Scripts from same module (up to 2 levels, or up to 3 levels with underscore)
|
|
18
|
+
import { LocalComponent } from './local.component';
|
|
19
|
+
import { LocalService } from '../_services/local.service';
|
|
20
|
+
import { LocalInterface } from '../../../_models/local.interface';
|
|
21
|
+
|
|
22
|
+
export class PocSampleComponent implements OnInit {
|
|
23
|
+
constructor(
|
|
24
|
+
private router: Router,
|
|
25
|
+
private http: HttpClient,
|
|
26
|
+
private localService: LocalService
|
|
27
|
+
) {}
|
|
28
|
+
|
|
29
|
+
ngOnInit(): void {
|
|
30
|
+
// Example usage
|
|
31
|
+
DyFM_Log.info('Component initialized');
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// This would be flagged as errors:
|
|
35
|
+
// import { Something } from '../../../NPM-packages/some-package'; // ❌ Forbidden NPM-packages
|
|
36
|
+
// import { Something } from './some-file.js'; // ❌ Forbidden .js extension
|
|
37
|
+
// import type { SomeType } from './some-file'; // ❌ Forbidden import type
|
|
38
|
+
}
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
// POC Sample demonstrating Dynamo ESLint import ordering violations
|
|
2
|
-
// This file shows various violations that should be caught by the linter
|
|
3
|
-
|
|
4
|
-
// ❌ VIOLATIONS: This file contains multiple import ordering violations
|
|
5
|
-
|
|
6
|
-
// Wrong order: FutDevPro packages before non-FutDevPro packages
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
import { DyFM_Error } from '@futdevpro/fsm-dynamo';
|
|
18
|
-
import { Component } from '@angular/core';
|
|
19
|
-
|
|
20
|
-
// Missing empty line between groups
|
|
21
|
-
import { Router } from '@angular/router';
|
|
22
|
-
import { FDP_User } from '@futdevpro/fdp-templates';
|
|
23
|
-
|
|
24
|
-
// Wrong order: same module before other modules
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
import { LocalService } from './local.service';
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
import { SomeService } from '../../../services/some.service';
|
|
46
|
-
|
|
47
|
-
// ❌ Forbidden patterns:
|
|
48
|
-
import { Something } from '@futdevpro/some-package'; // Forbidden NPM-packages import
|
|
49
|
-
import { AnotherThing } from './some-file'; // Forbidden .js extension
|
|
50
|
-
import { SomeType } from './some-file'; // Forbidden import type
|
|
51
|
-
|
|
52
|
-
export class PocViolationsComponent {
|
|
53
|
-
// This class demonstrates various import violations
|
|
54
|
-
}
|
|
1
|
+
// POC Sample demonstrating Dynamo ESLint import ordering violations
|
|
2
|
+
// This file shows various violations that should be caught by the linter
|
|
3
|
+
|
|
4
|
+
// ❌ VIOLATIONS: This file contains multiple import ordering violations
|
|
5
|
+
|
|
6
|
+
// Wrong order: FutDevPro packages before non-FutDevPro packages
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
import { DyFM_Error } from '@futdevpro/fsm-dynamo';
|
|
18
|
+
import { Component } from '@angular/core';
|
|
19
|
+
|
|
20
|
+
// Missing empty line between groups
|
|
21
|
+
import { Router } from '@angular/router';
|
|
22
|
+
import { FDP_User } from '@futdevpro/fdp-templates';
|
|
23
|
+
|
|
24
|
+
// Wrong order: same module before other modules
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
import { LocalService } from './local.service';
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
import { SomeService } from '../../../services/some.service';
|
|
46
|
+
|
|
47
|
+
// ❌ Forbidden patterns:
|
|
48
|
+
import { Something } from '@futdevpro/some-package'; // Forbidden NPM-packages import
|
|
49
|
+
import { AnotherThing } from './some-file'; // Forbidden .js extension
|
|
50
|
+
import { SomeType } from './some-file'; // Forbidden import type
|
|
51
|
+
|
|
52
|
+
export class PocViolationsComponent {
|
|
53
|
+
// This class demonstrates various import violations
|
|
54
|
+
}
|