@futdevpro/dynamo-eslint 1.14.35 → 1.15.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.
Files changed (74) hide show
  1. package/.cursor/rules/__assistant_guide.mdc +30 -0
  2. package/.cursor/rules/__main.mdc +62 -0
  3. package/.cursor/rules/_ag_backend-structure.mdc +86 -0
  4. package/.cursor/rules/_ag_backend.mdc +16 -0
  5. package/.cursor/rules/_ag_debug.mdc +8 -0
  6. package/.cursor/rules/_ag_documentation_writing_rules.mdc +372 -0
  7. package/.cursor/rules/_ag_file-refactoring.mdc +113 -0
  8. package/.cursor/rules/_ag_fixes_rules.mdc +6 -0
  9. package/.cursor/rules/_ag_frontend-structure.mdc +87 -0
  10. package/.cursor/rules/_ag_frontend.mdc +40 -0
  11. package/.cursor/rules/_ag_import-rules.mdc +45 -0
  12. package/.cursor/rules/_ag_naming.mdc +116 -0
  13. package/.cursor/rules/_ag_running_commands.mdc +5 -0
  14. package/.cursor/rules/_ag_server-controller.mdc +6 -0
  15. package/.cursor/rules/_ag_should-be.mdc +7 -0
  16. package/.cursor/rules/_ag_swearing.mdc +47 -0
  17. package/.cursor/rules/ai_development_guide.md +61 -0
  18. package/.cursor/rules/ai_directives.md +114 -0
  19. package/.cursor/rules/cursor-rules.md +160 -0
  20. package/.cursor/rules/default-command.mdc +229 -0
  21. package/.cursor/rules/error_code_pattern.md +40 -0
  22. package/.cursor/rules/saved rule mcp server use.md +16 -0
  23. package/futdevpro-dynamo-eslint-1.15.2.tgz +0 -0
  24. package/package.json +2 -2
  25. package/samples/package.json.example +1 -1
  26. package/build/plugin/rules/explicit-types.spec.d.ts +0 -2
  27. package/build/plugin/rules/explicit-types.spec.d.ts.map +0 -1
  28. package/build/plugin/rules/explicit-types.spec.js +0 -162
  29. package/build/plugin/rules/explicit-types.spec.js.map +0 -1
  30. package/build/plugin/rules/import/import-order.spec.d.ts +0 -2
  31. package/build/plugin/rules/import/import-order.spec.d.ts.map +0 -1
  32. package/build/plugin/rules/import/import-order.spec.js +0 -197
  33. package/build/plugin/rules/import/import-order.spec.js.map +0 -1
  34. package/build/plugin/rules/import/no-import-type.spec.d.ts +0 -2
  35. package/build/plugin/rules/import/no-import-type.spec.d.ts.map +0 -1
  36. package/build/plugin/rules/import/no-import-type.spec.js +0 -60
  37. package/build/plugin/rules/import/no-import-type.spec.js.map +0 -1
  38. package/build/plugin/rules/import/no-js-import.spec.d.ts +0 -2
  39. package/build/plugin/rules/import/no-js-import.spec.d.ts.map +0 -1
  40. package/build/plugin/rules/import/no-js-import.spec.js +0 -68
  41. package/build/plugin/rules/import/no-js-import.spec.js.map +0 -1
  42. package/build/plugin/rules/naming-patterns.spec.d.ts +0 -2
  43. package/build/plugin/rules/naming-patterns.spec.d.ts.map +0 -1
  44. package/build/plugin/rules/naming-patterns.spec.js +0 -36
  45. package/build/plugin/rules/naming-patterns.spec.js.map +0 -1
  46. package/build/plugin/rules/no-getter-logic.spec.d.ts +0 -2
  47. package/build/plugin/rules/no-getter-logic.spec.d.ts.map +0 -1
  48. package/build/plugin/rules/no-getter-logic.spec.js +0 -461
  49. package/build/plugin/rules/no-getter-logic.spec.js.map +0 -1
  50. package/build/plugin/rules/prefer-enum-over-string-union.spec.d.ts +0 -2
  51. package/build/plugin/rules/prefer-enum-over-string-union.spec.d.ts.map +0 -1
  52. package/build/plugin/rules/prefer-enum-over-string-union.spec.js +0 -505
  53. package/build/plugin/rules/prefer-enum-over-string-union.spec.js.map +0 -1
  54. package/build/plugin/rules/prefer-interface-over-duplicate-types.spec.d.ts +0 -2
  55. package/build/plugin/rules/prefer-interface-over-duplicate-types.spec.d.ts.map +0 -1
  56. package/build/plugin/rules/prefer-interface-over-duplicate-types.spec.js +0 -324
  57. package/build/plugin/rules/prefer-interface-over-duplicate-types.spec.js.map +0 -1
  58. package/build/plugin/rules/require-jsdoc-description.spec.d.ts +0 -2
  59. package/build/plugin/rules/require-jsdoc-description.spec.d.ts.map +0 -1
  60. package/build/plugin/rules/require-jsdoc-description.spec.js +0 -546
  61. package/build/plugin/rules/require-jsdoc-description.spec.js.map +0 -1
  62. package/build/plugin/rules/require-test-description-prefix.spec.d.ts +0 -2
  63. package/build/plugin/rules/require-test-description-prefix.spec.d.ts.map +0 -1
  64. package/build/plugin/rules/require-test-description-prefix.spec.js +0 -371
  65. package/build/plugin/rules/require-test-description-prefix.spec.js.map +0 -1
  66. package/build-test/plugin/rules/import-order.d.ts +0 -3
  67. package/build-test/plugin/rules/import-order.js +0 -23
  68. package/build-test/plugin/rules/import-order.spec.d.ts +0 -1
  69. package/build-test/plugin/rules/import-order.spec.js +0 -44
  70. package/build-test/plugin/rules/naming-patterns.d.ts +0 -3
  71. package/build-test/plugin/rules/naming-patterns.js +0 -22
  72. package/build-test/plugin/rules/naming-patterns.spec.d.ts +0 -1
  73. package/build-test/plugin/rules/naming-patterns.spec.js +0 -41
  74. package/futdevpro-dynamo-eslint-1.14.35.tgz +0 -0
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=import-order.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"import-order.spec.d.ts","sourceRoot":"","sources":["../../../../src/plugin/rules/import/import-order.spec.ts"],"names":[],"mappings":""}
@@ -1,197 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const import_order_1 = tslib_1.__importDefault(require("./import-order"));
5
- describe('| import-order', () => {
6
- it('| should be a valid ESLint rule', () => {
7
- expect(import_order_1.default.meta?.type).toBe('suggestion');
8
- expect(import_order_1.default.meta?.docs?.description).toContain('import ordering');
9
- expect(import_order_1.default.meta?.fixable).toBe('code');
10
- });
11
- it('| should have create function that returns object with Program method', () => {
12
- const mockContext = {
13
- getSourceCode: () => ({
14
- ast: {},
15
- getLines: () => ['line1', 'line2', 'line3'],
16
- }),
17
- getFilename: () => 'test.ts',
18
- report: () => { },
19
- };
20
- const result = import_order_1.default.create(mockContext);
21
- expect(typeof result).toBe('object');
22
- expect(typeof result.Program).toBe('function');
23
- });
24
- it('| should detect forbidden NPM-packages imports', () => {
25
- const mockContext = {
26
- sourceCode: {
27
- ast: {},
28
- getLines: () => ['import { Something } from \'../../../NPM-packages/some-package\';'],
29
- },
30
- filename: 'test.ts',
31
- report: (options) => {
32
- expect(options.messageId).toBe('forbiddenNpmPackages');
33
- },
34
- };
35
- const mockNode = {
36
- type: 'Program',
37
- sourceType: 'module',
38
- body: [
39
- {
40
- type: 'ImportDeclaration',
41
- source: { value: '../../../NPM-packages/some-package' },
42
- importKind: 'value',
43
- loc: { start: { line: 1 }, end: { line: 1 } },
44
- },
45
- ],
46
- };
47
- const rule = import_order_1.default.create(mockContext);
48
- rule.Program(mockNode);
49
- });
50
- it('| should detect forbidden .js extension imports', () => {
51
- const mockContext = {
52
- sourceCode: {
53
- ast: {},
54
- getLines: () => ['import { Something } from \'./some-file.js\';'],
55
- },
56
- filename: 'test.ts',
57
- report: (options) => {
58
- expect(options.messageId).toBe('forbiddenJsExtension');
59
- },
60
- };
61
- const mockNode = {
62
- type: 'Program',
63
- sourceType: 'module',
64
- body: [
65
- {
66
- type: 'ImportDeclaration',
67
- source: { value: './some-file.js' },
68
- importKind: 'value',
69
- loc: { start: { line: 1 }, end: { line: 1 } },
70
- },
71
- ],
72
- };
73
- const rule = import_order_1.default.create(mockContext);
74
- rule.Program(mockNode);
75
- });
76
- it('| should detect forbidden import type usage', () => {
77
- const mockContext = {
78
- sourceCode: {
79
- ast: {},
80
- getLines: () => ['import type { SomeType } from \'./some-file\';'],
81
- },
82
- filename: 'test.ts',
83
- report: (options) => {
84
- expect(options.messageId).toBe('forbiddenImportType');
85
- },
86
- };
87
- const mockNode = {
88
- type: 'Program',
89
- sourceType: 'module',
90
- body: [
91
- {
92
- type: 'ImportDeclaration',
93
- source: { value: './some-file' },
94
- importKind: 'type',
95
- loc: { start: { line: 1 }, end: { line: 1 } },
96
- },
97
- ],
98
- };
99
- const rule = import_order_1.default.create(mockContext);
100
- rule.Program(mockNode);
101
- });
102
- it('| should detect misordered imports', () => {
103
- let reportCount = 0;
104
- const mockContext = {
105
- sourceCode: {
106
- ast: {},
107
- getLines: () => [
108
- 'import { DyFM_Error } from \'@futdevpro/fsm-dynamo\';',
109
- 'import { Component } from \'@angular/core\';',
110
- ],
111
- },
112
- filename: 'test.ts',
113
- report: (options) => {
114
- if (options.messageId === 'misordered') {
115
- reportCount++;
116
- }
117
- },
118
- };
119
- const mockNode = {
120
- type: 'Program',
121
- sourceType: 'module',
122
- body: [
123
- {
124
- type: 'ImportDeclaration',
125
- source: { value: '@futdevpro/fsm-dynamo' },
126
- importKind: 'value',
127
- loc: { start: { line: 1 }, end: { line: 1 } },
128
- },
129
- {
130
- type: 'ImportDeclaration',
131
- source: { value: '@angular/core' },
132
- importKind: 'value',
133
- loc: { start: { line: 2 }, end: { line: 2 } },
134
- },
135
- ],
136
- };
137
- const rule = import_order_1.default.create(mockContext);
138
- rule.Program(mockNode);
139
- expect(reportCount).toBeGreaterThan(0);
140
- });
141
- it('| should detect missing empty line between groups', () => {
142
- let reportCount = 0;
143
- let hasFix = false;
144
- const mockContext = {
145
- sourceCode: {
146
- ast: {},
147
- getLines: () => [
148
- 'import { Component } from \'@angular/core\';',
149
- 'import { DyFM_Error } from \'@futdevpro/fsm-dynamo\';',
150
- ],
151
- getText: (node) => {
152
- if (node.source?.value === '@angular/core') {
153
- return 'import { Component } from \'@angular/core\';';
154
- }
155
- if (node.source?.value === '@futdevpro/fsm-dynamo') {
156
- return 'import { DyFM_Error } from \'@futdevpro/fsm-dynamo\';';
157
- }
158
- return '';
159
- },
160
- },
161
- filename: 'test.ts',
162
- report: (options) => {
163
- if (options.messageId === 'misordered') {
164
- reportCount++;
165
- }
166
- if (options.fix) {
167
- hasFix = true;
168
- }
169
- },
170
- };
171
- const mockNode = {
172
- type: 'Program',
173
- sourceType: 'module',
174
- body: [
175
- {
176
- type: 'ImportDeclaration',
177
- source: { value: '@angular/core' },
178
- importKind: 'value',
179
- loc: { start: { line: 1 }, end: { line: 1 } },
180
- range: [0, 40],
181
- },
182
- {
183
- type: 'ImportDeclaration',
184
- source: { value: '@futdevpro/fsm-dynamo' },
185
- importKind: 'value',
186
- loc: { start: { line: 2 }, end: { line: 2 } },
187
- range: [41, 85],
188
- },
189
- ],
190
- };
191
- const rule = import_order_1.default.create(mockContext);
192
- rule.Program(mockNode);
193
- expect(reportCount).toBeGreaterThan(0);
194
- expect(hasFix).toBe(true);
195
- });
196
- });
197
- //# sourceMappingURL=import-order.spec.js.map
@@ -1 +0,0 @@
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,CAAC;YACF,WAAW,EAAE,GAAG,EAAE,CAAC,SAAS;YAC5B,MAAM,EAAE,GAAG,EAAE,GAAE,CAAC;SACV,CAAC;QAET,MAAM,MAAM,GAAG,sBA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AAU,EAAE,OAAO;oBACnB,GAAG,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE;oBAC7C,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;iBACf;gBACD;oBACE,IAAI,EAAE,mBAAmB;oBACzB,MAAM,EAAE,EAAE,KAAK,EAAE,uBAAuB,EAAE;oBAC1C,UAAU,EAAE,OAAO;oBACnB,GAAG,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE;oBAC7C,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;iBAChB;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;QACvC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=no-import-type.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"no-import-type.spec.d.ts","sourceRoot":"","sources":["../../../../src/plugin/rules/import/no-import-type.spec.ts"],"names":[],"mappings":""}
@@ -1,60 +0,0 @@
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
@@ -1 +0,0 @@
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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B,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QAElD,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,gDAAgD,EAAE,GAAG,EAAE;QACxD,MAAM,WAAW,GAAG;YAClB,UAAU,EAAE;gBACV,OAAO,EAAE,CAAC,IAAS,EAAE,EAAE,CAAC,2CAA2C;aACpE;YACD,MAAM,EAAE,CAAC,OAAY,EAAE,EAAE;gBACvB,2CAA2C;gBAC3C,IAAI,CAAC,8CAA8C,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"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=no-js-import.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"no-js-import.spec.d.ts","sourceRoot":"","sources":["../../../../src/plugin/rules/import/no-js-import.spec.ts"],"names":[],"mappings":""}
@@ -1,68 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"no-js-import.spec.js","sourceRoot":"","sources":["../../../../src/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AE,CAAC,EAAE,EAAE;SACvC,CAAC;QAET,MAAM,IAAI,GAAG,sBAAiB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QAEnD,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"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=naming-patterns.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"naming-patterns.spec.d.ts","sourceRoot":"","sources":["../../../src/plugin/rules/naming-patterns.spec.ts"],"names":[],"mappings":""}
@@ -1,36 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const naming_patterns_1 = tslib_1.__importDefault(require("./naming-patterns"));
5
- describe('| naming-patterns', () => {
6
- it('| should be a valid ESLint rule', () => {
7
- expect(naming_patterns_1.default.meta?.type).toBe('suggestion');
8
- expect(naming_patterns_1.default.meta?.docs?.description).toContain('naming conventions');
9
- });
10
- it('| should have create function that returns object with Identifier method', () => {
11
- const mockContext = {
12
- report: () => { },
13
- };
14
- const result = naming_patterns_1.default.create(mockContext);
15
- expect(typeof result).toBe('object');
16
- expect(typeof result.Identifier).toBe('function');
17
- });
18
- it('| should handle valid identifiers without errors', () => {
19
- const mockContext = {
20
- report: (options) => {
21
- // Should not be called for valid identifiers
22
- fail('Should not report errors for valid identifiers');
23
- },
24
- };
25
- const mockNode = {
26
- type: 'Identifier',
27
- name: 'validVariableName',
28
- loc: { start: { line: 1 }, end: { line: 1 } },
29
- };
30
- const rule = naming_patterns_1.default.create(mockContext);
31
- rule.Identifier(mockNode);
32
- // If we get here without the report function being called, the test passes
33
- expect(true).toBe(true);
34
- });
35
- });
36
- //# sourceMappingURL=naming-patterns.spec.js.map
@@ -1 +0,0 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C,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"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=no-getter-logic.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"no-getter-logic.spec.d.ts","sourceRoot":"","sources":["../../../src/plugin/rules/no-getter-logic.spec.ts"],"names":[],"mappings":""}