@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
|
@@ -8,16 +8,14 @@ const rule = {
|
|
|
8
8
|
messages: {
|
|
9
9
|
misordered: 'Import statements should be grouped and ordered by convention.',
|
|
10
10
|
forbiddenNpmPackages: 'Import from "*/../NPM-packages/*" is forbidden. Use "@futdevpro/*" instead.',
|
|
11
|
-
forbiddenJsExtension: 'Import with ".js" extension is forbidden. Use ".ts" or no extension.',
|
|
12
|
-
forbiddenImportType: 'Use of "import type" is forbidden.',
|
|
13
11
|
missingEmptyLine: 'Missing empty line between import groups.',
|
|
14
12
|
extraEmptyLine: 'Extra empty line detected.',
|
|
15
13
|
},
|
|
16
14
|
fixable: 'code',
|
|
17
15
|
},
|
|
18
16
|
create(context) {
|
|
19
|
-
const sourceCode = context.
|
|
20
|
-
const filename = context.
|
|
17
|
+
const sourceCode = context.sourceCode;
|
|
18
|
+
const filename = context.filename;
|
|
21
19
|
function getImportGroup(importNode) {
|
|
22
20
|
const source = importNode.source.value;
|
|
23
21
|
// Check for forbidden patterns first
|
|
@@ -52,19 +50,11 @@ const rule = {
|
|
|
52
50
|
context.report({
|
|
53
51
|
node: importNode.source,
|
|
54
52
|
messageId: 'forbiddenNpmPackages',
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
messageId: 'forbiddenJsExtension',
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
// Check for import type usage
|
|
64
|
-
if (importNode.importKind === 'type') {
|
|
65
|
-
context.report({
|
|
66
|
-
node: importNode,
|
|
67
|
-
messageId: 'forbiddenImportType',
|
|
53
|
+
fix(fixer) {
|
|
54
|
+
// Replace NPM-packages path with @futdevpro equivalent
|
|
55
|
+
const newSource = source.replace(/.*\/NPM-packages\/([^\/]+)/, '@futdevpro/$1');
|
|
56
|
+
return fixer.replaceText(importNode.source, `'${newSource}'`);
|
|
57
|
+
},
|
|
68
58
|
});
|
|
69
59
|
}
|
|
70
60
|
}
|
|
@@ -98,6 +88,11 @@ const rule = {
|
|
|
98
88
|
context.report({
|
|
99
89
|
node: importNode,
|
|
100
90
|
messageId: 'misordered',
|
|
91
|
+
fix(fixer) {
|
|
92
|
+
// This is complex to fix automatically, so we'll just report for now
|
|
93
|
+
// Future enhancement: reorder imports automatically
|
|
94
|
+
return null;
|
|
95
|
+
},
|
|
101
96
|
});
|
|
102
97
|
}
|
|
103
98
|
currentGroupIndex = expectedGroupIndex;
|
|
@@ -115,6 +110,10 @@ const rule = {
|
|
|
115
110
|
context.report({
|
|
116
111
|
node: firstImportOfNextGroup,
|
|
117
112
|
messageId: 'missingEmptyLine',
|
|
113
|
+
fix(fixer) {
|
|
114
|
+
// Add empty line before the first import of next group
|
|
115
|
+
return fixer.insertTextBefore(firstImportOfNextGroup, '\n');
|
|
116
|
+
},
|
|
118
117
|
});
|
|
119
118
|
}
|
|
120
119
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import-order.js","sourceRoot":"","sources":["../../../../src/plugin/rules/import/import-order.ts"],"names":[],"mappings":";;AAOA,MAAM,IAAI,GAAoB;IAC5B,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,EAAE,WAAW,EAAE,sDAAsD,EAAE;QAC7E,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE;YACR,UAAU,EAAE,gEAAgE;YAC5E,oBAAoB,EAAE,6EAA6E;YACnG,gBAAgB,EAAE,2CAA2C;YAC7D,cAAc,EAAE,4BAA4B;SAC7C;QACD,OAAO,EAAE,MAAM;KAChB;IACD,MAAM,CAAC,OAAO;QACZ,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;QACtC,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QAElC,SAAS,cAAc,CAAC,UAAe;YACrC,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,KAAe,CAAC;YAEjD,qCAAqC;YACrC,IAAI,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,CAAC;gBACtC,OAAO,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,MAAM,eAAe,GAAG,sBAAsB,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,IAAI,CAAC,CAAC;gBAEpE,IAAI,eAAe,GAAG,cAAc,GAAG,CAAC,EAAE,CAAC;oBACzC,OAAO,CAAC,MAAM,CAAC;wBACb,IAAI,EAAE,sBAAsB;wBAC5B,SAAS,EAAE,kBAAkB;wBAC7B,GAAG,CAAC,KAAK;4BACP,uDAAuD;4BACvD,OAAO,KAAK,CAAC,gBAAgB,CAAC,sBAAsB,EAAE,IAAI,CAAC,CAAC;wBAC9D,CAAC;qBACF,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO;YACL,OAAO,CAAC,IAAS;gBACf,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAClC,CAAC,SAAc,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,KAAK,mBAAmB,CAC3D,CAAC;gBAEF,0CAA0C;gBAC1C,WAAW,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC;gBAE/C,2BAA2B;gBAC3B,sBAAsB,CAAC,WAAW,CAAC,CAAC;YACtC,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,kBAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import-order.spec.d.ts","sourceRoot":"","sources":["../../../../src/plugin/rules/import/import-order.spec.ts"],"names":[],"mappings":""}
|
|
@@ -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,OAAO,CAAE;aAC9C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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,OAAO,EAAE,CAAC,I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;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,CAAC;QACxD,MAAM,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C,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,GAAG,EAAE,GAAE,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