@futdevpro/dynamo-eslint 1.14.4 → 1.14.7
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/.vscode/settings.json +0 -2
- package/build/configs/base.js +29 -7
- package/build/configs/base.js.map +1 -1
- package/build/plugin/index.d.ts +8 -0
- package/build/plugin/index.d.ts.map +1 -1
- package/build/plugin/index.js +12 -0
- package/build/plugin/index.js.map +1 -1
- package/build/plugin/rules/explicit-types.d.ts.map +1 -1
- package/build/plugin/rules/explicit-types.js +16 -2
- package/build/plugin/rules/explicit-types.js.map +1 -1
- package/build/plugin/rules/import/import-order.d.ts.map +1 -1
- package/build/plugin/rules/import/import-order.js +0 -9
- package/build/plugin/rules/import/import-order.js.map +1 -1
- package/build/plugin/rules/import/no-js-import.d.ts.map +1 -1
- package/build/plugin/rules/import/no-js-import.js +12 -15
- package/build/plugin/rules/import/no-js-import.js.map +1 -1
- package/build/plugin/rules/prefer-enum-over-string-union.d.ts +4 -0
- package/build/plugin/rules/prefer-enum-over-string-union.d.ts.map +1 -0
- package/build/plugin/rules/prefer-enum-over-string-union.js +290 -0
- package/build/plugin/rules/prefer-enum-over-string-union.js.map +1 -0
- package/build/plugin/rules/prefer-enum-over-string-union.spec.d.ts +2 -0
- package/build/plugin/rules/prefer-enum-over-string-union.spec.d.ts.map +1 -0
- package/build/plugin/rules/prefer-enum-over-string-union.spec.js +505 -0
- package/build/plugin/rules/prefer-enum-over-string-union.spec.js.map +1 -0
- package/build/plugin/rules/prefer-interface-over-duplicate-types.d.ts +4 -0
- package/build/plugin/rules/prefer-interface-over-duplicate-types.d.ts.map +1 -0
- package/build/plugin/rules/prefer-interface-over-duplicate-types.js +231 -0
- package/build/plugin/rules/prefer-interface-over-duplicate-types.js.map +1 -0
- package/build/plugin/rules/prefer-interface-over-duplicate-types.spec.d.ts +2 -0
- package/build/plugin/rules/prefer-interface-over-duplicate-types.spec.d.ts.map +1 -0
- package/build/plugin/rules/prefer-interface-over-duplicate-types.spec.js +324 -0
- package/build/plugin/rules/prefer-interface-over-duplicate-types.spec.js.map +1 -0
- package/build/plugin/rules/require-jsdoc-description.d.ts +4 -0
- package/build/plugin/rules/require-jsdoc-description.d.ts.map +1 -0
- package/build/plugin/rules/require-jsdoc-description.js +379 -0
- package/build/plugin/rules/require-jsdoc-description.js.map +1 -0
- package/build/plugin/rules/require-jsdoc-description.spec.d.ts +2 -0
- package/build/plugin/rules/require-jsdoc-description.spec.d.ts.map +1 -0
- package/build/plugin/rules/require-jsdoc-description.spec.js +452 -0
- package/build/plugin/rules/require-jsdoc-description.spec.js.map +1 -0
- package/build/plugin/rules/require-test-description-prefix.d.ts +4 -0
- package/build/plugin/rules/require-test-description-prefix.d.ts.map +1 -0
- package/build/plugin/rules/require-test-description-prefix.js +135 -0
- package/build/plugin/rules/require-test-description-prefix.js.map +1 -0
- package/build/plugin/rules/require-test-description-prefix.spec.d.ts +2 -0
- package/build/plugin/rules/require-test-description-prefix.spec.d.ts.map +1 -0
- package/build/plugin/rules/require-test-description-prefix.spec.js +371 -0
- package/build/plugin/rules/require-test-description-prefix.spec.js.map +1 -0
- package/build/scripts/eslintrc-audit.js.map +1 -1
- package/futdevpro-dynamo-eslint-1.14.7.tgz +0 -0
- package/package.json +1 -1
- package/samples/package.json.example +1 -1
- package/src/configs/base.ts +45 -23
- package/src/plugin/index.ts +12 -0
- package/src/plugin/rules/explicit-types.ts +19 -2
- package/src/plugin/rules/import/import-order.ts +0 -9
- package/src/plugin/rules/import/no-js-import.ts +19 -17
- package/src/plugin/rules/prefer-enum-over-string-union.spec.ts +583 -0
- package/src/plugin/rules/prefer-enum-over-string-union.ts +333 -0
- package/src/plugin/rules/prefer-interface-over-duplicate-types.spec.ts +374 -0
- package/src/plugin/rules/prefer-interface-over-duplicate-types.ts +276 -0
- package/src/plugin/rules/require-jsdoc-description.spec.ts +542 -0
- package/src/plugin/rules/require-jsdoc-description.ts +436 -0
- package/src/plugin/rules/require-test-description-prefix.spec.ts +459 -0
- package/src/plugin/rules/require-test-description-prefix.ts +153 -0
- package/src/scripts/eslintrc-audit.ts +8 -6
- package/futdevpro-dynamo-eslint-01.14.4.tgz +0 -0
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const require_test_description_prefix_1 = tslib_1.__importDefault(require("./require-test-description-prefix"));
|
|
5
|
+
describe('| require-test-description-prefix', () => {
|
|
6
|
+
it('| should be a valid ESLint rule', () => {
|
|
7
|
+
expect(require_test_description_prefix_1.default.meta.type).toBe('suggestion');
|
|
8
|
+
expect(require_test_description_prefix_1.default.meta.docs.description).toBe('Require "| " prefix in test descriptions');
|
|
9
|
+
expect(require_test_description_prefix_1.default.meta.fixable).toBe('code');
|
|
10
|
+
});
|
|
11
|
+
it('| should not report when describe has correct prefix', () => {
|
|
12
|
+
let reportCalled = false;
|
|
13
|
+
const mockContext = {
|
|
14
|
+
report: (options) => {
|
|
15
|
+
reportCalled = true;
|
|
16
|
+
},
|
|
17
|
+
options: [{ prefix: '| ' }],
|
|
18
|
+
};
|
|
19
|
+
const rule = require_test_description_prefix_1.default.create(mockContext);
|
|
20
|
+
const mockNode = {
|
|
21
|
+
type: 'CallExpression',
|
|
22
|
+
callee: { name: 'describe' },
|
|
23
|
+
arguments: [
|
|
24
|
+
{ type: 'Literal', value: '| my test suite' },
|
|
25
|
+
],
|
|
26
|
+
};
|
|
27
|
+
rule.CallExpression(mockNode);
|
|
28
|
+
expect(reportCalled).toBe(false);
|
|
29
|
+
});
|
|
30
|
+
it('| should not report when it has correct prefix', () => {
|
|
31
|
+
let reportCalled = false;
|
|
32
|
+
const mockContext = {
|
|
33
|
+
report: (options) => {
|
|
34
|
+
reportCalled = true;
|
|
35
|
+
},
|
|
36
|
+
options: [{ prefix: '| ' }],
|
|
37
|
+
};
|
|
38
|
+
const rule = require_test_description_prefix_1.default.create(mockContext);
|
|
39
|
+
const mockNode = {
|
|
40
|
+
type: 'CallExpression',
|
|
41
|
+
callee: { name: 'it' },
|
|
42
|
+
arguments: [
|
|
43
|
+
{ type: 'Literal', value: '| should do something' },
|
|
44
|
+
],
|
|
45
|
+
};
|
|
46
|
+
rule.CallExpression(mockNode);
|
|
47
|
+
expect(reportCalled).toBe(false);
|
|
48
|
+
});
|
|
49
|
+
it('| should not report when test has correct prefix', () => {
|
|
50
|
+
let reportCalled = false;
|
|
51
|
+
const mockContext = {
|
|
52
|
+
report: (options) => {
|
|
53
|
+
reportCalled = true;
|
|
54
|
+
},
|
|
55
|
+
options: [{ prefix: '| ' }],
|
|
56
|
+
};
|
|
57
|
+
const rule = require_test_description_prefix_1.default.create(mockContext);
|
|
58
|
+
const mockNode = {
|
|
59
|
+
type: 'CallExpression',
|
|
60
|
+
callee: { name: 'test' },
|
|
61
|
+
arguments: [
|
|
62
|
+
{ type: 'Literal', value: '| validates input' },
|
|
63
|
+
],
|
|
64
|
+
};
|
|
65
|
+
rule.CallExpression(mockNode);
|
|
66
|
+
expect(reportCalled).toBe(false);
|
|
67
|
+
});
|
|
68
|
+
it('| should report when describe is missing prefix', () => {
|
|
69
|
+
let reportCalled = false;
|
|
70
|
+
const mockContext = {
|
|
71
|
+
report: (options) => {
|
|
72
|
+
reportCalled = true;
|
|
73
|
+
expect(options.messageId).toBe('missingPrefix');
|
|
74
|
+
expect(options.data.prefix).toBe('| ');
|
|
75
|
+
expect(options.fix).toBeDefined();
|
|
76
|
+
},
|
|
77
|
+
options: [{ prefix: '| ' }],
|
|
78
|
+
};
|
|
79
|
+
const rule = require_test_description_prefix_1.default.create(mockContext);
|
|
80
|
+
const mockNode = {
|
|
81
|
+
type: 'CallExpression',
|
|
82
|
+
callee: { name: 'describe' },
|
|
83
|
+
arguments: [
|
|
84
|
+
{ type: 'Literal', value: 'my test suite' },
|
|
85
|
+
],
|
|
86
|
+
};
|
|
87
|
+
rule.CallExpression(mockNode);
|
|
88
|
+
expect(reportCalled).toBe(true);
|
|
89
|
+
});
|
|
90
|
+
it('| should report when it is missing prefix', () => {
|
|
91
|
+
let reportCalled = false;
|
|
92
|
+
const mockContext = {
|
|
93
|
+
report: (options) => {
|
|
94
|
+
reportCalled = true;
|
|
95
|
+
expect(options.messageId).toBe('missingPrefix');
|
|
96
|
+
expect(options.data.prefix).toBe('| ');
|
|
97
|
+
},
|
|
98
|
+
options: [{ prefix: '| ' }],
|
|
99
|
+
};
|
|
100
|
+
const rule = require_test_description_prefix_1.default.create(mockContext);
|
|
101
|
+
const mockNode = {
|
|
102
|
+
type: 'CallExpression',
|
|
103
|
+
callee: { name: 'it' },
|
|
104
|
+
arguments: [
|
|
105
|
+
{ type: 'Literal', value: 'should do something' },
|
|
106
|
+
],
|
|
107
|
+
};
|
|
108
|
+
rule.CallExpression(mockNode);
|
|
109
|
+
expect(reportCalled).toBe(true);
|
|
110
|
+
});
|
|
111
|
+
it('| should report when describe has wrong prefix', () => {
|
|
112
|
+
let reportCalled = false;
|
|
113
|
+
const mockContext = {
|
|
114
|
+
report: (options) => {
|
|
115
|
+
reportCalled = true;
|
|
116
|
+
expect(options.messageId).toBe('wrongPrefix');
|
|
117
|
+
expect(options.data.prefix).toBe('| ');
|
|
118
|
+
expect(options.data.found).toBe('|');
|
|
119
|
+
},
|
|
120
|
+
options: [{ prefix: '| ' }],
|
|
121
|
+
};
|
|
122
|
+
const rule = require_test_description_prefix_1.default.create(mockContext);
|
|
123
|
+
const mockNode = {
|
|
124
|
+
type: 'CallExpression',
|
|
125
|
+
callee: { name: 'describe' },
|
|
126
|
+
arguments: [
|
|
127
|
+
{ type: 'Literal', value: '|my test suite' },
|
|
128
|
+
],
|
|
129
|
+
};
|
|
130
|
+
rule.CallExpression(mockNode);
|
|
131
|
+
expect(reportCalled).toBe(true);
|
|
132
|
+
});
|
|
133
|
+
it('| should report when it has only pipe without space', () => {
|
|
134
|
+
let reportCalled = false;
|
|
135
|
+
const mockContext = {
|
|
136
|
+
report: (options) => {
|
|
137
|
+
reportCalled = true;
|
|
138
|
+
expect(options.messageId).toBe('wrongPrefix');
|
|
139
|
+
expect(options.data.found).toBe('|');
|
|
140
|
+
},
|
|
141
|
+
options: [{ prefix: '| ' }],
|
|
142
|
+
};
|
|
143
|
+
const rule = require_test_description_prefix_1.default.create(mockContext);
|
|
144
|
+
const mockNode = {
|
|
145
|
+
type: 'CallExpression',
|
|
146
|
+
callee: { name: 'it' },
|
|
147
|
+
arguments: [
|
|
148
|
+
{ type: 'Literal', value: '|should do something' },
|
|
149
|
+
],
|
|
150
|
+
};
|
|
151
|
+
rule.CallExpression(mockNode);
|
|
152
|
+
expect(reportCalled).toBe(true);
|
|
153
|
+
});
|
|
154
|
+
it('| should not report on non-test functions', () => {
|
|
155
|
+
let reportCalled = false;
|
|
156
|
+
const mockContext = {
|
|
157
|
+
report: (options) => {
|
|
158
|
+
reportCalled = true;
|
|
159
|
+
},
|
|
160
|
+
options: [{ prefix: '| ' }],
|
|
161
|
+
};
|
|
162
|
+
const rule = require_test_description_prefix_1.default.create(mockContext);
|
|
163
|
+
const mockNode = {
|
|
164
|
+
type: 'CallExpression',
|
|
165
|
+
callee: { name: 'console' },
|
|
166
|
+
arguments: [
|
|
167
|
+
{ type: 'Literal', value: 'log message' },
|
|
168
|
+
],
|
|
169
|
+
};
|
|
170
|
+
rule.CallExpression(mockNode);
|
|
171
|
+
expect(reportCalled).toBe(false);
|
|
172
|
+
});
|
|
173
|
+
it('| should not report when no arguments provided', () => {
|
|
174
|
+
let reportCalled = false;
|
|
175
|
+
const mockContext = {
|
|
176
|
+
report: (options) => {
|
|
177
|
+
reportCalled = true;
|
|
178
|
+
},
|
|
179
|
+
options: [{ prefix: '| ' }],
|
|
180
|
+
};
|
|
181
|
+
const rule = require_test_description_prefix_1.default.create(mockContext);
|
|
182
|
+
const mockNode = {
|
|
183
|
+
type: 'CallExpression',
|
|
184
|
+
callee: { name: 'describe' },
|
|
185
|
+
arguments: [],
|
|
186
|
+
};
|
|
187
|
+
rule.CallExpression(mockNode);
|
|
188
|
+
expect(reportCalled).toBe(false);
|
|
189
|
+
});
|
|
190
|
+
it('| should not report when first argument is not a string', () => {
|
|
191
|
+
let reportCalled = false;
|
|
192
|
+
const mockContext = {
|
|
193
|
+
report: (options) => {
|
|
194
|
+
reportCalled = true;
|
|
195
|
+
},
|
|
196
|
+
options: [{ prefix: '| ' }],
|
|
197
|
+
};
|
|
198
|
+
const rule = require_test_description_prefix_1.default.create(mockContext);
|
|
199
|
+
const mockNode = {
|
|
200
|
+
type: 'CallExpression',
|
|
201
|
+
callee: { name: 'describe' },
|
|
202
|
+
arguments: [
|
|
203
|
+
{ type: 'Identifier', name: 'myVariable' },
|
|
204
|
+
],
|
|
205
|
+
};
|
|
206
|
+
rule.CallExpression(mockNode);
|
|
207
|
+
expect(reportCalled).toBe(false);
|
|
208
|
+
});
|
|
209
|
+
it('| should handle beforeEach and afterEach', () => {
|
|
210
|
+
let reportCalled = false;
|
|
211
|
+
const mockContext = {
|
|
212
|
+
report: (options) => {
|
|
213
|
+
reportCalled = true;
|
|
214
|
+
expect(options.messageId).toBe('missingPrefix');
|
|
215
|
+
},
|
|
216
|
+
options: [{ prefix: '| ' }],
|
|
217
|
+
};
|
|
218
|
+
const rule = require_test_description_prefix_1.default.create(mockContext);
|
|
219
|
+
const mockNode = {
|
|
220
|
+
type: 'CallExpression',
|
|
221
|
+
callee: { name: 'beforeEach' },
|
|
222
|
+
arguments: [
|
|
223
|
+
{ type: 'Literal', value: 'setup test data' },
|
|
224
|
+
],
|
|
225
|
+
};
|
|
226
|
+
rule.CallExpression(mockNode);
|
|
227
|
+
expect(reportCalled).toBe(true);
|
|
228
|
+
});
|
|
229
|
+
it('| should handle beforeAll and afterAll', () => {
|
|
230
|
+
let reportCalled = false;
|
|
231
|
+
const mockContext = {
|
|
232
|
+
report: (options) => {
|
|
233
|
+
reportCalled = true;
|
|
234
|
+
expect(options.messageId).toBe('missingPrefix');
|
|
235
|
+
},
|
|
236
|
+
options: [{ prefix: '| ' }],
|
|
237
|
+
};
|
|
238
|
+
const rule = require_test_description_prefix_1.default.create(mockContext);
|
|
239
|
+
const mockNode = {
|
|
240
|
+
type: 'CallExpression',
|
|
241
|
+
callee: { name: 'beforeAll' },
|
|
242
|
+
arguments: [
|
|
243
|
+
{ type: 'Literal', value: 'setup suite' },
|
|
244
|
+
],
|
|
245
|
+
};
|
|
246
|
+
rule.CallExpression(mockNode);
|
|
247
|
+
expect(reportCalled).toBe(true);
|
|
248
|
+
});
|
|
249
|
+
it('| should handle custom prefix configuration', () => {
|
|
250
|
+
let reportCalled = false;
|
|
251
|
+
const mockContext = {
|
|
252
|
+
report: (options) => {
|
|
253
|
+
reportCalled = true;
|
|
254
|
+
expect(options.data.prefix).toBe('>>> ');
|
|
255
|
+
},
|
|
256
|
+
options: [{ prefix: '>>> ' }],
|
|
257
|
+
};
|
|
258
|
+
const rule = require_test_description_prefix_1.default.create(mockContext);
|
|
259
|
+
const mockNode = {
|
|
260
|
+
type: 'CallExpression',
|
|
261
|
+
callee: { name: 'describe' },
|
|
262
|
+
arguments: [
|
|
263
|
+
{ type: 'Literal', value: 'my test suite' },
|
|
264
|
+
],
|
|
265
|
+
};
|
|
266
|
+
rule.CallExpression(mockNode);
|
|
267
|
+
expect(reportCalled).toBe(true);
|
|
268
|
+
});
|
|
269
|
+
it('| should handle custom test functions configuration', () => {
|
|
270
|
+
let reportCalled = false;
|
|
271
|
+
const mockContext = {
|
|
272
|
+
report: (options) => {
|
|
273
|
+
reportCalled = true;
|
|
274
|
+
},
|
|
275
|
+
options: [{ testFunctions: ['myTest'] }],
|
|
276
|
+
};
|
|
277
|
+
const rule = require_test_description_prefix_1.default.create(mockContext);
|
|
278
|
+
const mockNode = {
|
|
279
|
+
type: 'CallExpression',
|
|
280
|
+
callee: { name: 'myTest' },
|
|
281
|
+
arguments: [
|
|
282
|
+
{ type: 'Literal', value: 'my test description' },
|
|
283
|
+
],
|
|
284
|
+
};
|
|
285
|
+
rule.CallExpression(mockNode);
|
|
286
|
+
expect(reportCalled).toBe(true);
|
|
287
|
+
});
|
|
288
|
+
it('| should provide auto-fix functionality', () => {
|
|
289
|
+
const mockContext = {
|
|
290
|
+
report: (options) => {
|
|
291
|
+
expect(options.fix).toBeDefined();
|
|
292
|
+
expect(typeof options.fix).toBe('function');
|
|
293
|
+
// Test the fix function
|
|
294
|
+
const fixResult = options.fix({
|
|
295
|
+
replaceText: (node, text) => {
|
|
296
|
+
expect(text).toBe('\'| my test suite\'');
|
|
297
|
+
return [];
|
|
298
|
+
},
|
|
299
|
+
});
|
|
300
|
+
expect(Array.isArray(fixResult)).toBe(true);
|
|
301
|
+
},
|
|
302
|
+
options: [{ prefix: '| ' }],
|
|
303
|
+
};
|
|
304
|
+
const rule = require_test_description_prefix_1.default.create(mockContext);
|
|
305
|
+
const mockNode = {
|
|
306
|
+
type: 'CallExpression',
|
|
307
|
+
callee: { name: 'describe' },
|
|
308
|
+
arguments: [
|
|
309
|
+
{ type: 'Literal', value: 'my test suite' },
|
|
310
|
+
],
|
|
311
|
+
};
|
|
312
|
+
rule.CallExpression(mockNode);
|
|
313
|
+
});
|
|
314
|
+
it('| should handle empty string descriptions', () => {
|
|
315
|
+
let reportCalled = false;
|
|
316
|
+
const mockContext = {
|
|
317
|
+
report: (options) => {
|
|
318
|
+
reportCalled = true;
|
|
319
|
+
expect(options.messageId).toBe('missingPrefix');
|
|
320
|
+
},
|
|
321
|
+
options: [{ prefix: '| ' }],
|
|
322
|
+
};
|
|
323
|
+
const rule = require_test_description_prefix_1.default.create(mockContext);
|
|
324
|
+
const mockNode = {
|
|
325
|
+
type: 'CallExpression',
|
|
326
|
+
callee: { name: 'describe' },
|
|
327
|
+
arguments: [
|
|
328
|
+
{ type: 'Literal', value: '' },
|
|
329
|
+
],
|
|
330
|
+
};
|
|
331
|
+
rule.CallExpression(mockNode);
|
|
332
|
+
expect(reportCalled).toBe(true);
|
|
333
|
+
});
|
|
334
|
+
it('| should handle errors gracefully', () => {
|
|
335
|
+
const mockContext = {
|
|
336
|
+
report: (options) => {
|
|
337
|
+
// Should not throw
|
|
338
|
+
},
|
|
339
|
+
options: [{ prefix: '| ' }],
|
|
340
|
+
};
|
|
341
|
+
const rule = require_test_description_prefix_1.default.create(mockContext);
|
|
342
|
+
// Test with malformed nodes
|
|
343
|
+
const malformedNode = {
|
|
344
|
+
type: 'CallExpression',
|
|
345
|
+
// Missing required properties
|
|
346
|
+
};
|
|
347
|
+
expect(() => {
|
|
348
|
+
rule.CallExpression(malformedNode);
|
|
349
|
+
}).not.toThrow();
|
|
350
|
+
});
|
|
351
|
+
it('| should handle missing callee gracefully', () => {
|
|
352
|
+
let reportCalled = false;
|
|
353
|
+
const mockContext = {
|
|
354
|
+
report: (options) => {
|
|
355
|
+
reportCalled = true;
|
|
356
|
+
},
|
|
357
|
+
options: [{ prefix: '| ' }],
|
|
358
|
+
};
|
|
359
|
+
const rule = require_test_description_prefix_1.default.create(mockContext);
|
|
360
|
+
const mockNode = {
|
|
361
|
+
type: 'CallExpression',
|
|
362
|
+
// Missing callee
|
|
363
|
+
arguments: [
|
|
364
|
+
{ type: 'Literal', value: 'my test suite' },
|
|
365
|
+
],
|
|
366
|
+
};
|
|
367
|
+
rule.CallExpression(mockNode);
|
|
368
|
+
expect(reportCalled).toBe(false);
|
|
369
|
+
});
|
|
370
|
+
});
|
|
371
|
+
//# sourceMappingURL=require-test-description-prefix.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"require-test-description-prefix.spec.js","sourceRoot":"","sources":["../../../src/plugin/rules/require-test-description-prefix.spec.ts"],"names":[],"mappings":";;;AAAA,gHAAsE;AAEtE,QAAQ,CAAC,mCAAmC,EAAE,GAAG,EAAE;IACjD,EAAE,CAAC,iCAAiC,EAAE,GAAG,EAAE;QACzC,MAAM,CAAC,yCAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC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C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eslintrc-audit.js","sourceRoot":"","sources":["../../src/scripts/eslintrc-audit.ts"],"names":[],"mappings":";;AACA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;;;AAEH,kEAA2B;AAC3B,2BAAkC;AAIlC;;;;;;;;;;;;;GAaG;AACH,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,4EAA4E;QAC5E,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,KAAK,UAAU,IAAI;IACjB,8DAA8D;IAC9D,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"eslintrc-audit.js","sourceRoot":"","sources":["../../src/scripts/eslintrc-audit.ts"],"names":[],"mappings":";;AACA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;;;AAEH,kEAA2B;AAC3B,2BAAkC;AAIlC;;;;;;;;;;;;;GAaG;AACH,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,4EAA4E;QAC5E,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,KAAK,UAAU,IAAI;IACjB,8DAA8D;IAC9D,MAAM,KAAK,GAAa,MAAM,IAAA,mBAAE,EAAC,CAAE,mBAAmB,CAAE,EAAE,EAAE,MAAM,EAAE,CAAE,oBAAoB,CAAE,EAAE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package/package.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"test": "npm run lint && npm run validate:imports && npm run validate:naming"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@futdevpro/dynamo-eslint": "
|
|
16
|
+
"@futdevpro/dynamo-eslint": "1.14.4",
|
|
17
17
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
18
18
|
"@typescript-eslint/parser": "^8.0.0",
|
|
19
19
|
"eslint": "^9.0.0",
|
package/src/configs/base.ts
CHANGED
|
@@ -15,16 +15,16 @@ module.exports = [
|
|
|
15
15
|
'node_modules/**',
|
|
16
16
|
'dist/**',
|
|
17
17
|
'build/**',
|
|
18
|
-
'*.d.ts'
|
|
19
|
-
]
|
|
18
|
+
'*.d.ts',
|
|
19
|
+
],
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
|
-
files: ['**/*.ts', '**/*.tsx'],
|
|
22
|
+
files: [ '**/*.ts', '**/*.tsx' ],
|
|
23
23
|
languageOptions: {
|
|
24
24
|
parser: tsParser,
|
|
25
25
|
parserOptions: {
|
|
26
26
|
ecmaVersion: 'latest',
|
|
27
|
-
sourceType: 'module'
|
|
27
|
+
sourceType: 'module',
|
|
28
28
|
},
|
|
29
29
|
globals: {
|
|
30
30
|
// Browser globals
|
|
@@ -38,8 +38,8 @@ module.exports = [
|
|
|
38
38
|
__filename: 'readonly',
|
|
39
39
|
module: 'readonly',
|
|
40
40
|
require: 'readonly',
|
|
41
|
-
exports: 'readonly'
|
|
42
|
-
}
|
|
41
|
+
exports: 'readonly',
|
|
42
|
+
},
|
|
43
43
|
},
|
|
44
44
|
plugins: {
|
|
45
45
|
'@typescript-eslint': tsPlugin,
|
|
@@ -49,24 +49,36 @@ module.exports = [
|
|
|
49
49
|
},
|
|
50
50
|
rules: {
|
|
51
51
|
// ESLint recommended rules
|
|
52
|
-
'no-warning-comments': ['warn', { terms: ['todo', 'fixme', 'removable', '??'], location: 'anywhere' }],
|
|
53
|
-
'indent': ['warn', 2, { SwitchCase: 1 }],
|
|
54
|
-
'max-len': ['warn', { code: 120, comments: 120 }],
|
|
55
|
-
'max-lines': ['warn', 1000],
|
|
52
|
+
'no-warning-comments': [ 'warn', { terms: [ 'todo', 'fixme', 'removable', '??' ], location: 'anywhere' }],
|
|
53
|
+
'indent': [ 'warn', 2, { SwitchCase: 1 }],
|
|
54
|
+
'max-len': [ 'warn', { code: 120, comments: 120 }],
|
|
55
|
+
'max-lines': [ 'warn', 1000 ],
|
|
56
56
|
'linebreak-style': 'off',
|
|
57
|
-
'semi': ['warn', 'always'],
|
|
57
|
+
'semi': [ 'warn', 'always' ],
|
|
58
58
|
'no-unused-vars': 'off',
|
|
59
59
|
'no-prototype-builtins': 'off',
|
|
60
60
|
'no-empty': 'warn',
|
|
61
|
-
'comma-dangle': [
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
'comma-dangle': [
|
|
62
|
+
'warn',
|
|
63
|
+
{
|
|
64
|
+
arrays: 'always-multiline',
|
|
65
|
+
objects: 'always-multiline',
|
|
66
|
+
functions: 'only-multiline',
|
|
67
|
+
imports: 'never',
|
|
68
|
+
exports: 'never',
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
'brace-style': [ 'warn', '1tbs', { allowSingleLine: false }],
|
|
72
|
+
'curly': [ 'warn', 'all' ],
|
|
73
|
+
'object-curly-spacing': [ 'warn', 'always' ],
|
|
74
|
+
'array-bracket-spacing': [ 'warn', 'always', { objectsInArrays: false, arraysInArrays: false }],
|
|
65
75
|
'padding-line-between-statements': [
|
|
66
76
|
'warn',
|
|
67
|
-
{ blankLine: 'always', prev: '*', next: ['return','throw','if','for','while','switch','default'] },
|
|
68
|
-
{ blankLine: 'always', prev: ['const','let','var','break'], next: '*' },
|
|
69
|
-
{ blankLine: 'any', prev: ['const','let','var'], next: ['const','let','var'] },
|
|
77
|
+
{ blankLine: 'always', prev: '*', next: [ 'return','throw','if','for','while','switch','default' ] },
|
|
78
|
+
{ blankLine: 'always', prev: [ 'const','let','var','break' ], next: '*' },
|
|
79
|
+
{ blankLine: 'any', prev: [ 'const','let','var' ], next: [ 'const','let','var' ] },
|
|
80
|
+
{ blankLine: 'any', prev: '*', next: 'import' },
|
|
81
|
+
{ blankLine: 'any', prev: 'import', next: '*' },
|
|
70
82
|
],
|
|
71
83
|
'prefer-const': 'warn',
|
|
72
84
|
'no-case-declarations': 'off',
|
|
@@ -74,15 +86,21 @@ module.exports = [
|
|
|
74
86
|
'keyword-spacing': 'warn',
|
|
75
87
|
'no-else-return': 'warn',
|
|
76
88
|
'no-duplicate-imports': 'warn',
|
|
77
|
-
'max-params': ['warn', 4],
|
|
78
|
-
'max-params-no-constructor/max-params-no-constructor': ['warn', 5],
|
|
79
|
-
'quotes': ['warn', 'single', { allowTemplateLiterals: true }],
|
|
89
|
+
'max-params': [ 'warn', 4 ],
|
|
90
|
+
'max-params-no-constructor/max-params-no-constructor': [ 'warn', 5 ],
|
|
91
|
+
'quotes': [ 'warn', 'single', { allowTemplateLiterals: true }],
|
|
80
92
|
|
|
81
93
|
// TypeScript rules
|
|
82
94
|
'@typescript-eslint/no-unused-vars': 'warn',
|
|
83
|
-
'@typescript-eslint/explicit-function-return-type': ['warn', { allowTypedFunctionExpressions: false }],
|
|
95
|
+
'@typescript-eslint/explicit-function-return-type': [ 'warn', { allowTypedFunctionExpressions: false }],
|
|
84
96
|
'@typescript-eslint/no-explicit-any': 'warn',
|
|
85
|
-
'@typescript-eslint/typedef':
|
|
97
|
+
'@typescript-eslint/typedef': [
|
|
98
|
+
'warn',
|
|
99
|
+
{
|
|
100
|
+
parameter: true, // Enforce parameter type annotations
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
'@typescript-eslint/no-unnecessary-type-assertion': 'warn',
|
|
86
104
|
|
|
87
105
|
// Dynamo custom rules
|
|
88
106
|
'@futdevpro/dynamo/explicit-types': 'warn',
|
|
@@ -90,6 +108,10 @@ module.exports = [
|
|
|
90
108
|
'@futdevpro/dynamo/naming-patterns': 'warn',
|
|
91
109
|
'@futdevpro/dynamo/no-import-type': 'warn',
|
|
92
110
|
'@futdevpro/dynamo/no-js-import': 'warn',
|
|
111
|
+
'@futdevpro/dynamo/prefer-interface-over-duplicate-types': [ 'warn', { threshold: 3 }],
|
|
112
|
+
'@futdevpro/dynamo/require-jsdoc-description': [ 'warn', { scope: 'public' }],
|
|
113
|
+
'@futdevpro/dynamo/prefer-enum-over-string-union': [ 'warn', { minValues: 3 }],
|
|
114
|
+
'@futdevpro/dynamo/require-test-description-prefix': [ 'warn', { prefix: '| ' }],
|
|
93
115
|
},
|
|
94
116
|
},
|
|
95
117
|
];
|
package/src/plugin/index.ts
CHANGED
|
@@ -3,6 +3,10 @@ import importOrderRule from './rules/import/import-order';
|
|
|
3
3
|
import namingPatternsRule from './rules/naming-patterns';
|
|
4
4
|
import noImportTypeRule from './rules/import/no-import-type';
|
|
5
5
|
import noJsExtensionRule from './rules/import/no-js-import';
|
|
6
|
+
import preferInterfaceRule from './rules/prefer-interface-over-duplicate-types';
|
|
7
|
+
import requireJSDocRule from './rules/require-jsdoc-description';
|
|
8
|
+
import preferEnumRule from './rules/prefer-enum-over-string-union';
|
|
9
|
+
import requireTestPrefixRule from './rules/require-test-description-prefix';
|
|
6
10
|
|
|
7
11
|
export = {
|
|
8
12
|
rules: {
|
|
@@ -10,6 +14,10 @@ export = {
|
|
|
10
14
|
'import-order': importOrderRule,
|
|
11
15
|
'no-import-type': noImportTypeRule,
|
|
12
16
|
'no-js-import': noJsExtensionRule,
|
|
17
|
+
'prefer-interface-over-duplicate-types': preferInterfaceRule,
|
|
18
|
+
'require-jsdoc-description': requireJSDocRule,
|
|
19
|
+
'prefer-enum-over-string-union': preferEnumRule,
|
|
20
|
+
'require-test-description-prefix': requireTestPrefixRule,
|
|
13
21
|
|
|
14
22
|
'naming-patterns': namingPatternsRule,
|
|
15
23
|
},
|
|
@@ -20,6 +28,10 @@ export = {
|
|
|
20
28
|
'@futdevpro/dynamo/import-order': 'warn',
|
|
21
29
|
'@futdevpro/dynamo/no-import-type': 'warn',
|
|
22
30
|
'@futdevpro/dynamo/no-js-import': 'warn',
|
|
31
|
+
'@futdevpro/dynamo/prefer-interface-over-duplicate-types': 'warn',
|
|
32
|
+
'@futdevpro/dynamo/require-jsdoc-description': 'warn',
|
|
33
|
+
'@futdevpro/dynamo/prefer-enum-over-string-union': 'warn',
|
|
34
|
+
'@futdevpro/dynamo/require-test-description-prefix': 'warn',
|
|
23
35
|
|
|
24
36
|
'@futdevpro/dynamo/naming-patterns': 'warn',
|
|
25
37
|
},
|
|
@@ -25,7 +25,7 @@ const rule: Rule.RuleModule = {
|
|
|
25
25
|
// Check return type
|
|
26
26
|
if (!node.returnType) {
|
|
27
27
|
context.report({
|
|
28
|
-
node,
|
|
28
|
+
node: node.id || node, // Report on function name if available
|
|
29
29
|
messageId: 'missingReturnType',
|
|
30
30
|
data: { name: node.id?.name || 'anonymous' },
|
|
31
31
|
});
|
|
@@ -58,7 +58,7 @@ const rule: Rule.RuleModule = {
|
|
|
58
58
|
// Check return type
|
|
59
59
|
if (!node.returnType) {
|
|
60
60
|
context.report({
|
|
61
|
-
node,
|
|
61
|
+
node: node.params.length > 0 ? node.params[0] : node, // Report on first param or node
|
|
62
62
|
messageId: 'missingArrowReturnType',
|
|
63
63
|
});
|
|
64
64
|
}
|
|
@@ -93,6 +93,23 @@ const rule: Rule.RuleModule = {
|
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
if (!node.id.typeAnnotation) {
|
|
96
|
+
// Check if this variable is declared in a for loop
|
|
97
|
+
let isInForLoop = false;
|
|
98
|
+
let parent = node.parent;
|
|
99
|
+
|
|
100
|
+
while (parent) {
|
|
101
|
+
if (parent.type === 'ForStatement' || parent.type === 'ForInStatement' || parent.type === 'ForOfStatement') {
|
|
102
|
+
isInForLoop = true;
|
|
103
|
+
break;
|
|
104
|
+
}
|
|
105
|
+
parent = parent.parent;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Skip if variable is in a for loop
|
|
109
|
+
if (isInForLoop) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
|
|
96
113
|
// Skip if variable is initialized with a typed value that can be inferred
|
|
97
114
|
const hasTypedInitializer = node.init && (
|
|
98
115
|
node.init.type === 'CallExpression' ||
|
|
@@ -113,11 +113,6 @@ const rule: Rule.RuleModule = {
|
|
|
113
113
|
context.report({
|
|
114
114
|
node: importNode,
|
|
115
115
|
messageId: 'misordered',
|
|
116
|
-
fix(fixer) {
|
|
117
|
-
// This is complex to fix automatically, so we'll just report for now
|
|
118
|
-
// Future enhancement: reorder imports automatically
|
|
119
|
-
return null;
|
|
120
|
-
},
|
|
121
116
|
});
|
|
122
117
|
}
|
|
123
118
|
|
|
@@ -139,10 +134,6 @@ const rule: Rule.RuleModule = {
|
|
|
139
134
|
context.report({
|
|
140
135
|
node: firstImportOfNextGroup,
|
|
141
136
|
messageId: 'missingEmptyLine',
|
|
142
|
-
fix(fixer) {
|
|
143
|
-
// Add empty line before the first import of next group
|
|
144
|
-
return fixer.insertTextBefore(firstImportOfNextGroup, '\n');
|
|
145
|
-
},
|
|
146
137
|
});
|
|
147
138
|
}
|
|
148
139
|
}
|