@ngrx/eslint-plugin 18.0.0-beta.1 → 18.0.0-rc.0

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 (205) hide show
  1. package/jest.config.d.ts +15 -0
  2. package/package.json +3 -5
  3. package/schematics/ng-add/index.d.ts +3 -0
  4. package/schematics/ng-add/index.js +32 -20
  5. package/schematics/ng-add/index.js.map +1 -1
  6. package/schematics/ng-add/schema.d.ts +3 -0
  7. package/schematics/ng-add/schema.js.map +1 -1
  8. package/schematics/ng-add/schema.json +16 -51
  9. package/scripts/generate-config.d.ts +1 -0
  10. package/scripts/generate-config.js +73 -73
  11. package/scripts/generate-config.js.map +1 -1
  12. package/scripts/generate-docs.d.ts +1 -0
  13. package/scripts/generate-docs.js +33 -65
  14. package/scripts/generate-docs.js.map +1 -1
  15. package/scripts/generate-overview.d.ts +1 -0
  16. package/scripts/generate-overview.js +43 -75
  17. package/scripts/generate-overview.js.map +1 -1
  18. package/spec/utils/from-fixture.d.ts +8 -0
  19. package/spec/utils/from-fixture.js +62 -0
  20. package/spec/utils/from-fixture.js.map +1 -0
  21. package/spec/utils/index.d.ts +2 -0
  22. package/spec/utils/index.js +16 -19
  23. package/spec/utils/index.js.map +1 -1
  24. package/spec/utils/rule-tester.d.ts +5 -0
  25. package/spec/utils/rule-tester.js +23 -0
  26. package/spec/utils/rule-tester.js.map +1 -0
  27. package/src/configs/all.d.ts +7 -0
  28. package/src/configs/all.js +56 -32
  29. package/src/configs/all.js.map +1 -1
  30. package/src/configs/all.json +42 -0
  31. package/src/configs/component-store.d.ts +7 -0
  32. package/src/configs/component-store.js +23 -8
  33. package/src/configs/component-store.js.map +1 -1
  34. package/src/configs/component-store.json +9 -0
  35. package/src/configs/effects.d.ts +7 -0
  36. package/src/configs/effects.js +32 -11
  37. package/src/configs/effects.js.map +1 -1
  38. package/src/configs/effects.json +13 -0
  39. package/src/configs/operators.d.ts +7 -0
  40. package/src/configs/operators.js +28 -0
  41. package/src/configs/operators.js.map +1 -0
  42. package/src/configs/operators.json +7 -0
  43. package/src/configs/signals.d.ts +7 -0
  44. package/src/configs/signals.js +34 -0
  45. package/src/configs/signals.js.map +1 -0
  46. package/src/configs/signals.json +8 -0
  47. package/src/configs/store.d.ts +7 -0
  48. package/src/configs/store.js +38 -23
  49. package/src/configs/store.js.map +1 -1
  50. package/src/configs/store.json +24 -0
  51. package/src/index.d.ts +141 -0
  52. package/src/index.js +18 -3
  53. package/src/index.js.map +1 -1
  54. package/src/rule-creator.d.ts +24 -0
  55. package/src/rule-creator.js +12 -58
  56. package/src/rule-creator.js.map +1 -1
  57. package/src/rules/component-store/avoid-combining-component-store-selectors.d.ts +3 -0
  58. package/src/rules/component-store/avoid-combining-component-store-selectors.js +22 -47
  59. package/src/rules/component-store/avoid-combining-component-store-selectors.js.map +1 -1
  60. package/src/rules/component-store/avoid-mapping-component-store-selectors.d.ts +3 -0
  61. package/src/rules/component-store/avoid-mapping-component-store-selectors.js +17 -20
  62. package/src/rules/component-store/avoid-mapping-component-store-selectors.js.map +1 -1
  63. package/src/rules/component-store/updater-explicit-return-type.d.ts +3 -0
  64. package/src/rules/component-store/updater-explicit-return-type.js +17 -20
  65. package/src/rules/component-store/updater-explicit-return-type.js.map +1 -1
  66. package/src/rules/effects/avoid-cyclic-effects.d.ts +4 -0
  67. package/src/rules/effects/avoid-cyclic-effects.js +47 -109
  68. package/src/rules/effects/avoid-cyclic-effects.js.map +1 -1
  69. package/src/rules/effects/no-dispatch-in-effects.d.ts +5 -0
  70. package/src/rules/effects/no-dispatch-in-effects.js +17 -21
  71. package/src/rules/effects/no-dispatch-in-effects.js.map +1 -1
  72. package/src/rules/effects/no-effects-in-providers.d.ts +3 -0
  73. package/src/rules/effects/no-effects-in-providers.js +18 -49
  74. package/src/rules/effects/no-effects-in-providers.js.map +1 -1
  75. package/src/rules/effects/no-multiple-actions-in-effects.d.ts +5 -0
  76. package/src/rules/effects/no-multiple-actions-in-effects.js +31 -24
  77. package/src/rules/effects/no-multiple-actions-in-effects.js.map +1 -1
  78. package/src/rules/effects/prefer-action-creator-in-of-type.d.ts +3 -0
  79. package/src/rules/effects/prefer-action-creator-in-of-type.js +10 -13
  80. package/src/rules/effects/prefer-action-creator-in-of-type.js.map +1 -1
  81. package/src/rules/effects/prefer-effect-callback-in-block-statement.d.ts +4 -0
  82. package/src/rules/effects/prefer-effect-callback-in-block-statement.js +24 -43
  83. package/src/rules/effects/prefer-effect-callback-in-block-statement.js.map +1 -1
  84. package/src/rules/effects/use-effects-lifecycle-interface.d.ts +3 -0
  85. package/src/rules/effects/use-effects-lifecycle-interface.js +21 -24
  86. package/src/rules/effects/use-effects-lifecycle-interface.js.map +1 -1
  87. package/src/rules/index.d.ts +33 -0
  88. package/src/rules/index.js +69 -53
  89. package/src/rules/index.js.map +1 -1
  90. package/src/rules/operators/prefer-concat-latest-from.d.ts +7 -0
  91. package/src/rules/operators/prefer-concat-latest-from.js +123 -0
  92. package/src/rules/operators/prefer-concat-latest-from.js.map +1 -0
  93. package/src/rules/signals/signal-state-no-arrays-at-root-level.d.ts +3 -0
  94. package/src/rules/signals/signal-state-no-arrays-at-root-level.js +59 -0
  95. package/src/rules/signals/signal-state-no-arrays-at-root-level.js.map +1 -0
  96. package/src/rules/signals/with-state-no-arrays-at-root-level.d.ts +4 -0
  97. package/src/rules/signals/with-state-no-arrays-at-root-level.js +72 -0
  98. package/src/rules/signals/with-state-no-arrays-at-root-level.js.map +1 -0
  99. package/src/rules/store/avoid-combining-selectors.d.ts +3 -0
  100. package/src/rules/store/avoid-combining-selectors.js +20 -45
  101. package/src/rules/store/avoid-combining-selectors.js.map +1 -1
  102. package/src/rules/store/avoid-dispatching-multiple-actions-sequentially.d.ts +3 -0
  103. package/src/rules/store/avoid-dispatching-multiple-actions-sequentially.js +20 -47
  104. package/src/rules/store/avoid-dispatching-multiple-actions-sequentially.js.map +1 -1
  105. package/src/rules/store/avoid-duplicate-actions-in-reducer.d.ts +5 -0
  106. package/src/rules/store/avoid-duplicate-actions-in-reducer.js +33 -101
  107. package/src/rules/store/avoid-duplicate-actions-in-reducer.js.map +1 -1
  108. package/src/rules/store/avoid-mapping-selectors.d.ts +3 -0
  109. package/src/rules/store/avoid-mapping-selectors.js +24 -30
  110. package/src/rules/store/avoid-mapping-selectors.js.map +1 -1
  111. package/src/rules/store/good-action-hygiene.d.ts +3 -0
  112. package/src/rules/store/good-action-hygiene.js +14 -34
  113. package/src/rules/store/good-action-hygiene.js.map +1 -1
  114. package/src/rules/store/no-multiple-global-stores.d.ts +6 -0
  115. package/src/rules/store/no-multiple-global-stores.js +34 -96
  116. package/src/rules/store/no-multiple-global-stores.js.map +1 -1
  117. package/src/rules/store/no-reducer-in-key-names.d.ts +5 -0
  118. package/src/rules/store/no-reducer-in-key-names.js +16 -20
  119. package/src/rules/store/no-reducer-in-key-names.js.map +1 -1
  120. package/src/rules/store/no-store-subscription.d.ts +3 -0
  121. package/src/rules/store/no-store-subscription.js +13 -16
  122. package/src/rules/store/no-store-subscription.js.map +1 -1
  123. package/src/rules/store/no-typed-global-store.d.ts +5 -0
  124. package/src/rules/store/no-typed-global-store.js +29 -70
  125. package/src/rules/store/no-typed-global-store.js.map +1 -1
  126. package/src/rules/store/on-function-explicit-return-type.d.ts +6 -0
  127. package/src/rules/store/on-function-explicit-return-type.js +23 -43
  128. package/src/rules/store/on-function-explicit-return-type.js.map +1 -1
  129. package/src/rules/store/prefer-action-creator-in-dispatch.d.ts +3 -0
  130. package/src/rules/store/prefer-action-creator-in-dispatch.js +15 -18
  131. package/src/rules/store/prefer-action-creator-in-dispatch.js.map +1 -1
  132. package/src/rules/store/prefer-action-creator.d.ts +3 -0
  133. package/src/rules/store/prefer-action-creator.js +10 -13
  134. package/src/rules/store/prefer-action-creator.js.map +1 -1
  135. package/src/rules/store/prefer-inline-action-props.d.ts +5 -0
  136. package/src/rules/store/prefer-inline-action-props.js +14 -18
  137. package/src/rules/store/prefer-inline-action-props.js.map +1 -1
  138. package/src/rules/store/prefer-one-generic-in-create-for-feature-selector.d.ts +5 -0
  139. package/src/rules/store/prefer-one-generic-in-create-for-feature-selector.js +16 -37
  140. package/src/rules/store/prefer-one-generic-in-create-for-feature-selector.js.map +1 -1
  141. package/src/rules/store/prefer-selector-in-select.d.ts +3 -0
  142. package/src/rules/store/prefer-selector-in-select.js +21 -46
  143. package/src/rules/store/prefer-selector-in-select.js.map +1 -1
  144. package/src/rules/store/prefix-selectors-with-select.d.ts +5 -0
  145. package/src/rules/store/prefix-selectors-with-select.js +26 -39
  146. package/src/rules/store/prefix-selectors-with-select.js.map +1 -1
  147. package/src/rules/store/select-style.d.ts +11 -0
  148. package/src/rules/store/select-style.js +53 -108
  149. package/src/rules/store/select-style.js.map +1 -1
  150. package/src/rules/store/use-consistent-global-store-name.d.ts +6 -0
  151. package/src/rules/store/use-consistent-global-store-name.js +24 -80
  152. package/src/rules/store/use-consistent-global-store-name.js.map +1 -1
  153. package/src/utils/helper-functions/docs.d.ts +1 -0
  154. package/src/utils/helper-functions/docs.js +1 -3
  155. package/src/utils/helper-functions/docs.js.map +1 -1
  156. package/src/utils/helper-functions/folder.d.ts +5 -0
  157. package/src/utils/helper-functions/folder.js +16 -88
  158. package/src/utils/helper-functions/folder.js.map +1 -1
  159. package/src/utils/helper-functions/guards.d.ts +97 -0
  160. package/src/utils/helper-functions/guards.js +27 -31
  161. package/src/utils/helper-functions/guards.js.map +1 -1
  162. package/src/utils/helper-functions/index.d.ts +6 -0
  163. package/src/utils/helper-functions/ngrx-modules.d.ts +8 -0
  164. package/src/utils/helper-functions/ngrx-modules.js +7 -6
  165. package/src/utils/helper-functions/ngrx-modules.js.map +1 -1
  166. package/src/utils/helper-functions/rules.d.ts +3 -0
  167. package/src/utils/helper-functions/rules.js +47 -0
  168. package/src/utils/helper-functions/rules.js.map +1 -0
  169. package/src/utils/helper-functions/utils.d.ts +48 -0
  170. package/src/utils/helper-functions/utils.js +68 -143
  171. package/src/utils/helper-functions/utils.js.map +1 -1
  172. package/src/utils/helper-functions/versions.d.ts +1 -0
  173. package/src/utils/helper-functions/versions.js +9 -10
  174. package/src/utils/helper-functions/versions.js.map +1 -1
  175. package/src/utils/index.d.ts +2 -0
  176. package/src/utils/selectors/index.d.ts +29 -0
  177. package/src/utils/selectors/index.js +30 -44
  178. package/src/utils/selectors/index.js.map +1 -1
  179. package/v9/index.d.ts +29 -0
  180. package/v9/index.js +38 -0
  181. package/v9/index.js.map +1 -0
  182. package/src/configs/all-requiring-type-checking.js +0 -46
  183. package/src/configs/all-requiring-type-checking.js.map +0 -1
  184. package/src/configs/component-store-strict.js +0 -15
  185. package/src/configs/component-store-strict.js.map +0 -1
  186. package/src/configs/effects-requiring-type-checking.js +0 -25
  187. package/src/configs/effects-requiring-type-checking.js.map +0 -1
  188. package/src/configs/effects-strict-requiring-type-checking.js +0 -25
  189. package/src/configs/effects-strict-requiring-type-checking.js.map +0 -1
  190. package/src/configs/effects-strict.js +0 -18
  191. package/src/configs/effects-strict.js.map +0 -1
  192. package/src/configs/index.js +0 -33
  193. package/src/configs/index.js.map +0 -1
  194. package/src/configs/recommended-requiring-type-checking.js +0 -46
  195. package/src/configs/recommended-requiring-type-checking.js.map +0 -1
  196. package/src/configs/recommended.js +0 -39
  197. package/src/configs/recommended.js.map +0 -1
  198. package/src/configs/store-strict.js +0 -30
  199. package/src/configs/store-strict.js.map +0 -1
  200. package/src/configs/strict-requiring-type-checking.js +0 -46
  201. package/src/configs/strict-requiring-type-checking.js.map +0 -1
  202. package/src/configs/strict.js +0 -39
  203. package/src/configs/strict.js.map +0 -1
  204. package/src/rules/effects/prefer-concat-latest-from.js +0 -153
  205. package/src/rules/effects/prefer-concat-latest-from.js.map +0 -1
@@ -1,98 +1,66 @@
1
1
  "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __read = (this && this.__read) || function (o, n) {
14
- var m = typeof Symbol === "function" && o[Symbol.iterator];
15
- if (!m) return o;
16
- var i = m.call(o), r, ar = [], e;
17
- try {
18
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
19
- }
20
- catch (error) { e = { error: error }; }
21
- finally {
22
- try {
23
- if (r && !r.done && (m = i["return"])) m.call(i);
24
- }
25
- finally { if (e) throw e.error; }
26
- }
27
- return ar;
28
- };
29
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
30
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
31
- if (ar || !(i in from)) {
32
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
33
- ar[i] = from[i];
34
- }
35
- }
36
- return to.concat(ar || Array.prototype.slice.call(from));
37
- };
38
2
  Object.defineProperty(exports, "__esModule", { value: true });
39
- var fs_1 = require("fs");
40
- var os_1 = require("os");
41
- var prettier_1 = require("prettier");
42
- var rules_1 = require("../src/rules");
43
- var configs_1 = require("../src/configs");
44
- var prettierConfig = prettier_1.resolveConfig.sync(__dirname);
45
- var OVERVIEW = './projects/ngrx.io/content/guide/eslint-plugin/index.md';
46
- var GH_CONFIGS = 'https://github.com/ngrx/platform/blob/main/modules/eslint-plugin/src/configs';
3
+ const fs_1 = require("fs");
4
+ const os_1 = require("os");
5
+ const prettier_1 = require("prettier");
6
+ const rules_1 = require("../src/utils/helper-functions/rules");
7
+ const prettierConfig = prettier_1.resolveConfig.sync(__dirname);
8
+ const OVERVIEW = './projects/ngrx.io/content/guide/eslint-plugin/index.md';
9
+ const GH_CONFIGS = 'https://github.com/ngrx/platform/blob/main/modules/eslint-plugin/src/configs';
47
10
  generateRules();
48
11
  generateConfigurations();
49
12
  function generateRules() {
50
- var moduleRules = Object.entries(rules_1.rules).reduce(function (all, _a) {
51
- var _b, _c, _d, _e, _f, _g;
52
- var _h = __read(_a, 2), ruleName = _h[0], meta = _h[1].meta;
53
- all[meta.ngrxModule] = ((_b = all[meta.ngrxModule]) !== null && _b !== void 0 ? _b : []).concat([
13
+ const moduleRules = Object.entries(rules_1.rulesForGenerate).reduce((all, [ruleName, { meta }]) => {
14
+ all[meta.ngrxModule] = (all[meta.ngrxModule] ?? []).concat([
54
15
  [
55
- "[@ngrx/".concat(ruleName, "]").concat(((_c = meta.docs) === null || _c === void 0 ? void 0 : _c.url)
16
+ `[@ngrx/${ruleName}]${meta.docs?.url
56
17
  ? '(' +
57
- meta.docs.url
58
- .replace('https://ngrx.io', '')
59
- .replace('.md', '') +
18
+ meta.docs.url.replace('https://ngrx.io', '').replace('.md', '') +
60
19
  ')'
61
- : ''),
62
- (_e = (_d = meta.docs) === null || _d === void 0 ? void 0 : _d.description) !== null && _e !== void 0 ? _e : 'TODO',
20
+ : ''}`,
21
+ meta.docs?.description ?? 'TODO',
63
22
  meta.type,
64
- "".concat((_f = meta.docs) === null || _f === void 0 ? void 0 : _f.recommended),
65
23
  meta.fixable ? 'Yes' : 'No',
66
24
  meta.hasSuggestions ? 'Yes' : 'No',
67
- meta.schema.length ? 'Yes' : 'No',
68
- ((_g = meta.docs) === null || _g === void 0 ? void 0 : _g.requiresTypeChecking) ? 'Yes' : 'No',
25
+ Array.isArray(meta.schema) && meta.schema.length ? 'Yes' : 'No',
26
+ meta.docs?.requiresTypeChecking ? 'Yes' : 'No',
69
27
  ],
70
28
  ]);
71
29
  return all;
72
30
  }, {});
73
- var tableHeader = "| Name | Description | Recommended | Category | Fixable | Has suggestions | Configurable | Requires type information\n| --- | --- | --- | --- | --- | --- | --- | --- |";
74
- var configTable = Object.entries(moduleRules).map(function (_a) {
75
- var _b = __read(_a, 2), ngrxModule = _b[0], pluginRules = _b[1];
76
- var tableBody = pluginRules
77
- .map(function (rule) { return "|".concat(rule.join('|'), "|"); })
31
+ const tableHeader = `| Name | Description | Category | Fixable | Has suggestions | Configurable | Requires type information
32
+ | --- | --- | --- | --- | --- | --- | --- |`;
33
+ const configTable = Object.entries(moduleRules).map(([ngrxModule, pluginRules]) => {
34
+ const tableBody = pluginRules
35
+ .map((rule) => `|${rule.join('|')}|`)
78
36
  .join(os_1.EOL);
79
- var table = [tableHeader, tableBody].join(os_1.EOL);
80
- return ["### ".concat(ngrxModule), table].join(os_1.EOL);
37
+ const table = [tableHeader, tableBody].join(os_1.EOL);
38
+ return [`### ${ngrxModule}`, table].join(os_1.EOL);
39
+ });
40
+ const overview = (0, fs_1.readFileSync)(OVERVIEW, 'utf-8');
41
+ const start = overview.indexOf('<!-- RULES-CONFIG:START -->');
42
+ const end = overview.indexOf('<!-- RULES-CONFIG:END -->');
43
+ const newOverview = (0, prettier_1.format)(`${overview.substring(0, start + '<!-- RULES-CONFIG:START -->'.length)}
44
+ ${configTable.join(os_1.EOL)}
45
+ ${overview.substring(end)}`, {
46
+ parser: 'markdown',
47
+ ...prettierConfig,
81
48
  });
82
- var overview = (0, fs_1.readFileSync)(OVERVIEW, 'utf-8');
83
- var start = overview.indexOf('<!-- RULES-CONFIG:START -->');
84
- var end = overview.indexOf('<!-- RULES-CONFIG:END -->');
85
- var newOverview = (0, prettier_1.format)("".concat(overview.substring(0, start + '<!-- RULES-CONFIG:START -->'.length), "\n").concat(configTable.join(os_1.EOL), "\n").concat(overview.substring(end)), __assign({ parser: 'markdown' }, prettierConfig));
86
49
  (0, fs_1.writeFileSync)(OVERVIEW, newOverview);
87
50
  }
88
51
  function generateConfigurations() {
89
- var tableHeader = "| Name |\n | --- |";
90
- var config = Object.keys(configs_1.configs);
91
- var overview = (0, fs_1.readFileSync)(OVERVIEW, 'utf-8');
92
- var start = overview.indexOf('<!-- CONFIGURATIONS-CONFIG:START -->');
93
- var end = overview.indexOf('<!-- CONFIGURATIONS-CONFIG:END -->');
94
- var configTable = config.map(function (configName) { return "| [".concat(configName, "](").concat(GH_CONFIGS, "/").concat(configName, ".ts) |"); });
95
- var newOverview = (0, prettier_1.format)("".concat(overview.substring(0, start + '<!-- CONFIGURATIONS-CONFIG:START -->'.length), "\n ").concat(__spreadArray([tableHeader], __read(configTable), false).join(os_1.EOL), "\n ").concat(overview.substring(end)), __assign({ parser: 'markdown' }, prettierConfig));
52
+ const tableHeader = `| Name |
53
+ | --- |`;
54
+ const overview = (0, fs_1.readFileSync)(OVERVIEW, 'utf-8');
55
+ const start = overview.indexOf('<!-- CONFIGURATIONS-CONFIG:START -->');
56
+ const end = overview.indexOf('<!-- CONFIGURATIONS-CONFIG:END -->');
57
+ const configTable = rules_1.configsForGenerate.map((configName) => `| [${configName}](${GH_CONFIGS}/${configName}.json) |`);
58
+ const newOverview = (0, prettier_1.format)(`${overview.substring(0, start + '<!-- CONFIGURATIONS-CONFIG:START -->'.length)}
59
+ ${[tableHeader, ...configTable].join(os_1.EOL)}
60
+ ${overview.substring(end)}`, {
61
+ parser: 'markdown',
62
+ ...prettierConfig,
63
+ });
96
64
  (0, fs_1.writeFileSync)(OVERVIEW, newOverview);
97
65
  }
98
66
  //# sourceMappingURL=generate-overview.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"generate-overview.js","sourceRoot":"","sources":["../../../../modules/eslint-plugin/scripts/generate-overview.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yBAAiD;AACjD,yBAAyB;AACzB,qCAAiD;AACjD,sCAAqC;AACrC,0CAAyC;AAEzC,IAAM,cAAc,GAAG,wBAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AACrD,IAAM,QAAQ,GAAG,yDAAyD,CAAC;AAC3E,IAAM,UAAU,GACd,8EAA8E,CAAC;AAEjF,aAAa,EAAE,CAAC;AAChB,sBAAsB,EAAE,CAAC;AAEzB,SAAS,aAAa;IACpB,IAAM,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC,aAAK,CAAC,CAAC,MAAM,CAC9C,UAAC,GAAG,EAAE,EAAoB;;YAApB,KAAA,aAA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AEnE,IAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAC5B,UAAC,UAAU,IAAK,OAAA,aAAM,UAAU,eAAK,UAAU,cAAI,UAAU,WAAQ,EAArD,CAAqD,CACtE,CAAC;IACF,IAAM,WAAW,GAAG,IAAA,iBAAM,EACxB,UAAG,QAAQ,CAAC,SAAS,CACnB,CAAC,EACD,KAAK,GAAG,sCAAsC,CAAC,MAAM,CACtD,iBACD,eAAC,WAAW,UAAK,WAAW,UAAE,IAAI,CAAC,QAAG,CAAC,iBACvC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,CAAE,aAEvB,MAAM,EAAE,UAAU,IACf,cAAc,EAEpB,CAAC;IAEF,IAAA,kBAAa,EAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;AACvC,CAAC","sourcesContent":["import { readFileSync, writeFileSync } from 'fs';\nimport { EOL } from 'os';\nimport { format, resolveConfig } from 'prettier';\nimport { rules } from '../src/rules';\nimport { configs } from '../src/configs';\n\nconst prettierConfig = resolveConfig.sync(__dirname);\nconst OVERVIEW = './projects/ngrx.io/content/guide/eslint-plugin/index.md';\nconst GH_CONFIGS =\n 'https://github.com/ngrx/platform/blob/main/modules/eslint-plugin/src/configs';\n\ngenerateRules();\ngenerateConfigurations();\n\nfunction generateRules() {\n const moduleRules = Object.entries(rules).reduce<Record<string, string[][]>>(\n (all, [ruleName, { meta }]) => {\n all[meta.ngrxModule] = (all[meta.ngrxModule] ?? []).concat([\n [\n `[@ngrx/${ruleName}]${\n meta.docs?.url\n ? '(' +\n meta.docs.url\n .replace('https://ngrx.io', '')\n .replace('.md', '') +\n ')'\n : ''\n }`,\n meta.docs?.description ?? 'TODO',\n meta.type,\n `${meta.docs?.recommended}`,\n meta.fixable ? 'Yes' : 'No',\n meta.hasSuggestions ? 'Yes' : 'No',\n meta.schema.length ? 'Yes' : 'No',\n meta.docs?.requiresTypeChecking ? 'Yes' : 'No',\n ],\n ]);\n return all;\n },\n {}\n );\n\n const tableHeader = `| Name | Description | Recommended | Category | Fixable | Has suggestions | Configurable | Requires type information\n| --- | --- | --- | --- | --- | --- | --- | --- |`;\n\n const configTable = Object.entries(moduleRules).map(\n ([ngrxModule, pluginRules]) => {\n const tableBody = pluginRules\n .map((rule) => `|${rule.join('|')}|`)\n .join(EOL);\n const table = [tableHeader, tableBody].join(EOL);\n\n return [`### ${ngrxModule}`, table].join(EOL);\n }\n );\n\n const overview = readFileSync(OVERVIEW, 'utf-8');\n const start = overview.indexOf('<!-- RULES-CONFIG:START -->');\n const end = overview.indexOf('<!-- RULES-CONFIG:END -->');\n\n const newOverview = format(\n `${overview.substring(0, start + '<!-- RULES-CONFIG:START -->'.length)}\n${configTable.join(EOL)}\n${overview.substring(end)}`,\n {\n parser: 'markdown',\n ...prettierConfig,\n }\n );\n\n writeFileSync(OVERVIEW, newOverview);\n}\n\nfunction generateConfigurations() {\n const tableHeader = `| Name |\n | --- |`;\n\n const config = Object.keys(configs);\n\n const overview = readFileSync(OVERVIEW, 'utf-8');\n const start = overview.indexOf('<!-- CONFIGURATIONS-CONFIG:START -->');\n const end = overview.indexOf('<!-- CONFIGURATIONS-CONFIG:END -->');\n\n const configTable = config.map(\n (configName) => `| [${configName}](${GH_CONFIGS}/${configName}.ts) |`\n );\n const newOverview = format(\n `${overview.substring(\n 0,\n start + '<!-- CONFIGURATIONS-CONFIG:START -->'.length\n )}\n ${[tableHeader, ...configTable].join(EOL)}\n ${overview.substring(end)}`,\n {\n parser: 'markdown',\n ...prettierConfig,\n }\n );\n\n writeFileSync(OVERVIEW, newOverview);\n}\n"]}
1
+ {"version":3,"file":"generate-overview.js","sourceRoot":"","sources":["../../../../modules/eslint-plugin/scripts/generate-overview.ts"],"names":[],"mappings":";;AAAA,2BAAiD;AACjD,2BAAyB;AACzB,uCAAiD;AACjD,+DAG6C;AAE7C,MAAM,cAAc,GAAG,wBAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AACrD,MAAM,QAAQ,GAAG,yDAAyD,CAAC;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AAsC,CAAC,CAAC;IACvE,MAAM,GAAG,GAAG,QAAQ,CAAC,OAAO,CAAC,oCAAoC,CAAC,CAAC;IAEnE,MAAM,WAAW,GAAG,0BAAkB,CAAC,GAAG,CACxC,CAAC,UAAU,EAAE,EAAE,CAAC,MAAM,UAAU,KAAK,UAAU,IAAI,UAAU,UAAU,CACxE,CAAC;IACF,MAAM,WAAW,GAAG,IAAA,iBAAM,EACxB,GAAG,QAAQ,CAAC,SAAS,CACnB,CAAC,EACD,KAAK,GAAG,sCAAsC,CAAC,MAAM,CACtD;IACD,CAAC,WAAW,EAAE,GAAG,WAAW,CAAC,CAAC,IAAI,CAAC,QAAG,CAAC;IACvC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,EACzB;QACE,MAAM,EAAE,UAAU;QAClB,GAAG,cAAc;KAClB,CACF,CAAC;IAEF,IAAA,kBAAa,EAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;AACvC,CAAC","sourcesContent":["import { readFileSync, writeFileSync } from 'fs';\nimport { EOL } from 'os';\nimport { format, resolveConfig } from 'prettier';\nimport {\n configsForGenerate,\n rulesForGenerate,\n} from '../src/utils/helper-functions/rules';\n\nconst prettierConfig = resolveConfig.sync(__dirname);\nconst OVERVIEW = './projects/ngrx.io/content/guide/eslint-plugin/index.md';\nconst GH_CONFIGS =\n 'https://github.com/ngrx/platform/blob/main/modules/eslint-plugin/src/configs';\n\ngenerateRules();\ngenerateConfigurations();\n\nfunction generateRules() {\n const moduleRules = Object.entries(rulesForGenerate).reduce<\n Record<string, string[][]>\n >((all, [ruleName, { meta }]) => {\n all[meta.ngrxModule] = (all[meta.ngrxModule] ?? []).concat([\n [\n `[@ngrx/${ruleName}]${\n meta.docs?.url\n ? '(' +\n meta.docs.url.replace('https://ngrx.io', '').replace('.md', '') +\n ')'\n : ''\n }`,\n meta.docs?.description ?? 'TODO',\n meta.type,\n meta.fixable ? 'Yes' : 'No',\n meta.hasSuggestions ? 'Yes' : 'No',\n Array.isArray(meta.schema) && meta.schema.length ? 'Yes' : 'No',\n meta.docs?.requiresTypeChecking ? 'Yes' : 'No',\n ],\n ]);\n return all;\n }, {});\n\n const tableHeader = `| Name | Description | Category | Fixable | Has suggestions | Configurable | Requires type information\n| --- | --- | --- | --- | --- | --- | --- |`;\n\n const configTable = Object.entries(moduleRules).map(\n ([ngrxModule, pluginRules]) => {\n const tableBody = pluginRules\n .map((rule) => `|${rule.join('|')}|`)\n .join(EOL);\n const table = [tableHeader, tableBody].join(EOL);\n\n return [`### ${ngrxModule}`, table].join(EOL);\n }\n );\n\n const overview = readFileSync(OVERVIEW, 'utf-8');\n const start = overview.indexOf('<!-- RULES-CONFIG:START -->');\n const end = overview.indexOf('<!-- RULES-CONFIG:END -->');\n\n const newOverview = format(\n `${overview.substring(0, start + '<!-- RULES-CONFIG:START -->'.length)}\n${configTable.join(EOL)}\n${overview.substring(end)}`,\n {\n parser: 'markdown',\n ...prettierConfig,\n }\n );\n\n writeFileSync(OVERVIEW, newOverview);\n}\n\nfunction generateConfigurations() {\n const tableHeader = `| Name |\n | --- |`;\n\n const overview = readFileSync(OVERVIEW, 'utf-8');\n const start = overview.indexOf('<!-- CONFIGURATIONS-CONFIG:START -->');\n const end = overview.indexOf('<!-- CONFIGURATIONS-CONFIG:END -->');\n\n const configTable = configsForGenerate.map(\n (configName) => `| [${configName}](${GH_CONFIGS}/${configName}.json) |`\n );\n const newOverview = format(\n `${overview.substring(\n 0,\n start + '<!-- CONFIGURATIONS-CONFIG:START -->'.length\n )}\n ${[tableHeader, ...configTable].join(EOL)}\n ${overview.substring(end)}`,\n {\n parser: 'markdown',\n ...prettierConfig,\n }\n );\n\n writeFileSync(OVERVIEW, newOverview);\n}\n"]}
@@ -0,0 +1,8 @@
1
+ import { TSESLint as eslint } from '@typescript-eslint/utils';
2
+ export declare function fromFixture<TMessageIds extends string>(fixture: string, invalidTestCase?: {
3
+ output?: string;
4
+ suggestions?: readonly eslint.SuggestionOutput<TMessageIds>[] | null;
5
+ }): eslint.InvalidTestCase<TMessageIds, never>;
6
+ export declare function fromFixture<TMessageIds extends string, TOptions extends readonly unknown[]>(fixture: string, invalidTestCase: Omit<eslint.InvalidTestCase<TMessageIds, TOptions>, 'code' | 'errors'> & {
7
+ suggestions?: readonly eslint.SuggestionOutput<TMessageIds>[] | null;
8
+ }): eslint.InvalidTestCase<TMessageIds, TOptions>;
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fromFixture = void 0;
4
+ function fromFixture(fixture, invalidTestCase = {}) {
5
+ const { suggestions, ...rest } = invalidTestCase;
6
+ return {
7
+ ...rest,
8
+ ...parseFixture(fixture, suggestions),
9
+ };
10
+ }
11
+ exports.fromFixture = fromFixture;
12
+ function getSuggestions(suggestions, suggest, indices) {
13
+ if (!suggestions || !suggest) {
14
+ return {};
15
+ }
16
+ if (!indices) {
17
+ return { suggestions };
18
+ }
19
+ return {
20
+ suggestions: indices
21
+ .split(/\s+/)
22
+ .map((index) => suggestions[Number.parseInt(index, 10)]),
23
+ };
24
+ }
25
+ function parseFixture(fixture, suggestions) {
26
+ const errorRegExp = /^(?<indent>\s*)(?<error>~+)\s*\[(?<id>\w+)\s*(?<data>.*?)(?:\s*(?<suggest>suggest)\s*(?<indices>[\d\s]*))?\]\s*$/;
27
+ const lines = [];
28
+ const errors = [];
29
+ let suggestFound = false;
30
+ fixture.split('\n').forEach((line) => {
31
+ const match = line.match(errorRegExp);
32
+ if (match?.groups) {
33
+ const column = match.groups.indent.length + 1;
34
+ const endColumn = column + match.groups.error.length;
35
+ const { length } = lines;
36
+ errors.push({
37
+ column,
38
+ data: JSON.parse(match.groups.data || '{}'),
39
+ endColumn,
40
+ endLine: length,
41
+ line: length,
42
+ messageId: match.groups.id,
43
+ // TODO: Remove type assertion once https://github.com/typescript-eslint/typescript-eslint/pull/3844 is available.
44
+ ...getSuggestions(suggestions, Boolean(match.groups.suggest), match.groups.indices?.trim()),
45
+ });
46
+ if (match.groups.suggest) {
47
+ suggestFound = true;
48
+ }
49
+ }
50
+ else {
51
+ lines.push(line);
52
+ }
53
+ });
54
+ if (suggestions && !suggestFound) {
55
+ throw new Error("Suggestions specified but no 'suggest' annotation found.");
56
+ }
57
+ return {
58
+ code: lines.join('\n'),
59
+ errors,
60
+ };
61
+ }
62
+ //# sourceMappingURL=from-fixture.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"from-fixture.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/spec/utils/from-fixture.ts"],"names":[],"mappings":";;;AAuBA,SAAgB,WAAW,CAIzB,OAAe,EACf,kBAKI,EAAE;IAEN,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,eAAe,CAAC;IACjD,OAAO;QACL,GAAG,IAAI;QACP,GAAG,YAAY,CAAC,OAAO,EAAE,WAAW,CAAC;KACtC,CAAC;AACJ,CAAC;AAjBD,kCAiBC;AAED,SAAS,cAAc,CACrB,WAGa,EACb,OAAgB,EAChB,OAA2B;IAE3B,IAAI,CAAC,WAAW,IAAI,CAAC,OAAO,EAAE,CAAC;QAC7B,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,EAAE,WAAW,EAAW,CAAC;IAClC,CAAC;IACD,OAAO;QACL,WAAW,EAAE,OAAO;aACjB,KAAK,CAAC,KAAK,CAAC;aACZ,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC;KAClD,CAAC;AACb,CAAC;AAED,SAAS,YAAY,CACnB,OAAe,EACf,WAAoE;IAEpE,MAAM,WAAW,GACf,kHAAkH,CAAC;IACrH,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,MAAM,MAAM,GAAwC,EAAE,CAAC;IACvD,IAAI,YAAY,GAAG,KAAK,CAAC;IACzB,OAAO,CAAC,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Content":["import { TSESLint as eslint } from '@typescript-eslint/utils';\n\nexport function fromFixture<TMessageIds extends string>(\n fixture: string,\n invalidTestCase?: {\n output?: string;\n suggestions?: readonly eslint.SuggestionOutput<TMessageIds>[] | null;\n }\n): eslint.InvalidTestCase<TMessageIds, never>;\n\nexport function fromFixture<\n TMessageIds extends string,\n TOptions extends readonly unknown[]\n>(\n fixture: string,\n invalidTestCase: Omit<\n eslint.InvalidTestCase<TMessageIds, TOptions>,\n 'code' | 'errors'\n > & {\n suggestions?: readonly eslint.SuggestionOutput<TMessageIds>[] | null;\n }\n): eslint.InvalidTestCase<TMessageIds, TOptions>;\n\nexport function fromFixture<\n TMessageIds extends string,\n TOptions extends readonly unknown[]\n>(\n fixture: string,\n invalidTestCase: Omit<\n eslint.InvalidTestCase<TMessageIds, TOptions>,\n 'code' | 'errors'\n > & {\n suggestions?: readonly eslint.SuggestionOutput<TMessageIds>[] | null;\n } = {}\n): eslint.InvalidTestCase<TMessageIds, TOptions> {\n const { suggestions, ...rest } = invalidTestCase;\n return {\n ...rest,\n ...parseFixture(fixture, suggestions),\n };\n}\n\nfunction getSuggestions<TMessageIds extends string>(\n suggestions:\n | readonly eslint.SuggestionOutput<TMessageIds>[]\n | null\n | undefined,\n suggest: boolean,\n indices: string | undefined\n) {\n if (!suggestions || !suggest) {\n return {};\n }\n if (!indices) {\n return { suggestions } as const;\n }\n return {\n suggestions: indices\n .split(/\\s+/)\n .map((index) => suggestions[Number.parseInt(index, 10)]),\n } as const;\n}\n\nfunction parseFixture<TMessageIds extends string>(\n fixture: string,\n suggestions?: readonly eslint.SuggestionOutput<TMessageIds>[] | null\n) {\n const errorRegExp =\n /^(?<indent>\\s*)(?<error>~+)\\s*\\[(?<id>\\w+)\\s*(?<data>.*?)(?:\\s*(?<suggest>suggest)\\s*(?<indices>[\\d\\s]*))?\\]\\s*$/;\n const lines: string[] = [];\n const errors: eslint.TestCaseError<TMessageIds>[] = [];\n let suggestFound = false;\n fixture.split('\\n').forEach((line) => {\n const match = line.match(errorRegExp);\n if (match?.groups) {\n const column = match.groups.indent.length + 1;\n const endColumn = column + match.groups.error.length;\n const { length } = lines;\n errors.push({\n column,\n data: JSON.parse(match.groups.data || '{}'),\n endColumn,\n endLine: length,\n line: length,\n messageId: match.groups.id as TMessageIds,\n // TODO: Remove type assertion once https://github.com/typescript-eslint/typescript-eslint/pull/3844 is available.\n ...(getSuggestions(\n suggestions,\n Boolean(match.groups.suggest),\n match.groups.indices?.trim()\n ) as eslint.TestCaseError<TMessageIds>['suggestions']),\n });\n if (match.groups.suggest) {\n suggestFound = true;\n }\n } else {\n lines.push(line);\n }\n });\n if (suggestions && !suggestFound) {\n throw new Error(\"Suggestions specified but no 'suggest' annotation found.\");\n }\n return {\n code: lines.join('\\n'),\n errors,\n };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export * from './from-fixture';
2
+ export * from './rule-tester';
@@ -1,22 +1,19 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ruleTester = void 0;
4
- var experimental_utils_1 = require("@typescript-eslint/experimental-utils");
5
- var path_1 = require("path");
6
- var utils_1 = require("../../src/utils");
7
- function ruleTester(environment) {
8
- (0, utils_1.clearCache)();
9
- if (environment) {
10
- (0, utils_1.setNgrxVersion)(environment.ngrxModule, environment.version);
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
7
  }
12
- return new experimental_utils_1.TSESLint.RuleTester({
13
- parser: (0, path_1.resolve)('./node_modules/@typescript-eslint/parser/dist'),
14
- parserOptions: {
15
- project: (0, path_1.resolve)('./modules/eslint-plugin/spec/tsconfig.json'),
16
- ecmaVersion: 2020,
17
- sourceType: 'module',
18
- },
19
- });
20
- }
21
- exports.ruleTester = ruleTester;
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./from-fixture"), exports);
18
+ __exportStar(require("./rule-tester"), exports);
22
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/spec/utils/index.ts"],"names":[],"mappings":";;;AAAA,4EAAiE;AACjE,6BAA+B;AAC/B,yCAA6D;AAE7D,SAAgB,UAAU,CAAC,WAG1B;IACC,IAAA,kBAAU,GAAE,CAAC;IAEb,IAAI,WAAW,EAAE,CAAC;QAChB,IAAA,sBAAc,EAAC,WAAW,CAAC,UAAU,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC9D,CAAC;IAED,OAAO,IAAI,6BAAQ,CAAC,UAAU,CAAC;QAC7B,MAAM,EAAE,IAAA,cAAO,EAAC,+CAA+C,CAAC;QAChE,aAAa,EAAE;YACb,OAAO,EAAE,IAAA,cAAO,EAAC,4CAA4C,CAAC;YAC9D,WAAW,EAAE,IAAI;YACjB,UAAU,EAAE,QAAQ;SACrB;KACF,CAAC,CAAC;AACL,CAAC;AAlBD,gCAkBC","sourcesContent":["import { TSESLint } from '@typescript-eslint/experimental-utils';\nimport { resolve } from 'path';\nimport { clearCache, setNgrxVersion } from '../../src/utils';\n\nexport function ruleTester(environment?: {\n ngrxModule: string;\n version: string;\n}) {\n clearCache();\n\n if (environment) {\n setNgrxVersion(environment.ngrxModule, environment.version);\n }\n\n return new TSESLint.RuleTester({\n parser: resolve('./node_modules/@typescript-eslint/parser/dist'),\n parserOptions: {\n project: resolve('./modules/eslint-plugin/spec/tsconfig.json'),\n ecmaVersion: 2020,\n sourceType: 'module',\n },\n });\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/spec/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,gDAA8B","sourcesContent":["export * from './from-fixture';\nexport * from './rule-tester';\n"]}
@@ -0,0 +1,5 @@
1
+ import { RuleTester } from '@angular-eslint/test-utils';
2
+ export declare function ruleTester(environment?: {
3
+ ngrxModule: string;
4
+ version: string;
5
+ }): RuleTester;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ruleTester = void 0;
4
+ const utils_1 = require("../../src/utils");
5
+ const test_utils_1 = require("@angular-eslint/test-utils");
6
+ const path_1 = require("path");
7
+ function ruleTester(environment) {
8
+ (0, utils_1.clearCache)();
9
+ if (environment) {
10
+ (0, utils_1.setNgrxVersion)(environment.ngrxModule, environment.version);
11
+ }
12
+ return new test_utils_1.RuleTester({
13
+ parser: '@typescript-eslint/parser',
14
+ parserOptions: {
15
+ ecmaVersion: 2020,
16
+ sourceType: 'module',
17
+ tsconfigRootDir: (0, path_1.resolve)('./modules/eslint-plugin/spec/fixtures'),
18
+ project: './tsconfig.json',
19
+ },
20
+ });
21
+ }
22
+ exports.ruleTester = ruleTester;
23
+ //# sourceMappingURL=rule-tester.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rule-tester.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/spec/utils/rule-tester.ts"],"names":[],"mappings":";;;AAAA,2CAA6D;AAC7D,2DAAwD;AACxD,+BAA+B;AAE/B,SAAgB,UAAU,CAAC,WAG1B;IACC,IAAA,kBAAU,GAAE,CAAC;IAEb,IAAI,WAAW,EAAE,CAAC;QAChB,IAAA,sBAAc,EAAC,WAAW,CAAC,UAAU,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC9D,CAAC;IAED,OAAO,IAAI,uBAAU,CAAC;QACpB,MAAM,EAAE,2BAA2B;QACnC,aAAa,EAAE;YACb,WAAW,EAAE,IAAI;YACjB,UAAU,EAAE,QAAQ;YACpB,eAAe,EAAE,IAAA,cAAO,EAAC,uCAAuC,CAAC;YACjE,OAAO,EAAE,iBAAiB;SAC3B;KACF,CAAC,CAAC;AACL,CAAC;AAnBD,gCAmBC","sourcesContent":["import { clearCache, setNgrxVersion } from '../../src/utils';\nimport { RuleTester } from '@angular-eslint/test-utils';\nimport { resolve } from 'path';\n\nexport function ruleTester(environment?: {\n ngrxModule: string;\n version: string;\n}) {\n clearCache();\n\n if (environment) {\n setNgrxVersion(environment.ngrxModule, environment.version);\n }\n\n return new RuleTester({\n parser: '@typescript-eslint/parser',\n parserOptions: {\n ecmaVersion: 2020,\n sourceType: 'module',\n tsconfigRootDir: resolve('./modules/eslint-plugin/spec/fixtures'),\n project: './tsconfig.json',\n },\n });\n}\n"]}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * DO NOT EDIT
3
+ * This file is generated
4
+ */
5
+ import type { TSESLint } from '@typescript-eslint/utils';
6
+ declare const _default: (plugin: TSESLint.FlatConfig.Plugin, parser: TSESLint.FlatConfig.Parser) => TSESLint.FlatConfig.ConfigArray;
7
+ export default _default;
@@ -3,37 +3,61 @@
3
3
  * DO NOT EDIT
4
4
  * This file is generated
5
5
  */
6
- module.exports = {
7
- parser: '@typescript-eslint/parser',
8
- plugins: ['@ngrx'],
9
- rules: {
10
- '@ngrx/avoid-combining-component-store-selectors': 'warn',
11
- '@ngrx/avoid-mapping-component-store-selectors': 'warn',
12
- '@ngrx/updater-explicit-return-type': 'warn',
13
- '@ngrx/no-dispatch-in-effects': 'warn',
14
- '@ngrx/no-effects-in-providers': 'error',
15
- '@ngrx/prefer-action-creator-in-of-type': 'warn',
16
- '@ngrx/prefer-concat-latest-from': 'warn',
17
- '@ngrx/prefer-effect-callback-in-block-statement': 'warn',
18
- '@ngrx/use-effects-lifecycle-interface': 'warn',
19
- '@ngrx/avoid-combining-selectors': 'warn',
20
- '@ngrx/avoid-dispatching-multiple-actions-sequentially': 'warn',
21
- '@ngrx/avoid-duplicate-actions-in-reducer': 'warn',
22
- '@ngrx/avoid-mapping-selectors': 'warn',
23
- '@ngrx/good-action-hygiene': 'warn',
24
- '@ngrx/no-multiple-global-stores': 'warn',
25
- '@ngrx/no-reducer-in-key-names': 'warn',
26
- '@ngrx/no-store-subscription': 'warn',
27
- '@ngrx/no-typed-global-store': 'warn',
28
- '@ngrx/on-function-explicit-return-type': 'warn',
29
- '@ngrx/prefer-action-creator-in-dispatch': 'warn',
30
- '@ngrx/prefer-action-creator': 'warn',
31
- '@ngrx/prefer-inline-action-props': 'warn',
32
- '@ngrx/prefer-one-generic-in-create-for-feature-selector': 'warn',
33
- '@ngrx/prefer-selector-in-select': 'warn',
34
- '@ngrx/prefix-selectors-with-select': 'warn',
35
- '@ngrx/select-style': 'warn',
36
- '@ngrx/use-consistent-global-store-name': 'warn',
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.default = (plugin, parser) => [
8
+ {
9
+ name: 'ngrx/base',
10
+ languageOptions: {
11
+ parser,
12
+ sourceType: 'module',
13
+ },
14
+ plugins: {
15
+ '@ngrx': plugin,
16
+ },
37
17
  },
38
- };
18
+ {
19
+ name: 'ngrx/all',
20
+ languageOptions: {
21
+ parser,
22
+ parserOptions: {
23
+ ecmaVersion: 2020,
24
+ sourceType: 'module',
25
+ project: './tsconfig.json',
26
+ },
27
+ },
28
+ rules: {
29
+ '@ngrx/avoid-combining-component-store-selectors': 'error',
30
+ '@ngrx/avoid-mapping-component-store-selectors': 'error',
31
+ '@ngrx/updater-explicit-return-type': 'error',
32
+ '@ngrx/avoid-cyclic-effects': 'error',
33
+ '@ngrx/no-dispatch-in-effects': 'error',
34
+ '@ngrx/no-effects-in-providers': 'error',
35
+ '@ngrx/no-multiple-actions-in-effects': 'error',
36
+ '@ngrx/prefer-action-creator-in-of-type': 'error',
37
+ '@ngrx/prefer-effect-callback-in-block-statement': 'error',
38
+ '@ngrx/use-effects-lifecycle-interface': 'error',
39
+ '@ngrx/prefer-concat-latest-from': 'error',
40
+ '@ngrx/signal-state-no-arrays-at-root-level': 'error',
41
+ '@ngrx/with-state-no-arrays-at-root-level': 'error',
42
+ '@ngrx/avoid-combining-selectors': 'error',
43
+ '@ngrx/avoid-dispatching-multiple-actions-sequentially': 'error',
44
+ '@ngrx/avoid-duplicate-actions-in-reducer': 'error',
45
+ '@ngrx/avoid-mapping-selectors': 'error',
46
+ '@ngrx/good-action-hygiene': 'error',
47
+ '@ngrx/no-multiple-global-stores': 'error',
48
+ '@ngrx/no-reducer-in-key-names': 'error',
49
+ '@ngrx/no-store-subscription': 'error',
50
+ '@ngrx/no-typed-global-store': 'error',
51
+ '@ngrx/on-function-explicit-return-type': 'error',
52
+ '@ngrx/prefer-action-creator-in-dispatch': 'error',
53
+ '@ngrx/prefer-action-creator': 'error',
54
+ '@ngrx/prefer-inline-action-props': 'error',
55
+ '@ngrx/prefer-one-generic-in-create-for-feature-selector': 'error',
56
+ '@ngrx/prefer-selector-in-select': 'error',
57
+ '@ngrx/prefix-selectors-with-select': 'error',
58
+ '@ngrx/select-style': 'error',
59
+ '@ngrx/use-consistent-global-store-name': 'error',
60
+ },
61
+ },
62
+ ];
39
63
  //# sourceMappingURL=all.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"all.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/all.ts"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,iBAAS;IACP,MAAM,EAAE,2BAA2B;IAEnC,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,KAAK,EAAE;QACL,iDAAiD,EAAE,MAAM;QACzD,+CAA+C,EAAE,MAAM;QACvD,oCAAoC,EAAE,MAAM;QAC5C,8BAA8B,EAAE,MAAM;QACtC,+BAA+B,EAAE,OAAO;QACxC,wCAAwC,EAAE,MAAM;QAChD,iCAAiC,EAAE,MAAM;QACzC,iDAAiD,EAAE,MAAM;QACzD,uCAAuC,EAAE,MAAM;QAC/C,iCAAiC,EAAE,MAAM;QACzC,uDAAuD,EAAE,MAAM;QAC/D,0CAA0C,EAAE,MAAM;QAClD,+BAA+B,EAAE,MAAM;QACvC,2BAA2B,EAAE,MAAM;QACnC,iCAAiC,EAAE,MAAM;QACzC,+BAA+B,EAAE,MAAM;QACvC,6BAA6B,EAAE,MAAM;QACrC,6BAA6B,EAAE,MAAM;QACrC,wCAAwC,EAAE,MAAM;QAChD,yCAAyC,EAAE,MAAM;QACjD,6BAA6B,EAAE,MAAM;QACrC,kCAAkC,EAAE,MAAM;QAC1C,yDAAyD,EAAE,MAAM;QACjE,iCAAiC,EAAE,MAAM;QACzC,oCAAoC,EAAE,MAAM;QAC5C,oBAAoB,EAAE,MAAM;QAC5B,wCAAwC,EAAE,MAAM;KACjD;CACF,CAAC","sourcesContent":["/**\n * DO NOT EDIT\n * This file is generated\n */\n\nexport = {\n parser: '@typescript-eslint/parser',\n\n plugins: ['@ngrx'],\n rules: {\n '@ngrx/avoid-combining-component-store-selectors': 'warn',\n '@ngrx/avoid-mapping-component-store-selectors': 'warn',\n '@ngrx/updater-explicit-return-type': 'warn',\n '@ngrx/no-dispatch-in-effects': 'warn',\n '@ngrx/no-effects-in-providers': 'error',\n '@ngrx/prefer-action-creator-in-of-type': 'warn',\n '@ngrx/prefer-concat-latest-from': 'warn',\n '@ngrx/prefer-effect-callback-in-block-statement': 'warn',\n '@ngrx/use-effects-lifecycle-interface': 'warn',\n '@ngrx/avoid-combining-selectors': 'warn',\n '@ngrx/avoid-dispatching-multiple-actions-sequentially': 'warn',\n '@ngrx/avoid-duplicate-actions-in-reducer': 'warn',\n '@ngrx/avoid-mapping-selectors': 'warn',\n '@ngrx/good-action-hygiene': 'warn',\n '@ngrx/no-multiple-global-stores': 'warn',\n '@ngrx/no-reducer-in-key-names': 'warn',\n '@ngrx/no-store-subscription': 'warn',\n '@ngrx/no-typed-global-store': 'warn',\n '@ngrx/on-function-explicit-return-type': 'warn',\n '@ngrx/prefer-action-creator-in-dispatch': 'warn',\n '@ngrx/prefer-action-creator': 'warn',\n '@ngrx/prefer-inline-action-props': 'warn',\n '@ngrx/prefer-one-generic-in-create-for-feature-selector': 'warn',\n '@ngrx/prefer-selector-in-select': 'warn',\n '@ngrx/prefix-selectors-with-select': 'warn',\n '@ngrx/select-style': 'warn',\n '@ngrx/use-consistent-global-store-name': 'warn',\n },\n};\n"]}
1
+ {"version":3,"file":"all.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/all.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAIH,kBAAe,CACb,MAAkC,EAClC,MAAkC,EACD,EAAE,CAAC;IACpC;QACE,IAAI,EAAE,WAAW;QACjB,eAAe,EAAE;YACf,MAAM;YACN,UAAU,EAAE,QAAQ;SACrB;QACD,OAAO,EAAE;YACP,OAAO,EAAE,MAAM;SAChB;KACF;IACD;QACE,IAAI,EAAE,UAAU;QAChB,eAAe,EAAE;YACf,MAAM;YACN,aAAa,EAAE;gBACb,WAAW,EAAE,IAAI;gBACjB,UAAU,EAAE,QAAQ;gBACpB,OAAO,EAAE,iBAAiB;aAC3B;SACF;QACD,KAAK,EAAE;YACL,iDAAiD,EAAE,OAAO;YAC1D,+CAA+C,EAAE,OAAO;YACxD,oCAAoC,EAAE,OAAO;YAC7C,4BAA4B,EAAE,OAAO;YACrC,8BAA8B,EAAE,OAAO;YACvC,+BAA+B,EAAE,OAAO;YACxC,sCAAsC,EAAE,OAAO;YAC/C,wCAAwC,EAAE,OAAO;YACjD,iDAAiD,EAAE,OAAO;YAC1D,uCAAuC,EAAE,OAAO;YAChD,iCAAiC,EAAE,OAAO;YAC1C,4CAA4C,EAAE,OAAO;YACrD,0CAA0C,EAAE,OAAO;YACnD,iCAAiC,EAAE,OAAO;YAC1C,uDAAuD,EAAE,OAAO;YAChE,0CAA0C,EAAE,OAAO;YACnD,+BAA+B,EAAE,OAAO;YACxC,2BAA2B,EAAE,OAAO;YACpC,iCAAiC,EAAE,OAAO;YAC1C,+BAA+B,EAAE,OAAO;YACxC,6BAA6B,EAAE,OAAO;YACtC,6BAA6B,EAAE,OAAO;YACtC,wCAAwC,EAAE,OAAO;YACjD,yCAAyC,EAAE,OAAO;YAClD,6BAA6B,EAAE,OAAO;YACtC,kCAAkC,EAAE,OAAO;YAC3C,yDAAyD,EAAE,OAAO;YAClE,iCAAiC,EAAE,OAAO;YAC1C,oCAAoC,EAAE,OAAO;YAC7C,oBAAoB,EAAE,OAAO;YAC7B,wCAAwC,EAAE,OAAO;SAClD;KACF;CACF,CAAC","sourcesContent":["/**\n * DO NOT EDIT\n * This file is generated\n */\n\nimport type { TSESLint } from '@typescript-eslint/utils';\n\nexport default (\n plugin: TSESLint.FlatConfig.Plugin,\n parser: TSESLint.FlatConfig.Parser\n): TSESLint.FlatConfig.ConfigArray => [\n {\n name: 'ngrx/base',\n languageOptions: {\n parser,\n sourceType: 'module',\n },\n plugins: {\n '@ngrx': plugin,\n },\n },\n {\n name: 'ngrx/all',\n languageOptions: {\n parser,\n parserOptions: {\n ecmaVersion: 2020,\n sourceType: 'module',\n project: './tsconfig.json',\n },\n },\n rules: {\n '@ngrx/avoid-combining-component-store-selectors': 'error',\n '@ngrx/avoid-mapping-component-store-selectors': 'error',\n '@ngrx/updater-explicit-return-type': 'error',\n '@ngrx/avoid-cyclic-effects': 'error',\n '@ngrx/no-dispatch-in-effects': 'error',\n '@ngrx/no-effects-in-providers': 'error',\n '@ngrx/no-multiple-actions-in-effects': 'error',\n '@ngrx/prefer-action-creator-in-of-type': 'error',\n '@ngrx/prefer-effect-callback-in-block-statement': 'error',\n '@ngrx/use-effects-lifecycle-interface': 'error',\n '@ngrx/prefer-concat-latest-from': 'error',\n '@ngrx/signal-state-no-arrays-at-root-level': 'error',\n '@ngrx/with-state-no-arrays-at-root-level': 'error',\n '@ngrx/avoid-combining-selectors': 'error',\n '@ngrx/avoid-dispatching-multiple-actions-sequentially': 'error',\n '@ngrx/avoid-duplicate-actions-in-reducer': 'error',\n '@ngrx/avoid-mapping-selectors': 'error',\n '@ngrx/good-action-hygiene': 'error',\n '@ngrx/no-multiple-global-stores': 'error',\n '@ngrx/no-reducer-in-key-names': 'error',\n '@ngrx/no-store-subscription': 'error',\n '@ngrx/no-typed-global-store': 'error',\n '@ngrx/on-function-explicit-return-type': 'error',\n '@ngrx/prefer-action-creator-in-dispatch': 'error',\n '@ngrx/prefer-action-creator': 'error',\n '@ngrx/prefer-inline-action-props': 'error',\n '@ngrx/prefer-one-generic-in-create-for-feature-selector': 'error',\n '@ngrx/prefer-selector-in-select': 'error',\n '@ngrx/prefix-selectors-with-select': 'error',\n '@ngrx/select-style': 'error',\n '@ngrx/use-consistent-global-store-name': 'error',\n },\n },\n];\n"]}
@@ -0,0 +1,42 @@
1
+ {
2
+ "parser": "@typescript-eslint/parser",
3
+ "plugins": ["@ngrx"],
4
+ "rules": {
5
+ "@ngrx/avoid-combining-component-store-selectors": "error",
6
+ "@ngrx/avoid-mapping-component-store-selectors": "error",
7
+ "@ngrx/updater-explicit-return-type": "error",
8
+ "@ngrx/avoid-cyclic-effects": "error",
9
+ "@ngrx/no-dispatch-in-effects": "error",
10
+ "@ngrx/no-effects-in-providers": "error",
11
+ "@ngrx/no-multiple-actions-in-effects": "error",
12
+ "@ngrx/prefer-action-creator-in-of-type": "error",
13
+ "@ngrx/prefer-effect-callback-in-block-statement": "error",
14
+ "@ngrx/use-effects-lifecycle-interface": "error",
15
+ "@ngrx/prefer-concat-latest-from": "error",
16
+ "@ngrx/signal-state-no-arrays-at-root-level": "error",
17
+ "@ngrx/with-state-no-arrays-at-root-level": "error",
18
+ "@ngrx/avoid-combining-selectors": "error",
19
+ "@ngrx/avoid-dispatching-multiple-actions-sequentially": "error",
20
+ "@ngrx/avoid-duplicate-actions-in-reducer": "error",
21
+ "@ngrx/avoid-mapping-selectors": "error",
22
+ "@ngrx/good-action-hygiene": "error",
23
+ "@ngrx/no-multiple-global-stores": "error",
24
+ "@ngrx/no-reducer-in-key-names": "error",
25
+ "@ngrx/no-store-subscription": "error",
26
+ "@ngrx/no-typed-global-store": "error",
27
+ "@ngrx/on-function-explicit-return-type": "error",
28
+ "@ngrx/prefer-action-creator-in-dispatch": "error",
29
+ "@ngrx/prefer-action-creator": "error",
30
+ "@ngrx/prefer-inline-action-props": "error",
31
+ "@ngrx/prefer-one-generic-in-create-for-feature-selector": "error",
32
+ "@ngrx/prefer-selector-in-select": "error",
33
+ "@ngrx/prefix-selectors-with-select": "error",
34
+ "@ngrx/select-style": "error",
35
+ "@ngrx/use-consistent-global-store-name": "error"
36
+ },
37
+ "parserOptions": {
38
+ "ecmaVersion": 2020,
39
+ "sourceType": "module",
40
+ "project": "./tsconfig.json"
41
+ }
42
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * DO NOT EDIT
3
+ * This file is generated
4
+ */
5
+ import type { TSESLint } from '@typescript-eslint/utils';
6
+ declare const _default: (plugin: TSESLint.FlatConfig.Plugin, parser: TSESLint.FlatConfig.Parser) => TSESLint.FlatConfig.ConfigArray;
7
+ export default _default;
@@ -3,13 +3,28 @@
3
3
  * DO NOT EDIT
4
4
  * This file is generated
5
5
  */
6
- module.exports = {
7
- parser: '@typescript-eslint/parser',
8
- plugins: ['@ngrx'],
9
- rules: {
10
- '@ngrx/avoid-combining-component-store-selectors': 'warn',
11
- '@ngrx/avoid-mapping-component-store-selectors': 'warn',
12
- '@ngrx/updater-explicit-return-type': 'warn',
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.default = (plugin, parser) => [
8
+ {
9
+ name: 'ngrx/base',
10
+ languageOptions: {
11
+ parser,
12
+ sourceType: 'module',
13
+ },
14
+ plugins: {
15
+ '@ngrx': plugin,
16
+ },
13
17
  },
14
- };
18
+ {
19
+ name: 'ngrx/component-store',
20
+ languageOptions: {
21
+ parser,
22
+ },
23
+ rules: {
24
+ '@ngrx/avoid-combining-component-store-selectors': 'error',
25
+ '@ngrx/avoid-mapping-component-store-selectors': 'error',
26
+ '@ngrx/updater-explicit-return-type': 'error',
27
+ },
28
+ },
29
+ ];
15
30
  //# sourceMappingURL=component-store.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"component-store.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/component-store.ts"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,iBAAS;IACP,MAAM,EAAE,2BAA2B;IAEnC,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,KAAK,EAAE;QACL,iDAAiD,EAAE,MAAM;QACzD,+CAA+C,EAAE,MAAM;QACvD,oCAAoC,EAAE,MAAM;KAC7C;CACF,CAAC","sourcesContent":["/**\n * DO NOT EDIT\n * This file is generated\n */\n\nexport = {\n parser: '@typescript-eslint/parser',\n\n plugins: ['@ngrx'],\n rules: {\n '@ngrx/avoid-combining-component-store-selectors': 'warn',\n '@ngrx/avoid-mapping-component-store-selectors': 'warn',\n '@ngrx/updater-explicit-return-type': 'warn',\n },\n};\n"]}
1
+ {"version":3,"file":"component-store.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/component-store.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAIH,kBAAe,CACb,MAAkC,EAClC,MAAkC,EACD,EAAE,CAAC;IACpC;QACE,IAAI,EAAE,WAAW;QACjB,eAAe,EAAE;YACf,MAAM;YACN,UAAU,EAAE,QAAQ;SACrB;QACD,OAAO,EAAE;YACP,OAAO,EAAE,MAAM;SAChB;KACF;IACD;QACE,IAAI,EAAE,sBAAsB;QAC5B,eAAe,EAAE;YACf,MAAM;SACP;QACD,KAAK,EAAE;YACL,iDAAiD,EAAE,OAAO;YAC1D,+CAA+C,EAAE,OAAO;YACxD,oCAAoC,EAAE,OAAO;SAC9C;KACF;CACF,CAAC","sourcesContent":["/**\n * DO NOT EDIT\n * This file is generated\n */\n\nimport type { TSESLint } from '@typescript-eslint/utils';\n\nexport default (\n plugin: TSESLint.FlatConfig.Plugin,\n parser: TSESLint.FlatConfig.Parser\n): TSESLint.FlatConfig.ConfigArray => [\n {\n name: 'ngrx/base',\n languageOptions: {\n parser,\n sourceType: 'module',\n },\n plugins: {\n '@ngrx': plugin,\n },\n },\n {\n name: 'ngrx/component-store',\n languageOptions: {\n parser,\n },\n rules: {\n '@ngrx/avoid-combining-component-store-selectors': 'error',\n '@ngrx/avoid-mapping-component-store-selectors': 'error',\n '@ngrx/updater-explicit-return-type': 'error',\n },\n },\n];\n"]}
@@ -0,0 +1,9 @@
1
+ {
2
+ "parser": "@typescript-eslint/parser",
3
+ "plugins": ["@ngrx"],
4
+ "rules": {
5
+ "@ngrx/avoid-combining-component-store-selectors": "error",
6
+ "@ngrx/avoid-mapping-component-store-selectors": "error",
7
+ "@ngrx/updater-explicit-return-type": "error"
8
+ }
9
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * DO NOT EDIT
3
+ * This file is generated
4
+ */
5
+ import type { TSESLint } from '@typescript-eslint/utils';
6
+ declare const _default: (plugin: TSESLint.FlatConfig.Plugin, parser: TSESLint.FlatConfig.Parser) => TSESLint.FlatConfig.ConfigArray;
7
+ export default _default;