@futdevpro/dynamo-eslint 1.12.1 → 1.14.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/.github/workflows/main.yml +1 -2
- package/README.md +34 -0
- package/build/configs/base.d.ts +7 -3
- package/build/configs/base.d.ts.map +1 -1
- package/build/configs/base.js +9 -4
- package/build/configs/base.js.map +1 -1
- package/build/configs/fsm.d.ts +13 -9
- package/build/configs/fsm.d.ts.map +1 -1
- package/build/configs/fsm.js +6 -2
- package/build/configs/fsm.js.map +1 -1
- package/build/configs/ngx-package.d.ts +8 -3
- package/build/configs/ngx-package.d.ts.map +1 -1
- package/build/configs/ngx-package.js +4 -0
- package/build/configs/ngx-package.js.map +1 -1
- package/build/configs/ngx.d.ts +8 -3
- package/build/configs/ngx.d.ts.map +1 -1
- package/build/configs/ngx.js +4 -0
- package/build/configs/ngx.js.map +1 -1
- package/build/configs/nts-package.d.ts +8 -3
- package/build/configs/nts-package.d.ts.map +1 -1
- package/build/configs/nts-package.js +4 -0
- package/build/configs/nts-package.js.map +1 -1
- package/build/configs/nts.d.ts +8 -3
- package/build/configs/nts.d.ts.map +1 -1
- package/build/configs/nts.js +4 -0
- 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.2.tgz +0 -0
- package/package.json +27 -18
- package/samples/poc-violations.ts +32 -3
- package/src/configs/base.ts +14 -4
- package/src/configs/fsm.ts +6 -2
- package/src/configs/ngx-package.ts +4 -0
- package/src/configs/ngx.ts +4 -0
- package/src/configs/nts-package.ts +4 -0
- package/src/configs/nts.ts +5 -1
- 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 +146 -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
|
@@ -12,7 +12,7 @@ describe('| import-order', () => {
|
|
|
12
12
|
const mockContext = {
|
|
13
13
|
getSourceCode: () => ({
|
|
14
14
|
ast: {},
|
|
15
|
-
getLines: () => ['line1', 'line2', 'line3']
|
|
15
|
+
getLines: () => ['line1', 'line2', 'line3'],
|
|
16
16
|
}),
|
|
17
17
|
getFilename: () => 'test.ts',
|
|
18
18
|
report: () => { },
|
|
@@ -23,11 +23,11 @@ describe('| import-order', () => {
|
|
|
23
23
|
});
|
|
24
24
|
it('| should detect forbidden NPM-packages imports', () => {
|
|
25
25
|
const mockContext = {
|
|
26
|
-
|
|
26
|
+
sourceCode: {
|
|
27
27
|
ast: {},
|
|
28
|
-
getLines: () => ['import { Something } from \'../../../NPM-packages/some-package\';']
|
|
29
|
-
}
|
|
30
|
-
|
|
28
|
+
getLines: () => ['import { Something } from \'../../../NPM-packages/some-package\';'],
|
|
29
|
+
},
|
|
30
|
+
filename: 'test.ts',
|
|
31
31
|
report: (options) => {
|
|
32
32
|
expect(options.messageId).toBe('forbiddenNpmPackages');
|
|
33
33
|
},
|
|
@@ -40,20 +40,20 @@ describe('| import-order', () => {
|
|
|
40
40
|
type: 'ImportDeclaration',
|
|
41
41
|
source: { value: '../../../NPM-packages/some-package' },
|
|
42
42
|
importKind: 'value',
|
|
43
|
-
loc: { start: { line: 1 }, end: { line: 1 } }
|
|
44
|
-
}
|
|
45
|
-
]
|
|
43
|
+
loc: { start: { line: 1 }, end: { line: 1 } },
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
46
|
};
|
|
47
47
|
const rule = import_order_1.default.create(mockContext);
|
|
48
48
|
rule.Program(mockNode);
|
|
49
49
|
});
|
|
50
50
|
it('| should detect forbidden .js extension imports', () => {
|
|
51
51
|
const mockContext = {
|
|
52
|
-
|
|
52
|
+
sourceCode: {
|
|
53
53
|
ast: {},
|
|
54
|
-
getLines: () => ['import { Something } from \'./some-file.js\';']
|
|
55
|
-
}
|
|
56
|
-
|
|
54
|
+
getLines: () => ['import { Something } from \'./some-file.js\';'],
|
|
55
|
+
},
|
|
56
|
+
filename: 'test.ts',
|
|
57
57
|
report: (options) => {
|
|
58
58
|
expect(options.messageId).toBe('forbiddenJsExtension');
|
|
59
59
|
},
|
|
@@ -66,20 +66,20 @@ describe('| import-order', () => {
|
|
|
66
66
|
type: 'ImportDeclaration',
|
|
67
67
|
source: { value: './some-file.js' },
|
|
68
68
|
importKind: 'value',
|
|
69
|
-
loc: { start: { line: 1 }, end: { line: 1 } }
|
|
70
|
-
}
|
|
71
|
-
]
|
|
69
|
+
loc: { start: { line: 1 }, end: { line: 1 } },
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
72
|
};
|
|
73
73
|
const rule = import_order_1.default.create(mockContext);
|
|
74
74
|
rule.Program(mockNode);
|
|
75
75
|
});
|
|
76
76
|
it('| should detect forbidden import type usage', () => {
|
|
77
77
|
const mockContext = {
|
|
78
|
-
|
|
78
|
+
sourceCode: {
|
|
79
79
|
ast: {},
|
|
80
|
-
getLines: () => ['import type { SomeType } from \'./some-file\';']
|
|
81
|
-
}
|
|
82
|
-
|
|
80
|
+
getLines: () => ['import type { SomeType } from \'./some-file\';'],
|
|
81
|
+
},
|
|
82
|
+
filename: 'test.ts',
|
|
83
83
|
report: (options) => {
|
|
84
84
|
expect(options.messageId).toBe('forbiddenImportType');
|
|
85
85
|
},
|
|
@@ -92,9 +92,9 @@ describe('| import-order', () => {
|
|
|
92
92
|
type: 'ImportDeclaration',
|
|
93
93
|
source: { value: './some-file' },
|
|
94
94
|
importKind: 'type',
|
|
95
|
-
loc: { start: { line: 1 }, end: { line: 1 } }
|
|
96
|
-
}
|
|
97
|
-
]
|
|
95
|
+
loc: { start: { line: 1 }, end: { line: 1 } },
|
|
96
|
+
},
|
|
97
|
+
],
|
|
98
98
|
};
|
|
99
99
|
const rule = import_order_1.default.create(mockContext);
|
|
100
100
|
rule.Program(mockNode);
|
|
@@ -102,14 +102,14 @@ describe('| import-order', () => {
|
|
|
102
102
|
it('| should detect misordered imports', () => {
|
|
103
103
|
let reportCount = 0;
|
|
104
104
|
const mockContext = {
|
|
105
|
-
|
|
105
|
+
sourceCode: {
|
|
106
106
|
ast: {},
|
|
107
107
|
getLines: () => [
|
|
108
108
|
'import { DyFM_Error } from \'@futdevpro/fsm-dynamo\';',
|
|
109
|
-
'import { Component } from \'@angular/core\';'
|
|
110
|
-
]
|
|
111
|
-
}
|
|
112
|
-
|
|
109
|
+
'import { Component } from \'@angular/core\';',
|
|
110
|
+
],
|
|
111
|
+
},
|
|
112
|
+
filename: 'test.ts',
|
|
113
113
|
report: (options) => {
|
|
114
114
|
if (options.messageId === 'misordered') {
|
|
115
115
|
reportCount++;
|
|
@@ -124,15 +124,15 @@ describe('| import-order', () => {
|
|
|
124
124
|
type: 'ImportDeclaration',
|
|
125
125
|
source: { value: '@futdevpro/fsm-dynamo' },
|
|
126
126
|
importKind: 'value',
|
|
127
|
-
loc: { start: { line: 1 }, end: { line: 1 } }
|
|
127
|
+
loc: { start: { line: 1 }, end: { line: 1 } },
|
|
128
128
|
},
|
|
129
129
|
{
|
|
130
130
|
type: 'ImportDeclaration',
|
|
131
131
|
source: { value: '@angular/core' },
|
|
132
132
|
importKind: 'value',
|
|
133
|
-
loc: { start: { line: 2 }, end: { line: 2 } }
|
|
134
|
-
}
|
|
135
|
-
]
|
|
133
|
+
loc: { start: { line: 2 }, end: { line: 2 } },
|
|
134
|
+
},
|
|
135
|
+
],
|
|
136
136
|
};
|
|
137
137
|
const rule = import_order_1.default.create(mockContext);
|
|
138
138
|
rule.Program(mockNode);
|
|
@@ -141,14 +141,14 @@ describe('| import-order', () => {
|
|
|
141
141
|
it('| should detect missing empty line between groups', () => {
|
|
142
142
|
let reportCount = 0;
|
|
143
143
|
const mockContext = {
|
|
144
|
-
|
|
144
|
+
sourceCode: {
|
|
145
145
|
ast: {},
|
|
146
146
|
getLines: () => [
|
|
147
147
|
'import { Component } from \'@angular/core\';',
|
|
148
|
-
'import { DyFM_Error } from \'@futdevpro/fsm-dynamo\';'
|
|
149
|
-
]
|
|
150
|
-
}
|
|
151
|
-
|
|
148
|
+
'import { DyFM_Error } from \'@futdevpro/fsm-dynamo\';',
|
|
149
|
+
],
|
|
150
|
+
},
|
|
151
|
+
filename: 'test.ts',
|
|
152
152
|
report: (options) => {
|
|
153
153
|
if (options.messageId === 'missingEmptyLine') {
|
|
154
154
|
reportCount++;
|
|
@@ -163,15 +163,15 @@ describe('| import-order', () => {
|
|
|
163
163
|
type: 'ImportDeclaration',
|
|
164
164
|
source: { value: '@angular/core' },
|
|
165
165
|
importKind: 'value',
|
|
166
|
-
loc: { start: { line: 1 }, end: { line: 1 } }
|
|
166
|
+
loc: { start: { line: 1 }, end: { line: 1 } },
|
|
167
167
|
},
|
|
168
168
|
{
|
|
169
169
|
type: 'ImportDeclaration',
|
|
170
170
|
source: { value: '@futdevpro/fsm-dynamo' },
|
|
171
171
|
importKind: 'value',
|
|
172
|
-
loc: { start: { line: 2 }, end: { line: 2 } }
|
|
173
|
-
}
|
|
174
|
-
]
|
|
172
|
+
loc: { start: { line: 2 }, end: { line: 2 } },
|
|
173
|
+
},
|
|
174
|
+
],
|
|
175
175
|
};
|
|
176
176
|
const rule = import_order_1.default.create(mockContext);
|
|
177
177
|
rule.Program(mockNode);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import-order.spec.js","sourceRoot":"","sources":["../../../../src/plugin/rules/import/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,CAAE,OAAO,EAAE,OAAO,EAAE,OA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AE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE;iBAC9C;aACF;SACK,CAAC;QAET,MAAM,IAAI,GAAG,sBAAe,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QAEjD,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAEvB,MAAM,CAAC,WAAW,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-import-type.d.ts","sourceRoot":"","sources":["../../../../src/plugin/rules/import/no-import-type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,UAgChB,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const rule = {
|
|
4
|
+
meta: {
|
|
5
|
+
type: 'suggestion',
|
|
6
|
+
docs: { description: 'Forbid use of "import type" syntax' },
|
|
7
|
+
schema: [],
|
|
8
|
+
messages: {
|
|
9
|
+
forbiddenImportType: 'Use of "import type" is forbidden.',
|
|
10
|
+
},
|
|
11
|
+
fixable: 'code',
|
|
12
|
+
},
|
|
13
|
+
create(context) {
|
|
14
|
+
const sourceCode = context.sourceCode;
|
|
15
|
+
return {
|
|
16
|
+
ImportDeclaration(node) {
|
|
17
|
+
// Check for import type usage
|
|
18
|
+
if (node.importKind === 'type') {
|
|
19
|
+
context.report({
|
|
20
|
+
node,
|
|
21
|
+
messageId: 'forbiddenImportType',
|
|
22
|
+
fix(fixer) {
|
|
23
|
+
// Remove 'type' keyword
|
|
24
|
+
const importText = sourceCode.getText(node);
|
|
25
|
+
const newImportText = importText.replace(/import\s+type\s+/, 'import ');
|
|
26
|
+
return fixer.replaceText(node, newImportText);
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
exports.default = rule;
|
|
35
|
+
//# sourceMappingURL=no-import-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-import-type.js","sourceRoot":"","sources":["../../../../src/plugin/rules/import/no-import-type.ts"],"names":[],"mappings":";;AAEA,MAAM,IAAI,GAAoB;IAC5B,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,EAAE,WAAW,EAAE,oCAAoC,EAAE;QAC3D,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE;YACR,mBAAmB,EAAE,oCAAoC;SAC1D;QACD,OAAO,EAAE,MAAM;KAChB;IACD,MAAM,CAAC,OAAO;QACZ,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;QAEtC,OAAO;YACL,iBAAiB,CAAC,IAAS;gBACzB,8BAA8B;gBAC9B,IAAI,IAAI,CAAC,UAAU,KAAK,MAAM,EAAE,CAAC;oBAC/B,OAAO,CAAC,MAAM,CAAC;wBACb,IAAI;wBACJ,SAAS,EAAE,qBAAqB;wBAChC,GAAG,CAAC,KAAK;4BACP,wBAAwB;4BACxB,MAAM,UAAU,GAAG,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;4BAC5C,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,CAAC,kBAAkB,EAAE,SAAS,CAAC,CAAC;4BAExE,OAAO,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;wBAChD,CAAC;qBACF,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,kBAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-import-type.spec.d.ts","sourceRoot":"","sources":["../../../../src/plugin/rules/import/no-import-type.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const no_import_type_1 = tslib_1.__importDefault(require("./no-import-type"));
|
|
5
|
+
describe('| no-import-type', () => {
|
|
6
|
+
it('| should be a valid ESLint rule', () => {
|
|
7
|
+
expect(no_import_type_1.default.meta?.type).toBe('suggestion');
|
|
8
|
+
expect(no_import_type_1.default.meta?.docs?.description).toContain('import type');
|
|
9
|
+
expect(no_import_type_1.default.meta?.fixable).toBe('code');
|
|
10
|
+
});
|
|
11
|
+
it('| should have create function that returns object with ImportDeclaration method', () => {
|
|
12
|
+
const mockContext = {
|
|
13
|
+
sourceCode: {
|
|
14
|
+
getText: (node) => 'import type { SomeType } from \'./some-file\';',
|
|
15
|
+
},
|
|
16
|
+
report: () => { },
|
|
17
|
+
};
|
|
18
|
+
const result = no_import_type_1.default.create(mockContext);
|
|
19
|
+
expect(typeof result).toBe('object');
|
|
20
|
+
expect(typeof result.ImportDeclaration).toBe('function');
|
|
21
|
+
});
|
|
22
|
+
it('| should detect forbidden import type usage', () => {
|
|
23
|
+
const mockContext = {
|
|
24
|
+
sourceCode: {
|
|
25
|
+
getText: (node) => 'import type { SomeType } from \'./some-file\';',
|
|
26
|
+
},
|
|
27
|
+
report: (options) => {
|
|
28
|
+
expect(options.messageId).toBe('forbiddenImportType');
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
const mockNode = {
|
|
32
|
+
type: 'ImportDeclaration',
|
|
33
|
+
importKind: 'type',
|
|
34
|
+
loc: { start: { line: 1 }, end: { line: 1 } },
|
|
35
|
+
};
|
|
36
|
+
const rule = no_import_type_1.default.create(mockContext);
|
|
37
|
+
rule.ImportDeclaration(mockNode);
|
|
38
|
+
});
|
|
39
|
+
it('| should not report errors for regular imports', () => {
|
|
40
|
+
const mockContext = {
|
|
41
|
+
sourceCode: {
|
|
42
|
+
getText: (node) => 'import { SomeType } from \'./some-file\';',
|
|
43
|
+
},
|
|
44
|
+
report: (options) => {
|
|
45
|
+
// Should not be called for regular imports
|
|
46
|
+
fail('Should not report errors for regular imports');
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
const mockNode = {
|
|
50
|
+
type: 'ImportDeclaration',
|
|
51
|
+
importKind: 'value',
|
|
52
|
+
loc: { start: { line: 1 }, end: { line: 1 } },
|
|
53
|
+
};
|
|
54
|
+
const rule = no_import_type_1.default.create(mockContext);
|
|
55
|
+
rule.ImportDeclaration(mockNode);
|
|
56
|
+
// If we get here without the report function being called, the test passes
|
|
57
|
+
expect(true).toBe(true);
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
//# sourceMappingURL=no-import-type.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-import-type.spec.js","sourceRoot":"","sources":["../../../../src/plugin/rules/import/no-import-type.spec.ts"],"names":[],"mappings":";;;AAAA,8EAAgD;AAEhD,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,EAAE,CAAC,iCAAiC,EAAE,GAAG,EAAE;QACzC,MAAM,CAAC,wBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACvD,MAAM,CAAC,wBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;QAC1E,MAAM,CAAC,wBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iFAAiF,EAAE,GAAG,EAAE;QACzF,MAAM,WAAW,GAAG;YAClB,UAAU,EAAE;gBACV,OAA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A8C,CAAC,CAAC;YACvD,CAAC;SACK,CAAC;QAET,MAAM,QAAQ,GAAG;YACf,IAAI,EAAE,mBAAmB;YACzB,UAAU,EAAE,OAAO;YACnB,GAAG,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE;SACvC,CAAC;QAET,MAAM,IAAI,GAAG,wBAAgB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QAElD,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;QAEjC,2EAA2E;QAC3E,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-js-import.d.ts","sourceRoot":"","sources":["../../../../src/plugin/rules/import/no-js-import.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,UA8BhB,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const rule = {
|
|
4
|
+
meta: {
|
|
5
|
+
type: 'suggestion',
|
|
6
|
+
docs: { description: 'Forbid imports with ".js" extension' },
|
|
7
|
+
schema: [],
|
|
8
|
+
messages: {
|
|
9
|
+
forbiddenJsExtension: 'Import with ".js" extension is forbidden. Use ".ts" or no extension.',
|
|
10
|
+
},
|
|
11
|
+
fixable: 'code',
|
|
12
|
+
},
|
|
13
|
+
create(context) {
|
|
14
|
+
return {
|
|
15
|
+
ImportDeclaration(node) {
|
|
16
|
+
const source = node.source.value;
|
|
17
|
+
if (source.endsWith('.js')) {
|
|
18
|
+
context.report({
|
|
19
|
+
node: node.source,
|
|
20
|
+
messageId: 'forbiddenJsExtension',
|
|
21
|
+
fix(fixer) {
|
|
22
|
+
// Remove .js extension
|
|
23
|
+
const newSource = source.replace(/\.js$/, '');
|
|
24
|
+
return fixer.replaceText(node.source, `'${newSource}'`);
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
exports.default = rule;
|
|
33
|
+
//# sourceMappingURL=no-js-import.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-js-import.js","sourceRoot":"","sources":["../../../../src/plugin/rules/import/no-js-import.ts"],"names":[],"mappings":";;AAEA,MAAM,IAAI,GAAoB;IAC5B,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,EAAE,WAAW,EAAE,qCAAqC,EAAE;QAC5D,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE;YACR,oBAAoB,EAAE,sEAAsE;SAC7F;QACD,OAAO,EAAE,MAAM;KAChB;IACD,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,iBAAiB,CAAC,IAAS;gBACzB,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,KAAe,CAAC;gBAE3C,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;oBAC3B,OAAO,CAAC,MAAM,CAAC;wBACb,IAAI,EAAE,IAAI,CAAC,MAAM;wBACjB,SAAS,EAAE,sBAAsB;wBACjC,GAAG,CAAC,KAAK;4BACP,uBAAuB;4BACvB,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;4BAE9C,OAAO,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,SAAS,GAAG,CAAC,CAAC;wBAC1D,CAAC;qBACF,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,kBAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-js-import.spec.d.ts","sourceRoot":"","sources":["../../../../src/plugin/rules/import/no-js-import.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const no_js_import_1 = tslib_1.__importDefault(require("./no-js-import"));
|
|
5
|
+
describe('| no-js-import', () => {
|
|
6
|
+
it('| should be a valid ESLint rule', () => {
|
|
7
|
+
expect(no_js_import_1.default.meta?.type).toBe('suggestion');
|
|
8
|
+
expect(no_js_import_1.default.meta?.docs?.description).toContain('.js');
|
|
9
|
+
expect(no_js_import_1.default.meta?.fixable).toBe('code');
|
|
10
|
+
});
|
|
11
|
+
it('| should have create function that returns object with ImportDeclaration method', () => {
|
|
12
|
+
const mockContext = {
|
|
13
|
+
report: () => { },
|
|
14
|
+
};
|
|
15
|
+
const result = no_js_import_1.default.create(mockContext);
|
|
16
|
+
expect(typeof result).toBe('object');
|
|
17
|
+
expect(typeof result.ImportDeclaration).toBe('function');
|
|
18
|
+
});
|
|
19
|
+
it('| should detect forbidden .js extension imports', () => {
|
|
20
|
+
const mockContext = {
|
|
21
|
+
report: (options) => {
|
|
22
|
+
expect(options.messageId).toBe('forbiddenJsExtension');
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
const mockNode = {
|
|
26
|
+
type: 'ImportDeclaration',
|
|
27
|
+
source: { value: './some-file.js' },
|
|
28
|
+
loc: { start: { line: 1 }, end: { line: 1 } },
|
|
29
|
+
};
|
|
30
|
+
const rule = no_js_import_1.default.create(mockContext);
|
|
31
|
+
rule.ImportDeclaration(mockNode);
|
|
32
|
+
});
|
|
33
|
+
it('| should not report errors for imports without .js extension', () => {
|
|
34
|
+
const mockContext = {
|
|
35
|
+
report: (options) => {
|
|
36
|
+
// Should not be called for imports without .js extension
|
|
37
|
+
fail('Should not report errors for imports without .js extension');
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
const mockNode = {
|
|
41
|
+
type: 'ImportDeclaration',
|
|
42
|
+
source: { value: './some-file' },
|
|
43
|
+
loc: { start: { line: 1 }, end: { line: 1 } },
|
|
44
|
+
};
|
|
45
|
+
const rule = no_js_import_1.default.create(mockContext);
|
|
46
|
+
rule.ImportDeclaration(mockNode);
|
|
47
|
+
// If we get here without the report function being called, the test passes
|
|
48
|
+
expect(true).toBe(true);
|
|
49
|
+
});
|
|
50
|
+
it('| should not report errors for imports with .ts extension', () => {
|
|
51
|
+
const mockContext = {
|
|
52
|
+
report: (options) => {
|
|
53
|
+
// Should not be called for imports with .ts extension
|
|
54
|
+
fail('Should not report errors for imports with .ts extension');
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
const mockNode = {
|
|
58
|
+
type: 'ImportDeclaration',
|
|
59
|
+
source: { value: './some-file.ts' },
|
|
60
|
+
loc: { start: { line: 1 }, end: { line: 1 } },
|
|
61
|
+
};
|
|
62
|
+
const rule = no_js_import_1.default.create(mockContext);
|
|
63
|
+
rule.ImportDeclaration(mockNode);
|
|
64
|
+
// If we get here without the report function being called, the test passes
|
|
65
|
+
expect(true).toBe(true);
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
//# sourceMappingURL=no-js-import.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-js-import.spec.js","sourceRoot":"","sources":["../../../../src/plugin/rules/import/no-js-import.spec.ts"],"names":[],"mappings":";;;AAAA,0EAA+C;AAE/C,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC9B,EAAE,CAAC,iCAAiC,EAAE,GAAG,EAAE;QACzC,MAAM,CAAC,sBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CA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AC1B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"naming-patterns.d.ts","sourceRoot":"","sources":["../../../src/plugin/rules/naming-patterns.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"naming-patterns.d.ts","sourceRoot":"","sources":["../../../src/plugin/rules/naming-patterns.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAG9B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,UAiBhB,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -25,7 +25,7 @@ describe('| naming-patterns', () => {
|
|
|
25
25
|
const mockNode = {
|
|
26
26
|
type: 'Identifier',
|
|
27
27
|
name: 'validVariableName',
|
|
28
|
-
loc: { start: { line: 1 }, end: { line: 1 } }
|
|
28
|
+
loc: { start: { line: 1 }, end: { line: 1 } },
|
|
29
29
|
};
|
|
30
30
|
const rule = naming_patterns_1.default.create(mockContext);
|
|
31
31
|
rule.Identifier(mockNode);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"naming-patterns.spec.js","sourceRoot":"","sources":["../../../src/plugin/rules/naming-patterns.spec.ts"],"names":[],"mappings":";;;AAAA,gFAAmD;AAEnD,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;IACjC,EAAE,CAAC,iCAAiC,EAAE,GAAG,EAAE;QACzC,MAAM,CAAC,yBAAkB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACzD,MAAM,CAAC,yBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;IACrF,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0EAA0E,EAAE,GAAG,EAAE;QAClF,MAAM,WAAW,GAAG;YAClB,MAAM,EAAE,GA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AAE,EAAE,GAAG,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE;SACvC,CAAC;QAET,MAAM,IAAI,GAAG,yBAAkB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QAEpD,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QAE1B,2EAA2E;QAC3E,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynamo-fix.d.ts","sourceRoot":"","sources":["../../src/scripts/dynamo-fix.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const fast_glob_1 = tslib_1.__importDefault(require("fast-glob"));
|
|
6
|
+
const eslint_1 = require("eslint");
|
|
7
|
+
const fs_1 = require("fs");
|
|
8
|
+
async function fixFile(filePath) {
|
|
9
|
+
const eslint = new eslint_1.ESLint({
|
|
10
|
+
baseConfig: [
|
|
11
|
+
{ ignores: ['build/**', 'dist/**', 'node_modules/**'] },
|
|
12
|
+
{
|
|
13
|
+
files: ['**/*.{ts,tsx}'],
|
|
14
|
+
languageOptions: {
|
|
15
|
+
parser: require('@typescript-eslint/parser'),
|
|
16
|
+
parserOptions: { ecmaVersion: 2020, sourceType: 'module' },
|
|
17
|
+
},
|
|
18
|
+
plugins: {
|
|
19
|
+
'@futdevpro/dynamo': {
|
|
20
|
+
rules: {
|
|
21
|
+
'import-order': require('../plugin/rules/import-order').default,
|
|
22
|
+
'naming-patterns': require('../plugin/rules/naming-patterns').default,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
rules: {
|
|
27
|
+
'@futdevpro/dynamo/import-order': 'error',
|
|
28
|
+
'@futdevpro/dynamo/naming-patterns': 'warn',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
fix: true, // Enable auto-fixing
|
|
33
|
+
});
|
|
34
|
+
const results = await eslint.lintFiles([filePath]);
|
|
35
|
+
const result = results[0];
|
|
36
|
+
if (result && result.output) {
|
|
37
|
+
// Write the fixed content back to the file
|
|
38
|
+
(0, fs_1.writeFileSync)(filePath, result.output);
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
file: filePath,
|
|
42
|
+
fixed: result && result.output !== undefined,
|
|
43
|
+
errors: result.messages.filter(msg => msg.severity === 2).length,
|
|
44
|
+
warnings: result.messages.filter(msg => msg.severity === 1).length,
|
|
45
|
+
fixes: result.fixableErrorCount + result.fixableWarningCount,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
async function main() {
|
|
49
|
+
const files = await (0, fast_glob_1.default)(['**/*.{ts,tsx}'], {
|
|
50
|
+
ignore: ['**/node_modules/**', '**/build/**', '**/dist/**', '**/*.spec.ts', '**/*.test.ts'],
|
|
51
|
+
});
|
|
52
|
+
console.log(`[dynamo-fix] Fixing ${files.length} files...`);
|
|
53
|
+
const results = [];
|
|
54
|
+
let totalFixed = 0;
|
|
55
|
+
let totalErrors = 0;
|
|
56
|
+
let totalWarnings = 0;
|
|
57
|
+
let totalFixes = 0;
|
|
58
|
+
for (const file of files) {
|
|
59
|
+
try {
|
|
60
|
+
const result = await fixFile(file);
|
|
61
|
+
results.push(result);
|
|
62
|
+
if (result.fixed) {
|
|
63
|
+
totalFixed++;
|
|
64
|
+
console.log(`✅ Fixed: ${result.file}`);
|
|
65
|
+
}
|
|
66
|
+
totalErrors += result.errors;
|
|
67
|
+
totalWarnings += result.warnings;
|
|
68
|
+
totalFixes += result.fixes;
|
|
69
|
+
}
|
|
70
|
+
catch (error) {
|
|
71
|
+
console.error(`❌ Error processing ${file}:`, error);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
// Report results
|
|
75
|
+
console.log(`\n📊 Fix Summary:`);
|
|
76
|
+
console.log(` Files processed: ${files.length}`);
|
|
77
|
+
console.log(` Files fixed: ${totalFixed}`);
|
|
78
|
+
console.log(` Total errors: ${totalErrors}`);
|
|
79
|
+
console.log(` Total warnings: ${totalWarnings}`);
|
|
80
|
+
console.log(` Total fixes applied: ${totalFixes}`);
|
|
81
|
+
if (totalFixed === 0) {
|
|
82
|
+
console.log('✅ No files needed fixing!');
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
console.log(`\n🎉 Successfully fixed ${totalFixed} files!`);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
main().catch((err) => {
|
|
89
|
+
console.error('Fix failed:', err);
|
|
90
|
+
process.exit(1);
|
|
91
|
+
});
|
|
92
|
+
//# sourceMappingURL=dynamo-fix.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynamo-fix.js","sourceRoot":"","sources":["../../src/scripts/dynamo-fix.ts"],"names":[],"mappings":";;;;AACA,kEAA2B;AAC3B,mCAAgC;AAChC,2BAAmC;AAUnC,KAAK,UAAU,OAAO,CAAC,QAAgB;IACrC,MAAM,MAAM,GAAG,IAAI,eAAM,CAAC;QACxB,UAAU,EAAE;YACV,EAAE,OAAO,EAAE,CAAE,UAAU,EAAE,SAAS,EAAE,iBAAiB,CAAE,EAAE;YACzD;gBACE,KAAK,EAAE,CAAE,eAAe,CAAE;gBAC1B,eAAe,EAAE;oBACf,MAAM,EAAE,OAAO,CAAC,2BAA2B,CAAC;oBAC5C,aAAa,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE;iBAC3D;gBACD,OAAO,EAAE;oBACP,mBAAmB,EAAE;wBACnB,KAAK,EAAE;4BACL,cAAc,EAAE,OAAO,CAAC,8BAA8B,CAAC,CAAC,OAAO;4BAC/D,iBAAiB,EAAE,OAAO,CAAC,iCAAiC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C,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,2BAA2B,UAAU,SAAS,CAAC,CAAC;IAC9D,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC;IAClC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eslintrc-audit.js","sourceRoot":"","sources":["../../src/scripts/eslintrc-audit.ts"],"names":[],"mappings":";;;;AACA,kEAA2B;AAC3B,2BAAkC;AAIlC,SAAS,SAAS,CAAC,QAAgB;IACjC,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAA,iBAAY,EAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"eslintrc-audit.js","sourceRoot":"","sources":["../../src/scripts/eslintrc-audit.ts"],"names":[],"mappings":";;;;AACA,kEAA2B;AAC3B,2BAAkC;AAIlC,SAAS,SAAS,CAAC,QAAgB;IACjC,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAA,iBAAY,EAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAE/C,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC7B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,KAAK,UAAU,IAAI;IACjB,MAAM,KAAK,GAAG,MAAM,IAAA,mBAAE,EAAC,CAAE,mBAAmB,CAAE,EAAE,EAAE,MAAM,EAAE,CAAE,oBAAoB,CAAE,EAAE,CAAC,CAAC;IACtF,MAAM,UAAU,GAA2B,EAAE,CAAC;IAC9C,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC;IAE3B,KAAK,MAAM,CAAC,IAAI,KAAK,EAA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