@futdevpro/dynamo-eslint 1.12.1 → 1.14.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/.github/workflows/main.yml +1 -2
- package/README.md +286 -17
- package/build/configs/base.d.ts +9 -80
- package/build/configs/base.d.ts.map +1 -1
- package/build/configs/base.js +89 -49
- package/build/configs/base.js.map +1 -1
- package/build/configs/fsm.d.ts +1 -81
- package/build/configs/fsm.d.ts.map +1 -1
- package/build/configs/fsm.js +7 -6
- package/build/configs/fsm.js.map +1 -1
- package/build/configs/ngx-package.d.ts +1 -80
- package/build/configs/ngx-package.d.ts.map +1 -1
- package/build/configs/ngx-package.js +7 -6
- package/build/configs/ngx-package.js.map +1 -1
- package/build/configs/ngx.d.ts +4 -80
- package/build/configs/ngx.d.ts.map +1 -1
- package/build/configs/ngx.js +71 -11
- package/build/configs/ngx.js.map +1 -1
- package/build/configs/nts-package.d.ts +1 -82
- package/build/configs/nts-package.d.ts.map +1 -1
- package/build/configs/nts-package.js +16 -10
- package/build/configs/nts-package.js.map +1 -1
- package/build/configs/nts.d.ts +1 -81
- package/build/configs/nts.d.ts.map +1 -1
- package/build/configs/nts.js +30 -11
- package/build/configs/nts.js.map +1 -1
- package/build/plugin/index.d.ts +4 -0
- package/build/plugin/index.d.ts.map +1 -1
- package/build/plugin/index.js +7 -1
- package/build/plugin/index.js.map +1 -1
- package/build/plugin/rules/import/import-order.d.ts +4 -0
- package/build/plugin/rules/import/import-order.d.ts.map +1 -0
- package/build/plugin/rules/{import-order.js → import/import-order.js} +16 -17
- package/build/plugin/rules/import/import-order.js.map +1 -0
- package/build/plugin/rules/import/import-order.spec.d.ts.map +1 -0
- package/build/plugin/rules/{import-order.spec.js → import/import-order.spec.js} +40 -40
- package/build/plugin/rules/import/import-order.spec.js.map +1 -0
- package/build/plugin/rules/import/no-import-type.d.ts +4 -0
- package/build/plugin/rules/import/no-import-type.d.ts.map +1 -0
- package/build/plugin/rules/import/no-import-type.js +35 -0
- package/build/plugin/rules/import/no-import-type.js.map +1 -0
- package/build/plugin/rules/import/no-import-type.spec.d.ts +2 -0
- package/build/plugin/rules/import/no-import-type.spec.d.ts.map +1 -0
- package/build/plugin/rules/import/no-import-type.spec.js +60 -0
- package/build/plugin/rules/import/no-import-type.spec.js.map +1 -0
- package/build/plugin/rules/import/no-js-import.d.ts +4 -0
- package/build/plugin/rules/import/no-js-import.d.ts.map +1 -0
- package/build/plugin/rules/import/no-js-import.js +33 -0
- package/build/plugin/rules/import/no-js-import.js.map +1 -0
- package/build/plugin/rules/import/no-js-import.spec.d.ts +2 -0
- package/build/plugin/rules/import/no-js-import.spec.d.ts.map +1 -0
- package/build/plugin/rules/import/no-js-import.spec.js +68 -0
- package/build/plugin/rules/import/no-js-import.spec.js.map +1 -0
- package/build/plugin/rules/naming-patterns.d.ts +1 -1
- package/build/plugin/rules/naming-patterns.d.ts.map +1 -1
- package/build/plugin/rules/naming-patterns.spec.js +1 -1
- package/build/plugin/rules/naming-patterns.spec.js.map +1 -1
- package/build/scripts/dynamo-fix.d.ts +3 -0
- package/build/scripts/dynamo-fix.d.ts.map +1 -0
- package/build/scripts/dynamo-fix.js +92 -0
- package/build/scripts/dynamo-fix.js.map +1 -0
- package/build/scripts/eslintrc-audit.js.map +1 -1
- package/build/scripts/fix-return-types.d.ts +3 -0
- package/build/scripts/fix-return-types.d.ts.map +1 -0
- package/build/scripts/fix-return-types.js +109 -0
- package/build/scripts/fix-return-types.js.map +1 -0
- package/build/scripts/validate-imports.js +10 -9
- package/build/scripts/validate-imports.js.map +1 -1
- package/build/scripts/validate-naming.js +11 -26
- package/build/scripts/validate-naming.js.map +1 -1
- package/build-test/plugin/rules/import-order.d.ts +1 -1
- package/build-test/plugin/rules/naming-patterns.d.ts +1 -1
- package/eslint.config.js +55 -0
- package/futdevpro-dynamo-eslint-01.14.3.tgz +0 -0
- package/package.json +27 -18
- package/samples/.vscode/settings.json +13 -0
- package/samples/base/eslint.config.js +3 -0
- package/samples/fsm/.eslintrc.json +4 -0
- package/samples/fsm/eslint.config.js +3 -0
- package/samples/ngx/eslint.config.js +3 -0
- package/samples/ngx-package/.eslintrc.json +4 -0
- package/samples/ngx-package/eslint.config.js +3 -0
- package/samples/nts/eslint.config.js +3 -0
- package/samples/nts-package/.eslintrc.json +4 -0
- package/samples/nts-package/eslint.config.js +3 -0
- package/samples/package.json.example +26 -0
- package/samples/poc-violations.ts +32 -3
- package/src/configs/base.ts +93 -48
- package/src/configs/fsm.ts +8 -7
- package/src/configs/ngx-package.ts +8 -7
- package/src/configs/ngx.ts +71 -11
- package/src/configs/nts-package.ts +16 -10
- package/src/configs/nts.ts +30 -11
- package/src/plugin/index.ts +9 -1
- package/src/plugin/rules/{import-order.spec.ts → import/import-order.spec.ts} +46 -40
- package/src/plugin/rules/{import-order.ts → import/import-order.ts} +20 -18
- package/src/plugin/rules/import/no-import-type.spec.ts +69 -0
- package/src/plugin/rules/import/no-import-type.ts +37 -0
- package/src/plugin/rules/import/no-js-import.spec.ts +82 -0
- package/src/plugin/rules/import/no-js-import.ts +35 -0
- package/src/plugin/rules/naming-patterns.spec.ts +3 -1
- package/src/plugin/rules/naming-patterns.ts +1 -1
- package/src/scripts/dynamo-fix.ts +108 -0
- package/src/scripts/eslintrc-audit.ts +6 -2
- package/src/scripts/fix-return-types.ts +148 -0
- package/src/scripts/validate-imports.ts +95 -13
- package/src/scripts/validate-naming.ts +16 -28
- package/.eslintrc.json +0 -16
- package/INTEGRATION.md +0 -74
- package/POC-README.md +0 -147
- package/build/plugin/rules/import-order.d.ts +0 -4
- package/build/plugin/rules/import-order.d.ts.map +0 -1
- package/build/plugin/rules/import-order.js.map +0 -1
- package/build/plugin/rules/import-order.spec.d.ts.map +0 -1
- package/build/plugin/rules/import-order.spec.js.map +0 -1
- package/futdevpro-dynamo-eslint-01.12.01.tgz +0 -0
- /package/build/plugin/rules/{import-order.spec.d.ts → import/import-order.spec.d.ts} +0 -0
|
@@ -1,8 +1,88 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
import { DyFM_Log } from '@futdevpro/fsm-dynamo';
|
|
2
84
|
import fg from 'fast-glob';
|
|
3
|
-
import { readFileSync } from 'fs';
|
|
4
85
|
import { ESLint } from 'eslint';
|
|
5
|
-
import path from 'path';
|
|
6
86
|
|
|
7
87
|
interface ImportValidationResult {
|
|
8
88
|
file: string;
|
|
@@ -35,7 +115,7 @@ async function validateImportsInFile(filePath: string): Promise<ImportValidation
|
|
|
35
115
|
} as any,
|
|
36
116
|
});
|
|
37
117
|
|
|
38
|
-
const results = await eslint.lintFiles([filePath]);
|
|
118
|
+
const results = await eslint.lintFiles([ filePath ]);
|
|
39
119
|
const result = results[0];
|
|
40
120
|
|
|
41
121
|
return {
|
|
@@ -50,11 +130,11 @@ async function validateImportsInFile(filePath: string): Promise<ImportValidation
|
|
|
50
130
|
}
|
|
51
131
|
|
|
52
132
|
async function main() {
|
|
53
|
-
const files = await fg(['**/*.{ts,tsx}'], {
|
|
54
|
-
ignore: ['**/node_modules/**', '**/build/**', '**/dist/**', '**/*.spec.ts', '**/*.test.ts']
|
|
133
|
+
const files = await fg([ '**/*.{ts,tsx}' ], {
|
|
134
|
+
ignore: [ '**/node_modules/**', '**/build/**', '**/dist/**', '**/*.spec.ts', '**/*.test.ts' ],
|
|
55
135
|
});
|
|
56
136
|
|
|
57
|
-
|
|
137
|
+
DyFM_Log.log(`[dynamo-validate-imports] Scanning ${files.length} files...`);
|
|
58
138
|
|
|
59
139
|
const results: ImportValidationResult[] = [];
|
|
60
140
|
let totalErrors = 0;
|
|
@@ -62,10 +142,11 @@ async function main() {
|
|
|
62
142
|
for (const file of files) {
|
|
63
143
|
try {
|
|
64
144
|
const result = await validateImportsInFile(file);
|
|
145
|
+
|
|
65
146
|
results.push(result);
|
|
66
147
|
totalErrors += result.errors.length;
|
|
67
148
|
} catch (error) {
|
|
68
|
-
|
|
149
|
+
DyFM_Log.error(`Error processing ${file}:`, error);
|
|
69
150
|
}
|
|
70
151
|
}
|
|
71
152
|
|
|
@@ -73,25 +154,26 @@ async function main() {
|
|
|
73
154
|
const filesWithErrors = results.filter(r => r.errors.length > 0);
|
|
74
155
|
|
|
75
156
|
if (filesWithErrors.length === 0) {
|
|
76
|
-
|
|
157
|
+
DyFM_Log.log('✅ All import validations passed!');
|
|
158
|
+
|
|
77
159
|
return;
|
|
78
160
|
}
|
|
79
161
|
|
|
80
|
-
|
|
162
|
+
DyFM_Log.warn(`\n❌ Found ${totalErrors} import validation errors in ${filesWithErrors.length} files:\n`);
|
|
81
163
|
|
|
82
164
|
filesWithErrors.forEach(result => {
|
|
83
|
-
|
|
165
|
+
DyFM_Log.log(`📁 ${result.file}:`);
|
|
84
166
|
result.errors.forEach(error => {
|
|
85
|
-
|
|
167
|
+
DyFM_Log.log(` ${error.line}:${error.column} - ${error.message}`);
|
|
86
168
|
});
|
|
87
|
-
|
|
169
|
+
DyFM_Log.log('');
|
|
88
170
|
});
|
|
89
171
|
|
|
90
172
|
process.exit(1);
|
|
91
173
|
}
|
|
92
174
|
|
|
93
175
|
main().catch((err) => {
|
|
94
|
-
|
|
176
|
+
DyFM_Log.error('Validation failed:', err);
|
|
95
177
|
process.exit(1);
|
|
96
178
|
});
|
|
97
179
|
|
|
@@ -3,6 +3,8 @@ import fg from 'fast-glob';
|
|
|
3
3
|
import { readFileSync } from 'fs';
|
|
4
4
|
import { ESLint } from 'eslint';
|
|
5
5
|
|
|
6
|
+
import { DyFM_Log } from '@futdevpro/fsm-dynamo';
|
|
7
|
+
|
|
6
8
|
interface NamingValidationResult {
|
|
7
9
|
file: string;
|
|
8
10
|
errors: Array<{
|
|
@@ -15,26 +17,10 @@ interface NamingValidationResult {
|
|
|
15
17
|
|
|
16
18
|
async function validateNamingInFile(filePath: string): Promise<NamingValidationResult> {
|
|
17
19
|
const eslint = new ESLint({
|
|
18
|
-
baseConfig:
|
|
19
|
-
parser: '@typescript-eslint/parser',
|
|
20
|
-
parserOptions: {
|
|
21
|
-
ecmaVersion: 2020,
|
|
22
|
-
sourceType: 'module',
|
|
23
|
-
},
|
|
24
|
-
rules: {
|
|
25
|
-
'@futdevpro/dynamo/naming-patterns': 'error',
|
|
26
|
-
},
|
|
27
|
-
plugins: {
|
|
28
|
-
'@futdevpro/dynamo': {
|
|
29
|
-
rules: {
|
|
30
|
-
'naming-patterns': require('../plugin/rules/naming-patterns').default,
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
} as any,
|
|
20
|
+
baseConfig: require('../eslint.config.js')[1], // Use the main config object from flat config array
|
|
35
21
|
});
|
|
36
22
|
|
|
37
|
-
const results = await eslint.lintFiles([filePath]);
|
|
23
|
+
const results = await eslint.lintFiles([ filePath ]);
|
|
38
24
|
const result = results[0];
|
|
39
25
|
|
|
40
26
|
return {
|
|
@@ -49,11 +35,11 @@ async function validateNamingInFile(filePath: string): Promise<NamingValidationR
|
|
|
49
35
|
}
|
|
50
36
|
|
|
51
37
|
async function main() {
|
|
52
|
-
const files = await fg(['**/*.{ts,tsx}'], {
|
|
53
|
-
ignore: ['**/node_modules/**', '**/build/**', '**/dist/**', '**/*.spec.ts', '**/*.test.ts']
|
|
38
|
+
const files = await fg([ '**/*.{ts,tsx}' ], {
|
|
39
|
+
ignore: [ '**/node_modules/**', '**/build/**', '**/dist/**', '**/*.spec.ts', '**/*.test.ts' ],
|
|
54
40
|
});
|
|
55
41
|
|
|
56
|
-
|
|
42
|
+
DyFM_Log.log(`[dynamo-validate-naming] Scanning ${files.length} files...`);
|
|
57
43
|
|
|
58
44
|
const results: NamingValidationResult[] = [];
|
|
59
45
|
let totalErrors = 0;
|
|
@@ -61,10 +47,11 @@ async function main() {
|
|
|
61
47
|
for (const file of files) {
|
|
62
48
|
try {
|
|
63
49
|
const result = await validateNamingInFile(file);
|
|
50
|
+
|
|
64
51
|
results.push(result);
|
|
65
52
|
totalErrors += result.errors.length;
|
|
66
53
|
} catch (error) {
|
|
67
|
-
|
|
54
|
+
DyFM_Log.error(`Error processing ${file}:`, error);
|
|
68
55
|
}
|
|
69
56
|
}
|
|
70
57
|
|
|
@@ -72,25 +59,26 @@ async function main() {
|
|
|
72
59
|
const filesWithErrors = results.filter(r => r.errors.length > 0);
|
|
73
60
|
|
|
74
61
|
if (filesWithErrors.length === 0) {
|
|
75
|
-
|
|
62
|
+
DyFM_Log.log('✅ All naming validations passed!');
|
|
63
|
+
|
|
76
64
|
return;
|
|
77
65
|
}
|
|
78
66
|
|
|
79
|
-
|
|
67
|
+
DyFM_Log.warn(`\n❌ Found ${totalErrors} naming validation errors in ${filesWithErrors.length} files:\n`);
|
|
80
68
|
|
|
81
69
|
filesWithErrors.forEach(result => {
|
|
82
|
-
|
|
70
|
+
DyFM_Log.log(`📁 ${result.file}:`);
|
|
83
71
|
result.errors.forEach(error => {
|
|
84
|
-
|
|
72
|
+
DyFM_Log.log(` ${error.line}:${error.column} - ${error.message}`);
|
|
85
73
|
});
|
|
86
|
-
|
|
74
|
+
DyFM_Log.log('');
|
|
87
75
|
});
|
|
88
76
|
|
|
89
77
|
process.exit(1);
|
|
90
78
|
}
|
|
91
79
|
|
|
92
80
|
main().catch((err) => {
|
|
93
|
-
|
|
81
|
+
DyFM_Log.error('Validation failed:', err);
|
|
94
82
|
process.exit(1);
|
|
95
83
|
});
|
|
96
84
|
|
package/.eslintrc.json
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"root": true,
|
|
3
|
-
"env": { "node": true, "es2021": true },
|
|
4
|
-
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
|
|
5
|
-
"parser": "@typescript-eslint/parser",
|
|
6
|
-
"parserOptions": { "ecmaVersion": "latest", "sourceType": "module" },
|
|
7
|
-
"plugins": ["@typescript-eslint"],
|
|
8
|
-
"ignorePatterns": ["build/**"],
|
|
9
|
-
"rules": {
|
|
10
|
-
"indent": ["warn", 2, { "SwitchCase": 1 }],
|
|
11
|
-
"quotes": ["warn", "single", { "allowTemplateLiterals": true }],
|
|
12
|
-
"semi": ["warn", "always"]
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
package/INTEGRATION.md
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
# Integration Guide
|
|
2
|
-
|
|
3
|
-
Use these steps in each repo to adopt `@futdevpro/dynamo-eslint` with on-save current-file linting.
|
|
4
|
-
|
|
5
|
-
## 1) Install
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
pnpm add -D @futdevpro/dynamo-eslint eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin
|
|
9
|
-
# For Angular projects also install:
|
|
10
|
-
pnpm add -D @angular-eslint/eslint-plugin @angular-eslint/eslint-plugin-template @angular-eslint/template-parser
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
Optional (enables deeper custom checks):
|
|
14
|
-
```bash
|
|
15
|
-
pnpm add -D @futdevpro/fsm-dynamo
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## 2) .eslintrc.json
|
|
19
|
-
|
|
20
|
-
Pick one preset per project type and keep project-specific overrides.
|
|
21
|
-
|
|
22
|
-
Node TS (service/lib):
|
|
23
|
-
```json
|
|
24
|
-
{
|
|
25
|
-
"root": true,
|
|
26
|
-
"extends": ["@futdevpro/dynamo-eslint/nts"]
|
|
27
|
-
}
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
Angular app/lib:
|
|
31
|
-
```json
|
|
32
|
-
{
|
|
33
|
-
"root": true,
|
|
34
|
-
"extends": ["@futdevpro/dynamo-eslint/ngx"]
|
|
35
|
-
}
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
Package flavors:
|
|
39
|
-
- `@futdevpro/dynamo-eslint/fsm`
|
|
40
|
-
- `@futdevpro/dynamo-eslint/nts-package`
|
|
41
|
-
- `@futdevpro/dynamo-eslint/ngx-package`
|
|
42
|
-
|
|
43
|
-
## 3) VSCode settings (current file only)
|
|
44
|
-
|
|
45
|
-
Create or update `.vscode/settings.json`:
|
|
46
|
-
```json
|
|
47
|
-
{
|
|
48
|
-
"eslint.run": "onSave",
|
|
49
|
-
"eslint.workingDirectories": [{ "mode": "auto" }],
|
|
50
|
-
"editor.codeActionsOnSave": { "source.fixAll.eslint": true }
|
|
51
|
-
}
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
## 4) NPM scripts
|
|
55
|
-
|
|
56
|
-
```json
|
|
57
|
-
{
|
|
58
|
-
"scripts": {
|
|
59
|
-
"lint": "eslint .",
|
|
60
|
-
"lint:fix": "eslint . --fix",
|
|
61
|
-
"validate:imports": "dynamo-validate-imports",
|
|
62
|
-
"validate:naming": "dynamo-validate-naming"
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
## 5) CI
|
|
68
|
-
- Ensure your repo CI runs `npm run lint`.
|
|
69
|
-
- Heavy lint runs should be CLI-based (not editor) for performance when many repos are open.
|
|
70
|
-
|
|
71
|
-
## Notes
|
|
72
|
-
- Presets derive from existing org configs; adjust local overrides sparingly.
|
|
73
|
-
- Custom validators are no-ops unless `@futdevpro/fsm-dynamo` is installed.
|
|
74
|
-
|
package/POC-README.md
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
# Dynamo ESLint POC - Import Ordering Rules
|
|
2
|
-
|
|
3
|
-
This POC demonstrates the implementation of comprehensive import ordering rules for the `@futdevpro/dynamo-eslint` package.
|
|
4
|
-
|
|
5
|
-
## 🎯 Features Implemented
|
|
6
|
-
|
|
7
|
-
### Import Grouping Rules
|
|
8
|
-
The linter enforces a specific import order with empty lines between groups:
|
|
9
|
-
|
|
10
|
-
1. **Non-FutDevPro packages** (e.g., `@angular/core`, `rxjs`)
|
|
11
|
-
2. **FutDevPro packages** (e.g., `@futdevpro/fsm-dynamo`, `@futdevpro/fdp-templates`)
|
|
12
|
-
3. **Scripts from other modules** (3+ levels without underscore, or 3+ levels with underscore)
|
|
13
|
-
4. **Scripts from same module** (up to 2 levels, or up to 3 levels with underscore)
|
|
14
|
-
|
|
15
|
-
### Forbidden Import Patterns
|
|
16
|
-
- ❌ **NPM-packages imports**: `import { Something } from '../../../NPM-packages/some-package'`
|
|
17
|
-
- ❌ **JavaScript extensions**: `import { Something } from './some-file.js'`
|
|
18
|
-
- ❌ **Import type usage**: `import type { SomeType } from './some-file'`
|
|
19
|
-
|
|
20
|
-
### Validation Features
|
|
21
|
-
- ✅ **Empty line enforcement**: Groups must be separated by empty lines
|
|
22
|
-
- ✅ **Order validation**: Imports must be in the correct group order
|
|
23
|
-
- ✅ **Same module detection**: Smart detection based on path depth and underscore patterns
|
|
24
|
-
|
|
25
|
-
## 📁 File Structure
|
|
26
|
-
|
|
27
|
-
```
|
|
28
|
-
src/
|
|
29
|
-
├── plugin/
|
|
30
|
-
│ ├── rules/
|
|
31
|
-
│ │ ├── import-order.ts # Main import ordering rule
|
|
32
|
-
│ │ ├── import-order.spec.ts # Comprehensive test suite
|
|
33
|
-
│ │ ├── naming-patterns.ts # Naming patterns rule (placeholder)
|
|
34
|
-
│ │ └── naming-patterns.spec.ts # Naming patterns tests
|
|
35
|
-
│ └── index.ts # Plugin exports
|
|
36
|
-
├── scripts/
|
|
37
|
-
│ ├── validate-imports.ts # CLI script for import validation
|
|
38
|
-
│ ├── validate-naming.ts # CLI script for naming validation
|
|
39
|
-
│ └── eslintrc-audit.ts # ESLint config audit script
|
|
40
|
-
└── configs/ # ESLint configuration presets
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## 🧪 Testing
|
|
44
|
-
|
|
45
|
-
### Sample Files
|
|
46
|
-
- `samples/poc-sample.ts` - Demonstrates correct import ordering
|
|
47
|
-
- `samples/poc-violations.ts` - Shows various violations for testing
|
|
48
|
-
|
|
49
|
-
### Test Results
|
|
50
|
-
The POC successfully detects and reports:
|
|
51
|
-
- ✅ Forbidden NPM-packages imports
|
|
52
|
-
- ✅ Forbidden .js extension imports
|
|
53
|
-
- ✅ Forbidden import type usage
|
|
54
|
-
- ✅ Misordered import groups
|
|
55
|
-
- ✅ Missing empty lines between groups
|
|
56
|
-
|
|
57
|
-
## 🚀 Usage
|
|
58
|
-
|
|
59
|
-
### As ESLint Rule
|
|
60
|
-
```json
|
|
61
|
-
{
|
|
62
|
-
"plugins": ["@futdevpro/dynamo"],
|
|
63
|
-
"rules": {
|
|
64
|
-
"@futdevpro/dynamo/import-order": "error"
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
### CLI Validation
|
|
70
|
-
```bash
|
|
71
|
-
# Validate imports
|
|
72
|
-
npx dynamo-validate-imports
|
|
73
|
-
|
|
74
|
-
# Validate naming
|
|
75
|
-
npx dynamo-validate-naming
|
|
76
|
-
|
|
77
|
-
# Audit ESLint configs
|
|
78
|
-
npx dynamo-eslintrc-audit
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
## 📋 Example Output
|
|
82
|
-
|
|
83
|
-
```
|
|
84
|
-
❌ Violation: forbiddenNpmPackages
|
|
85
|
-
Line: 3
|
|
86
|
-
Message: Import from "*/../NPM-packages/*" is forbidden. Use "@futdevpro/*" instead.
|
|
87
|
-
|
|
88
|
-
❌ Violation: forbiddenJsExtension
|
|
89
|
-
Line: 4
|
|
90
|
-
Message: Import with ".js" extension is forbidden. Use ".ts" or no extension.
|
|
91
|
-
|
|
92
|
-
❌ Violation: forbiddenImportType
|
|
93
|
-
Line: 5
|
|
94
|
-
Message: Use of "import type" is forbidden.
|
|
95
|
-
|
|
96
|
-
❌ Violation: misordered
|
|
97
|
-
Line: 2
|
|
98
|
-
Message: Import statements should be grouped and ordered by convention.
|
|
99
|
-
|
|
100
|
-
❌ Violation: missingEmptyLine
|
|
101
|
-
Line: 1
|
|
102
|
-
Message: Missing empty line between import groups.
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
## 🔧 Implementation Details
|
|
106
|
-
|
|
107
|
-
### Import Group Detection Logic
|
|
108
|
-
```typescript
|
|
109
|
-
function getImportGroup(importNode: any): ImportGroup['type'] {
|
|
110
|
-
const source = importNode.source.value as string;
|
|
111
|
-
|
|
112
|
-
// Check for forbidden patterns first
|
|
113
|
-
if (source.includes('/NPM-packages/')) return 'non-futdevpro';
|
|
114
|
-
if (source.endsWith('.js')) return 'non-futdevpro';
|
|
115
|
-
|
|
116
|
-
// FutDevPro packages
|
|
117
|
-
if (source.startsWith('@futdevpro/')) return 'futdevpro';
|
|
118
|
-
|
|
119
|
-
// Same module detection
|
|
120
|
-
if (source.startsWith('./') || source.startsWith('../')) {
|
|
121
|
-
const pathParts = source.split('/');
|
|
122
|
-
const upLevels = pathParts.filter(part => part === '..').length;
|
|
123
|
-
|
|
124
|
-
// Same module: up to 3 ".." and starts with "_", or less than 2 ".."
|
|
125
|
-
if (upLevels <= 2 || (upLevels <= 3 && pathParts.some(part => part.startsWith('_')))) {
|
|
126
|
-
return 'same-module';
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
return 'other-modules';
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
return 'non-futdevpro';
|
|
133
|
-
}
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
## ✅ POC Status
|
|
137
|
-
|
|
138
|
-
- [x] Import grouping logic implemented
|
|
139
|
-
- [x] Forbidden pattern detection
|
|
140
|
-
- [x] Empty line validation
|
|
141
|
-
- [x] Order validation
|
|
142
|
-
- [x] Comprehensive test suite
|
|
143
|
-
- [x] CLI validation scripts
|
|
144
|
-
- [x] Sample files for demonstration
|
|
145
|
-
- [x] Documentation and examples
|
|
146
|
-
|
|
147
|
-
The POC successfully demonstrates all requested import ordering rules and is ready for integration into the main package.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"import-order.d.ts","sourceRoot":"","sources":["../../../src/plugin/rules/import-order.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAOnC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,UA2JhB,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"import-order.js","sourceRoot":"","sources":["../../../src/plugin/rules/import-order.ts"],"names":[],"mappings":";;AAOA,MAAM,IAAI,GAAoB;IAC5B,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,EAAE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SACF,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,kBAAe,IAAI,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"import-order.spec.d.ts","sourceRoot":"","sources":["../../../src/plugin/rules/import-order.spec.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"import-order.spec.js","sourceRoot":"","sources":["../../../src/plugin/rules/import-order.spec.ts"],"names":[],"mappings":";;;AAAA,0EAA6C;AAE7C,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC9B,EAAE,CAAC,iCAAiC,EAAE,GAAG,EAAE;QACzC,MAAM,CAAC,sBAAe,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACtD,MAAM,CAAC,sBAAe,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;QAC7E,MAAM,CAAC,sBAAe,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uEAAuE,EAAE,GAAG,EAAE;QAC/E,MAAM,WAAW,GAAG;YAClB,aAAa,EAAE,GAAG,EAAE,CAAC,CAAC;gBACpB,GAAG,EAAE,EAAE;gBACP,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC;aAC5C,CAAC;YACF,WAAW,EAAE,GAAG,EAAE,CAAC,SAAS;YAC5B,MAAM,EAAE,GAAG,EAAE,GAAE,CAAC;SACV,CAAC;QAET,MAAM,MAAM,GAAG,sBAAe,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QACnD,MAAM,CAAC,OAAO,MAAM,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACrC,MAAM,CAAC,OAAO,MAAM,CAAC,OAAO,CAA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