@ngrx/eslint-plugin 16.2.0 → 16.3.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.
- package/package.json +2 -2
- package/scripts/generate-docs.js +3 -0
- package/scripts/generate-docs.js.map +1 -1
- package/src/configs/all-requiring-type-checking.js +2 -0
- package/src/configs/all-requiring-type-checking.js.map +1 -1
- package/src/configs/all.js +2 -0
- package/src/configs/all.js.map +1 -1
- package/src/configs/component-store-strict.js +5 -1
- package/src/configs/component-store-strict.js.map +1 -1
- package/src/configs/component-store.js +5 -1
- package/src/configs/component-store.js.map +1 -1
- package/src/configs/recommended-requiring-type-checking.js +2 -0
- package/src/configs/recommended-requiring-type-checking.js.map +1 -1
- package/src/configs/recommended.js +2 -0
- package/src/configs/recommended.js.map +1 -1
- package/src/configs/strict-requiring-type-checking.js +2 -0
- package/src/configs/strict-requiring-type-checking.js.map +1 -1
- package/src/configs/strict.js +2 -0
- package/src/configs/strict.js.map +1 -1
- package/src/rules/component-store/avoid-combining-component-store-selectors.js +95 -0
- package/src/rules/component-store/avoid-combining-component-store-selectors.js.map +1 -0
- package/src/rules/component-store/avoid-mapping-component-store-selectors.js +69 -0
- package/src/rules/component-store/avoid-mapping-component-store-selectors.js.map +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngrx/eslint-plugin",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.3.0",
|
|
4
4
|
"description": "NgRx ESLint Plugin",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"typescript": ">=4.4.0"
|
|
47
47
|
},
|
|
48
48
|
"main": "./src/index.js",
|
|
49
|
-
"
|
|
49
|
+
"type": "commonjs"
|
|
50
50
|
}
|
package/scripts/generate-docs.js
CHANGED
|
@@ -74,6 +74,9 @@ try {
|
|
|
74
74
|
for (var _e = __values(Object.entries(rules_1.rules)), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
75
75
|
var _g = __read(_f.value, 2), ruleName = _g[0], meta = _g[1].meta;
|
|
76
76
|
var docPath = path.join(RULES_PATH, "".concat(ruleName, ".md"));
|
|
77
|
+
if (!(0, fs_1.existsSync)(docPath)) {
|
|
78
|
+
(0, fs_1.writeFileSync)(docPath, "");
|
|
79
|
+
}
|
|
77
80
|
var doc = (0, fs_1.readFileSync)(docPath, 'utf-8');
|
|
78
81
|
var docContent = doc.substring(doc.indexOf(PLACEHOLDER) + PLACEHOLDER.length);
|
|
79
82
|
var newDoc = (0, prettier_1.format)("# ".concat(ruleName, "\n\n").concat(meta.version ? '> Required NgRx Version Range: ${meta.version}' : '', " \n\n").concat((_b = meta.docs) === null || _b === void 0 ? void 0 : _b.description, "\n\n- **Type**: ").concat(meta.type, "\n- **Recommended**: ").concat(((_c = meta.docs) === null || _c === void 0 ? void 0 : _c.recommended) ? 'Yes' : 'No', "\n- **Fixable**: ").concat(meta.fixable ? 'Yes' : 'No', "\n- **Suggestion**: ").concat(meta.hasSuggestions ? 'Yes' : 'No', "\n- **Requires type checking**: ").concat(((_d = meta.docs) === null || _d === void 0 ? void 0 : _d.requiresTypeChecking) ? 'Yes' : 'No', "\n- **Configurable**: ").concat(meta.schema.length ? 'Yes' : 'No', "\n\n<!-- Everything above this generated, do not edit -->\n<!-- MANUAL-DOC:START -->\n\n").concat(docContent), __assign({ parser: 'markdown' }, prettierConfig));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-docs.js","sourceRoot":"","sources":["../../../../modules/eslint-plugin/scripts/generate-docs.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"generate-docs.js","sourceRoot":"","sources":["../../../../modules/eslint-plugin/scripts/generate-docs.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yBAA6D;AAC7D,yCAA6B;AAC7B,qCAAiD;AACjD,sCAAqC;AAErC,IAAM,cAAc,GAAG,wBAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AACrD,IAAM,WAAW,GAAG,2BAA2B,CAAC;AAChD,IAAM,UAAU,GAAG,sDAAsD,CAAC;;IAE1E,KAAmC,IAAA,KAAA,SAAA,MAAM,CAAC,OAAO,CAAC,aAAK,CAAC,CAAA,gBAAA,4BAAE;QAA/C,IAAA,KAAA,mBAAoB,EAAnB,QAAQ,QAAA,EAAI,IAAI,aAAA;QAC1B,IAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,UAAG,QAAQ,QAAK,CAAC,CAAC;QACxD,IAAI,CAAC,IAAA,eAAU,EAAC,OAAO,CAAC,EAAE;YACxB,IAAA,kBAAa,EAAC,OAAO,EAAE,EAAE,CAAC,CAAC;SAC5B;QACD,IAAM,GAAG,GAAG,IAAA,iBAAY,EAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC3C,IAAM,UAAU,GAAG,GAAG,CAAC,SAAS,CAC9B,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,WAAW,CAAC,MAAM,CAC9C,CAAC;QACF,IAAM,MAAM,GAAG,IAAA,iBAAM,EACnB,YAAK,QAAQ,iBAEf,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,gDAAgD,CAAC,CAAC,CAAC,EAAE,kBAEpE,MAAA,IAAI,CAAC,IAAI,0CAAE,WAAW,6BAEV,IAAI,CAAC,IAAI,kCACF,CAAA,MAAA,IAAI,CAAC,IAAI,0CAAE,WAAW,EAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,8BACzC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,iCACxB,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,6CACtB,CAAA,MAAA,IAAI,CAAC,IAAI,0CAAE,oBAAoB,EAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,mCACxD,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,qGAKrD,UAAU,CAAE,aAER,MAAM,EAAE,UAAU,IACf,cAAc,EAEpB,CAAC;QAEF,IAAA,kBAAa,EAAC,OAAO,EAAE,MAAM,CAAC,CAAC;KAChC","sourcesContent":["import { readFileSync, writeFileSync, existsSync } from 'fs';\nimport * as path from 'path';\nimport { format, resolveConfig } from 'prettier';\nimport { rules } from '../src/rules';\n\nconst prettierConfig = resolveConfig.sync(__dirname);\nconst PLACEHOLDER = '<!-- MANUAL-DOC:START -->';\nconst RULES_PATH = './projects/ngrx.io/content/guide/eslint-plugin/rules';\n\nfor (const [ruleName, { meta }] of Object.entries(rules)) {\n const docPath = path.join(RULES_PATH, `${ruleName}.md`);\n if (!existsSync(docPath)) {\n writeFileSync(docPath, ``);\n }\n const doc = readFileSync(docPath, 'utf-8');\n const docContent = doc.substring(\n doc.indexOf(PLACEHOLDER) + PLACEHOLDER.length\n );\n const newDoc = format(\n `# ${ruleName}\n\n${meta.version ? '> Required NgRx Version Range: ${meta.version}' : ''} \n\n${meta.docs?.description}\n\n- **Type**: ${meta.type}\n- **Recommended**: ${meta.docs?.recommended ? 'Yes' : 'No'}\n- **Fixable**: ${meta.fixable ? 'Yes' : 'No'}\n- **Suggestion**: ${meta.hasSuggestions ? 'Yes' : 'No'}\n- **Requires type checking**: ${meta.docs?.requiresTypeChecking ? 'Yes' : 'No'}\n- **Configurable**: ${meta.schema.length ? 'Yes' : 'No'}\n\n<!-- Everything above this generated, do not edit -->\n<!-- MANUAL-DOC:START -->\n\n${docContent}`,\n {\n parser: 'markdown',\n ...prettierConfig,\n }\n );\n\n writeFileSync(docPath, newDoc);\n}\n"]}
|
|
@@ -12,6 +12,8 @@ module.exports = {
|
|
|
12
12
|
},
|
|
13
13
|
plugins: ['@ngrx'],
|
|
14
14
|
rules: {
|
|
15
|
+
'@ngrx/avoid-combining-component-store-selectors': 'warn',
|
|
16
|
+
'@ngrx/avoid-mapping-component-store-selectors': 'warn',
|
|
15
17
|
'@ngrx/updater-explicit-return-type': 'warn',
|
|
16
18
|
'@ngrx/avoid-cyclic-effects': 'warn',
|
|
17
19
|
'@ngrx/no-dispatch-in-effects': 'warn',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"all-requiring-type-checking.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/all-requiring-type-checking.ts"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,iBAAS;IACP,MAAM,EAAE,2BAA2B;IACnC,aAAa,EAAE;QACb,WAAW,EAAE,IAAI;QACjB,UAAU,EAAE,QAAQ;QACpB,OAAO,EAAE,iBAAiB;KAC3B;IACD,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,KAAK,EAAE;QACL,oCAAoC,EAAE,MAAM;QAC5C,4BAA4B,EAAE,MAAM;QACpC,8BAA8B,EAAE,MAAM;QACtC,+BAA+B,EAAE,OAAO;QACxC,sCAAsC,EAAE,MAAM;QAC9C,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 parserOptions: {\n ecmaVersion: 2020,\n sourceType: 'module',\n project: './tsconfig.json',\n },\n plugins: ['@ngrx'],\n rules: {\n '@ngrx/updater-explicit-return-type': 'warn',\n '@ngrx/avoid-cyclic-effects': 'warn',\n '@ngrx/no-dispatch-in-effects': 'warn',\n '@ngrx/no-effects-in-providers': 'error',\n '@ngrx/no-multiple-actions-in-effects': 'warn',\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-requiring-type-checking.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/all-requiring-type-checking.ts"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,iBAAS;IACP,MAAM,EAAE,2BAA2B;IACnC,aAAa,EAAE;QACb,WAAW,EAAE,IAAI;QACjB,UAAU,EAAE,QAAQ;QACpB,OAAO,EAAE,iBAAiB;KAC3B;IACD,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,KAAK,EAAE;QACL,iDAAiD,EAAE,MAAM;QACzD,+CAA+C,EAAE,MAAM;QACvD,oCAAoC,EAAE,MAAM;QAC5C,4BAA4B,EAAE,MAAM;QACpC,8BAA8B,EAAE,MAAM;QACtC,+BAA+B,EAAE,OAAO;QACxC,sCAAsC,EAAE,MAAM;QAC9C,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 parserOptions: {\n ecmaVersion: 2020,\n sourceType: 'module',\n project: './tsconfig.json',\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/avoid-cyclic-effects': 'warn',\n '@ngrx/no-dispatch-in-effects': 'warn',\n '@ngrx/no-effects-in-providers': 'error',\n '@ngrx/no-multiple-actions-in-effects': 'warn',\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"]}
|
package/src/configs/all.js
CHANGED
|
@@ -7,6 +7,8 @@ module.exports = {
|
|
|
7
7
|
parser: '@typescript-eslint/parser',
|
|
8
8
|
plugins: ['@ngrx'],
|
|
9
9
|
rules: {
|
|
10
|
+
'@ngrx/avoid-combining-component-store-selectors': 'warn',
|
|
11
|
+
'@ngrx/avoid-mapping-component-store-selectors': 'warn',
|
|
10
12
|
'@ngrx/updater-explicit-return-type': 'warn',
|
|
11
13
|
'@ngrx/no-dispatch-in-effects': 'warn',
|
|
12
14
|
'@ngrx/no-effects-in-providers': 'error',
|
package/src/configs/all.js.map
CHANGED
|
@@ -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,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/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;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"]}
|
|
@@ -6,6 +6,10 @@
|
|
|
6
6
|
module.exports = {
|
|
7
7
|
parser: '@typescript-eslint/parser',
|
|
8
8
|
plugins: ['@ngrx'],
|
|
9
|
-
rules: {
|
|
9
|
+
rules: {
|
|
10
|
+
'@ngrx/avoid-combining-component-store-selectors': 'error',
|
|
11
|
+
'@ngrx/avoid-mapping-component-store-selectors': 'error',
|
|
12
|
+
'@ngrx/updater-explicit-return-type': 'error',
|
|
13
|
+
},
|
|
10
14
|
};
|
|
11
15
|
//# sourceMappingURL=component-store-strict.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-store-strict.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/component-store-strict.ts"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,iBAAS;IACP,MAAM,EAAE,2BAA2B;IAEnC,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,KAAK,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"component-store-strict.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/component-store-strict.ts"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,iBAAS;IACP,MAAM,EAAE,2BAA2B;IAEnC,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,KAAK,EAAE;QACL,iDAAiD,EAAE,OAAO;QAC1D,+CAA+C,EAAE,OAAO;QACxD,oCAAoC,EAAE,OAAO;KAC9C;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': 'error',\n '@ngrx/avoid-mapping-component-store-selectors': 'error',\n '@ngrx/updater-explicit-return-type': 'error',\n },\n};\n"]}
|
|
@@ -6,6 +6,10 @@
|
|
|
6
6
|
module.exports = {
|
|
7
7
|
parser: '@typescript-eslint/parser',
|
|
8
8
|
plugins: ['@ngrx'],
|
|
9
|
-
rules: {
|
|
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
|
+
},
|
|
10
14
|
};
|
|
11
15
|
//# 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,EAAE,
|
|
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"]}
|
|
@@ -12,6 +12,8 @@ module.exports = {
|
|
|
12
12
|
},
|
|
13
13
|
plugins: ['@ngrx'],
|
|
14
14
|
rules: {
|
|
15
|
+
'@ngrx/avoid-combining-component-store-selectors': 'warn',
|
|
16
|
+
'@ngrx/avoid-mapping-component-store-selectors': 'warn',
|
|
15
17
|
'@ngrx/updater-explicit-return-type': 'warn',
|
|
16
18
|
'@ngrx/avoid-cyclic-effects': 'warn',
|
|
17
19
|
'@ngrx/no-dispatch-in-effects': 'warn',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recommended-requiring-type-checking.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/recommended-requiring-type-checking.ts"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,iBAAS;IACP,MAAM,EAAE,2BAA2B;IACnC,aAAa,EAAE;QACb,WAAW,EAAE,IAAI;QACjB,UAAU,EAAE,QAAQ;QACpB,OAAO,EAAE,iBAAiB;KAC3B;IACD,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,KAAK,EAAE;QACL,oCAAoC,EAAE,MAAM;QAC5C,4BAA4B,EAAE,MAAM;QACpC,8BAA8B,EAAE,MAAM;QACtC,+BAA+B,EAAE,OAAO;QACxC,sCAAsC,EAAE,MAAM;QAC9C,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 parserOptions: {\n ecmaVersion: 2020,\n sourceType: 'module',\n project: './tsconfig.json',\n },\n plugins: ['@ngrx'],\n rules: {\n '@ngrx/updater-explicit-return-type': 'warn',\n '@ngrx/avoid-cyclic-effects': 'warn',\n '@ngrx/no-dispatch-in-effects': 'warn',\n '@ngrx/no-effects-in-providers': 'error',\n '@ngrx/no-multiple-actions-in-effects': 'warn',\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":"recommended-requiring-type-checking.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/recommended-requiring-type-checking.ts"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,iBAAS;IACP,MAAM,EAAE,2BAA2B;IACnC,aAAa,EAAE;QACb,WAAW,EAAE,IAAI;QACjB,UAAU,EAAE,QAAQ;QACpB,OAAO,EAAE,iBAAiB;KAC3B;IACD,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,KAAK,EAAE;QACL,iDAAiD,EAAE,MAAM;QACzD,+CAA+C,EAAE,MAAM;QACvD,oCAAoC,EAAE,MAAM;QAC5C,4BAA4B,EAAE,MAAM;QACpC,8BAA8B,EAAE,MAAM;QACtC,+BAA+B,EAAE,OAAO;QACxC,sCAAsC,EAAE,MAAM;QAC9C,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 parserOptions: {\n ecmaVersion: 2020,\n sourceType: 'module',\n project: './tsconfig.json',\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/avoid-cyclic-effects': 'warn',\n '@ngrx/no-dispatch-in-effects': 'warn',\n '@ngrx/no-effects-in-providers': 'error',\n '@ngrx/no-multiple-actions-in-effects': 'warn',\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"]}
|
|
@@ -7,6 +7,8 @@ module.exports = {
|
|
|
7
7
|
parser: '@typescript-eslint/parser',
|
|
8
8
|
plugins: ['@ngrx'],
|
|
9
9
|
rules: {
|
|
10
|
+
'@ngrx/avoid-combining-component-store-selectors': 'warn',
|
|
11
|
+
'@ngrx/avoid-mapping-component-store-selectors': 'warn',
|
|
10
12
|
'@ngrx/updater-explicit-return-type': 'warn',
|
|
11
13
|
'@ngrx/no-dispatch-in-effects': 'warn',
|
|
12
14
|
'@ngrx/no-effects-in-providers': 'error',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recommended.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/recommended.ts"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,iBAAS;IACP,MAAM,EAAE,2BAA2B;IAEnC,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,KAAK,EAAE;QACL,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/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":"recommended.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/recommended.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"]}
|
|
@@ -12,6 +12,8 @@ module.exports = {
|
|
|
12
12
|
},
|
|
13
13
|
plugins: ['@ngrx'],
|
|
14
14
|
rules: {
|
|
15
|
+
'@ngrx/avoid-combining-component-store-selectors': 'error',
|
|
16
|
+
'@ngrx/avoid-mapping-component-store-selectors': 'error',
|
|
15
17
|
'@ngrx/updater-explicit-return-type': 'error',
|
|
16
18
|
'@ngrx/avoid-cyclic-effects': 'error',
|
|
17
19
|
'@ngrx/no-dispatch-in-effects': 'error',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strict-requiring-type-checking.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/strict-requiring-type-checking.ts"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,iBAAS;IACP,MAAM,EAAE,2BAA2B;IACnC,aAAa,EAAE;QACb,WAAW,EAAE,IAAI;QACjB,UAAU,EAAE,QAAQ;QACpB,OAAO,EAAE,iBAAiB;KAC3B;IACD,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,KAAK,EAAE;QACL,oCAAoC,EAAE,OAAO;QAC7C,4BAA4B,EAAE,OAAO;QACrC,8BAA8B,EAAE,OAAO;QACvC,+BAA+B,EAAE,OAAO;QACxC,sCAAsC,EAAE,OAAO;QAC/C,wCAAwC,EAAE,OAAO;QACjD,iCAAiC,EAAE,OAAO;QAC1C,iDAAiD,EAAE,OAAO;QAC1D,uCAAuC,EAAE,OAAO;QAChD,iCAAiC,EAAE,OAAO;QAC1C,uDAAuD,EAAE,OAAO;QAChE,0CAA0C,EAAE,OAAO;QACnD,+BAA+B,EAAE,OAAO;QACxC,2BAA2B,EAAE,OAAO;QACpC,iCAAiC,EAAE,OAAO;QAC1C,+BAA+B,EAAE,OAAO;QACxC,6BAA6B,EAAE,OAAO;QACtC,6BAA6B,EAAE,OAAO;QACtC,wCAAwC,EAAE,OAAO;QACjD,yCAAyC,EAAE,OAAO;QAClD,6BAA6B,EAAE,OAAO;QACtC,kCAAkC,EAAE,OAAO;QAC3C,yDAAyD,EAAE,OAAO;QAClE,iCAAiC,EAAE,OAAO;QAC1C,oCAAoC,EAAE,OAAO;QAC7C,oBAAoB,EAAE,OAAO;QAC7B,wCAAwC,EAAE,OAAO;KAClD;CACF,CAAC","sourcesContent":["/**\n * DO NOT EDIT\n * This file is generated\n */\n\nexport = {\n parser: '@typescript-eslint/parser',\n parserOptions: {\n ecmaVersion: 2020,\n sourceType: 'module',\n project: './tsconfig.json',\n },\n plugins: ['@ngrx'],\n rules: {\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-concat-latest-from': 'error',\n '@ngrx/prefer-effect-callback-in-block-statement': 'error',\n '@ngrx/use-effects-lifecycle-interface': '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"]}
|
|
1
|
+
{"version":3,"file":"strict-requiring-type-checking.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/strict-requiring-type-checking.ts"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,iBAAS;IACP,MAAM,EAAE,2BAA2B;IACnC,aAAa,EAAE;QACb,WAAW,EAAE,IAAI;QACjB,UAAU,EAAE,QAAQ;QACpB,OAAO,EAAE,iBAAiB;KAC3B;IACD,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,KAAK,EAAE;QACL,iDAAiD,EAAE,OAAO;QAC1D,+CAA+C,EAAE,OAAO;QACxD,oCAAoC,EAAE,OAAO;QAC7C,4BAA4B,EAAE,OAAO;QACrC,8BAA8B,EAAE,OAAO;QACvC,+BAA+B,EAAE,OAAO;QACxC,sCAAsC,EAAE,OAAO;QAC/C,wCAAwC,EAAE,OAAO;QACjD,iCAAiC,EAAE,OAAO;QAC1C,iDAAiD,EAAE,OAAO;QAC1D,uCAAuC,EAAE,OAAO;QAChD,iCAAiC,EAAE,OAAO;QAC1C,uDAAuD,EAAE,OAAO;QAChE,0CAA0C,EAAE,OAAO;QACnD,+BAA+B,EAAE,OAAO;QACxC,2BAA2B,EAAE,OAAO;QACpC,iCAAiC,EAAE,OAAO;QAC1C,+BAA+B,EAAE,OAAO;QACxC,6BAA6B,EAAE,OAAO;QACtC,6BAA6B,EAAE,OAAO;QACtC,wCAAwC,EAAE,OAAO;QACjD,yCAAyC,EAAE,OAAO;QAClD,6BAA6B,EAAE,OAAO;QACtC,kCAAkC,EAAE,OAAO;QAC3C,yDAAyD,EAAE,OAAO;QAClE,iCAAiC,EAAE,OAAO;QAC1C,oCAAoC,EAAE,OAAO;QAC7C,oBAAoB,EAAE,OAAO;QAC7B,wCAAwC,EAAE,OAAO;KAClD;CACF,CAAC","sourcesContent":["/**\n * DO NOT EDIT\n * This file is generated\n */\n\nexport = {\n parser: '@typescript-eslint/parser',\n parserOptions: {\n ecmaVersion: 2020,\n sourceType: 'module',\n project: './tsconfig.json',\n },\n plugins: ['@ngrx'],\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-concat-latest-from': 'error',\n '@ngrx/prefer-effect-callback-in-block-statement': 'error',\n '@ngrx/use-effects-lifecycle-interface': '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"]}
|
package/src/configs/strict.js
CHANGED
|
@@ -7,6 +7,8 @@ module.exports = {
|
|
|
7
7
|
parser: '@typescript-eslint/parser',
|
|
8
8
|
plugins: ['@ngrx'],
|
|
9
9
|
rules: {
|
|
10
|
+
'@ngrx/avoid-combining-component-store-selectors': 'error',
|
|
11
|
+
'@ngrx/avoid-mapping-component-store-selectors': 'error',
|
|
10
12
|
'@ngrx/updater-explicit-return-type': 'error',
|
|
11
13
|
'@ngrx/no-dispatch-in-effects': 'error',
|
|
12
14
|
'@ngrx/no-effects-in-providers': 'error',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strict.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/strict.ts"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,iBAAS;IACP,MAAM,EAAE,2BAA2B;IAEnC,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,KAAK,EAAE;QACL,oCAAoC,EAAE,OAAO;QAC7C,8BAA8B,EAAE,OAAO;QACvC,+BAA+B,EAAE,OAAO;QACxC,wCAAwC,EAAE,OAAO;QACjD,iCAAiC,EAAE,OAAO;QAC1C,iDAAiD,EAAE,OAAO;QAC1D,uCAAuC,EAAE,OAAO;QAChD,iCAAiC,EAAE,OAAO;QAC1C,uDAAuD,EAAE,OAAO;QAChE,0CAA0C,EAAE,OAAO;QACnD,+BAA+B,EAAE,OAAO;QACxC,2BAA2B,EAAE,OAAO;QACpC,iCAAiC,EAAE,OAAO;QAC1C,+BAA+B,EAAE,OAAO;QACxC,6BAA6B,EAAE,OAAO;QACtC,6BAA6B,EAAE,OAAO;QACtC,wCAAwC,EAAE,OAAO;QACjD,yCAAyC,EAAE,OAAO;QAClD,6BAA6B,EAAE,OAAO;QACtC,kCAAkC,EAAE,OAAO;QAC3C,yDAAyD,EAAE,OAAO;QAClE,iCAAiC,EAAE,OAAO;QAC1C,oCAAoC,EAAE,OAAO;QAC7C,oBAAoB,EAAE,OAAO;QAC7B,wCAAwC,EAAE,OAAO;KAClD;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/updater-explicit-return-type': 'error',\n '@ngrx/no-dispatch-in-effects': 'error',\n '@ngrx/no-effects-in-providers': 'error',\n '@ngrx/prefer-action-creator-in-of-type': 'error',\n '@ngrx/prefer-concat-latest-from': 'error',\n '@ngrx/prefer-effect-callback-in-block-statement': 'error',\n '@ngrx/use-effects-lifecycle-interface': '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"]}
|
|
1
|
+
{"version":3,"file":"strict.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/strict.ts"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,iBAAS;IACP,MAAM,EAAE,2BAA2B;IAEnC,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,KAAK,EAAE;QACL,iDAAiD,EAAE,OAAO;QAC1D,+CAA+C,EAAE,OAAO;QACxD,oCAAoC,EAAE,OAAO;QAC7C,8BAA8B,EAAE,OAAO;QACvC,+BAA+B,EAAE,OAAO;QACxC,wCAAwC,EAAE,OAAO;QACjD,iCAAiC,EAAE,OAAO;QAC1C,iDAAiD,EAAE,OAAO;QAC1D,uCAAuC,EAAE,OAAO;QAChD,iCAAiC,EAAE,OAAO;QAC1C,uDAAuD,EAAE,OAAO;QAChE,0CAA0C,EAAE,OAAO;QACnD,+BAA+B,EAAE,OAAO;QACxC,2BAA2B,EAAE,OAAO;QACpC,iCAAiC,EAAE,OAAO;QAC1C,+BAA+B,EAAE,OAAO;QACxC,6BAA6B,EAAE,OAAO;QACtC,6BAA6B,EAAE,OAAO;QACtC,wCAAwC,EAAE,OAAO;QACjD,yCAAyC,EAAE,OAAO;QAClD,6BAA6B,EAAE,OAAO;QACtC,kCAAkC,EAAE,OAAO;QAC3C,yDAAyD,EAAE,OAAO;QAClE,iCAAiC,EAAE,OAAO;QAC1C,oCAAoC,EAAE,OAAO;QAC7C,oBAAoB,EAAE,OAAO;QAC7B,wCAAwC,EAAE,OAAO;KAClD;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': 'error',\n '@ngrx/avoid-mapping-component-store-selectors': 'error',\n '@ngrx/updater-explicit-return-type': 'error',\n '@ngrx/no-dispatch-in-effects': 'error',\n '@ngrx/no-effects-in-providers': 'error',\n '@ngrx/prefer-action-creator-in-of-type': 'error',\n '@ngrx/prefer-concat-latest-from': 'error',\n '@ngrx/prefer-effect-callback-in-block-statement': 'error',\n '@ngrx/use-effects-lifecycle-interface': '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"]}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
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]; } };
|
|
7
|
+
}
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __values = (this && this.__values) || function(o) {
|
|
26
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
27
|
+
if (m) return m.call(o);
|
|
28
|
+
if (o && typeof o.length === "number") return {
|
|
29
|
+
next: function () {
|
|
30
|
+
if (o && i >= o.length) o = void 0;
|
|
31
|
+
return { value: o && o[i++], done: !o };
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
35
|
+
};
|
|
36
|
+
var _a;
|
|
37
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
+
exports.messageId = void 0;
|
|
39
|
+
var path = __importStar(require("path"));
|
|
40
|
+
var rule_creator_1 = require("../../rule-creator");
|
|
41
|
+
var utils_1 = require("../../utils");
|
|
42
|
+
exports.messageId = 'avoidCombiningComponentStoreSelectors';
|
|
43
|
+
exports.default = (0, rule_creator_1.createRule)({
|
|
44
|
+
name: path.parse(__filename).name,
|
|
45
|
+
meta: {
|
|
46
|
+
type: 'suggestion',
|
|
47
|
+
ngrxModule: 'component-store',
|
|
48
|
+
docs: {
|
|
49
|
+
description: 'Prefer combining selectors at the selector level.',
|
|
50
|
+
recommended: 'warn',
|
|
51
|
+
},
|
|
52
|
+
schema: [],
|
|
53
|
+
messages: (_a = {},
|
|
54
|
+
_a[exports.messageId] = 'Combine selectors at the selector level.',
|
|
55
|
+
_a),
|
|
56
|
+
},
|
|
57
|
+
defaultOptions: [],
|
|
58
|
+
create: function (context) {
|
|
59
|
+
var _a;
|
|
60
|
+
var _b = (0, utils_1.getNgRxComponentStores)(context).identifiers, identifiers = _b === void 0 ? [] : _b;
|
|
61
|
+
var storeNames = identifiers.length > 0 ? (0, utils_1.asPattern)(identifiers) : null;
|
|
62
|
+
var thisSelects = "CallExpression[callee.object.type='ThisExpression'][callee.property.name='select']";
|
|
63
|
+
var storeSelects = storeNames ? (0, utils_1.namedExpression)(storeNames) : null;
|
|
64
|
+
var selectsInArray = [];
|
|
65
|
+
return _a = {},
|
|
66
|
+
_a["ClassDeclaration[superClass.name=/Store/] CallExpression[callee.name='combineLatest'] ".concat(thisSelects, " ~ ").concat(thisSelects)] = function (node) {
|
|
67
|
+
selectsInArray.push(node);
|
|
68
|
+
},
|
|
69
|
+
_a["CallExpression[callee.name='combineLatest'] ".concat(storeSelects, " ~ ").concat(storeSelects)] = function (node) {
|
|
70
|
+
selectsInArray.push(node);
|
|
71
|
+
},
|
|
72
|
+
_a["CallExpression[callee.name='combineLatest']:exit"] = function () {
|
|
73
|
+
var e_1, _a;
|
|
74
|
+
try {
|
|
75
|
+
for (var selectsInArray_1 = __values(selectsInArray), selectsInArray_1_1 = selectsInArray_1.next(); !selectsInArray_1_1.done; selectsInArray_1_1 = selectsInArray_1.next()) {
|
|
76
|
+
var node = selectsInArray_1_1.value;
|
|
77
|
+
context.report({
|
|
78
|
+
node: node,
|
|
79
|
+
messageId: exports.messageId,
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
84
|
+
finally {
|
|
85
|
+
try {
|
|
86
|
+
if (selectsInArray_1_1 && !selectsInArray_1_1.done && (_a = selectsInArray_1.return)) _a.call(selectsInArray_1);
|
|
87
|
+
}
|
|
88
|
+
finally { if (e_1) throw e_1.error; }
|
|
89
|
+
}
|
|
90
|
+
selectsInArray.length = 0;
|
|
91
|
+
},
|
|
92
|
+
_a;
|
|
93
|
+
},
|
|
94
|
+
});
|
|
95
|
+
//# sourceMappingURL=avoid-combining-component-store-selectors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avoid-combining-component-store-selectors.js","sourceRoot":"","sources":["../../../../../../modules/eslint-plugin/src/rules/component-store/avoid-combining-component-store-selectors.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,yCAA6B;AAC7B,mDAAgD;AAChD,qCAIqB;AACR,QAAA,SAAS,GAAG,uCAAuC,CAAC;AAIjE,kBAAe,IAAA,yBAAU,EAAsB;IAC7C,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,IAAI;IACjC,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,UAAU,EAAE,iBAAiB;QAC7B,IAAI,EAAE;YACJ,WAAW,EAAE,mDAAmD;YAChE,WAAW,EAAE,MAAM;SACpB;QACD,MAAM,EAAE,EAAE;QACV,QAAQ;YACN,GAAC,iBAAS,IAAG,0CAA0C;eACxD;KACF;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,EAAE,UAAC,OAAO;;QACN,IAAA,KAAqB,IAAA,8BAAsB,EAAC,OAAO,CAAC,YAApC,EAAhB,WAAW,mBAAG,EAAE,KAAA,CAAqC;QAC7D,IAAM,UAAU,GAAG,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAA,iBAAS,EAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAE1E,IAAM,WAAW,GAAG,oFAAoF,CAAC;QACzG,IAAM,YAAY,GAAG,UAAU,CAAC,CAAC,CAAC,IAAA,uBAAe,EAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAErE,IAAM,cAAc,GAA8B,EAAE,CAAC;QACrD;YACE,GAAC,gGAAyF,WAAW,gBAAM,WAAW,CAAE,IAAxH,UACE,IAA6B;gBAE7B,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC5B,CAAC;YACD,GAAC,sDAA+C,YAAY,gBAAM,YAAY,CAAE,IAAhF,UACE,IAA6B;gBAE7B,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC5B,CAAC;YACD,GAAC,kDAAkD,IAAnD;;;oBACE,KAAmB,IAAA,mBAAA,SAAA,cAAc,CAAA,8CAAA,0EAAE;wBAA9B,IAAM,IAAI,2BAAA;wBACb,OAAO,CAAC,MAAM,CAAC;4BACb,IAAI,MAAA;4BACJ,SAAS,mBAAA;yBACV,CAAC,CAAC;qBACJ;;;;;;;;;gBACD,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC;YAC5B,CAAC;eACD;IACJ,CAAC;CACF,CAAC,CAAC","sourcesContent":["import type { TSESTree } from '@typescript-eslint/experimental-utils';\nimport * as path from 'path';\nimport { createRule } from '../../rule-creator';\nimport {\n asPattern,\n getNgRxComponentStores,\n namedExpression,\n} from '../../utils';\nexport const messageId = 'avoidCombiningComponentStoreSelectors';\ntype MessageIds = typeof messageId;\ntype Options = readonly [];\n\nexport default createRule<Options, MessageIds>({\n name: path.parse(__filename).name,\n meta: {\n type: 'suggestion',\n ngrxModule: 'component-store',\n docs: {\n description: 'Prefer combining selectors at the selector level.',\n recommended: 'warn',\n },\n schema: [],\n messages: {\n [messageId]: 'Combine selectors at the selector level.',\n },\n },\n defaultOptions: [],\n create: (context) => {\n const { identifiers = [] } = getNgRxComponentStores(context);\n const storeNames = identifiers.length > 0 ? asPattern(identifiers) : null;\n\n const thisSelects = `CallExpression[callee.object.type='ThisExpression'][callee.property.name='select']`;\n const storeSelects = storeNames ? namedExpression(storeNames) : null;\n\n const selectsInArray: TSESTree.CallExpression[] = [];\n return {\n [`ClassDeclaration[superClass.name=/Store/] CallExpression[callee.name='combineLatest'] ${thisSelects} ~ ${thisSelects}`](\n node: TSESTree.CallExpression\n ) {\n selectsInArray.push(node);\n },\n [`CallExpression[callee.name='combineLatest'] ${storeSelects} ~ ${storeSelects}`](\n node: TSESTree.CallExpression\n ) {\n selectsInArray.push(node);\n },\n [`CallExpression[callee.name='combineLatest']:exit`]() {\n for (const node of selectsInArray) {\n context.report({\n node,\n messageId,\n });\n }\n selectsInArray.length = 0;\n },\n };\n },\n});\n"]}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
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]; } };
|
|
7
|
+
}
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var _a;
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.messageId = void 0;
|
|
28
|
+
var path = __importStar(require("path"));
|
|
29
|
+
var rule_creator_1 = require("../../rule-creator");
|
|
30
|
+
var utils_1 = require("../../utils");
|
|
31
|
+
exports.messageId = 'avoidMappingComponentStoreSelectors';
|
|
32
|
+
exports.default = (0, rule_creator_1.createRule)({
|
|
33
|
+
name: path.parse(__filename).name,
|
|
34
|
+
meta: {
|
|
35
|
+
type: 'problem',
|
|
36
|
+
ngrxModule: 'component-store',
|
|
37
|
+
docs: {
|
|
38
|
+
description: 'Avoid mapping logic outside the selector level.',
|
|
39
|
+
recommended: 'warn',
|
|
40
|
+
},
|
|
41
|
+
schema: [],
|
|
42
|
+
messages: (_a = {},
|
|
43
|
+
_a[exports.messageId] = 'Map logic at the selector level instead.',
|
|
44
|
+
_a),
|
|
45
|
+
},
|
|
46
|
+
defaultOptions: [],
|
|
47
|
+
create: function (context) {
|
|
48
|
+
var _a;
|
|
49
|
+
var _b = (0, utils_1.getNgRxComponentStores)(context).identifiers, identifiers = _b === void 0 ? [] : _b;
|
|
50
|
+
var storeNames = identifiers.length > 0 ? (0, utils_1.asPattern)(identifiers) : null;
|
|
51
|
+
var mapOperatorSelector = "[callee.property.name=pipe] > CallExpression[callee.name=map]";
|
|
52
|
+
var selectors = [
|
|
53
|
+
"ClassDeclaration[superClass.name=/Store/] CallExpression:has(CallExpression[callee.object.type='ThisExpression'][callee.property.name='select'])".concat(mapOperatorSelector),
|
|
54
|
+
storeNames &&
|
|
55
|
+
"".concat((0, utils_1.namedCallableExpression)(storeNames)).concat(mapOperatorSelector),
|
|
56
|
+
]
|
|
57
|
+
.filter(Boolean)
|
|
58
|
+
.join(',');
|
|
59
|
+
return _a = {},
|
|
60
|
+
_a[selectors] = function (node) {
|
|
61
|
+
context.report({
|
|
62
|
+
node: node,
|
|
63
|
+
messageId: exports.messageId,
|
|
64
|
+
});
|
|
65
|
+
},
|
|
66
|
+
_a;
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
//# sourceMappingURL=avoid-mapping-component-store-selectors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avoid-mapping-component-store-selectors.js","sourceRoot":"","sources":["../../../../../../modules/eslint-plugin/src/rules/component-store/avoid-mapping-component-store-selectors.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,yCAA6B;AAC7B,mDAAgD;AAChD,qCAIqB;AAER,QAAA,SAAS,GAAG,qCAAqC,CAAC;AAK/D,kBAAe,IAAA,yBAAU,EAAsB;IAC7C,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,IAAI;IACjC,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,UAAU,EAAE,iBAAiB;QAC7B,IAAI,EAAE;YACJ,WAAW,EAAE,iDAAiD;YAC9D,WAAW,EAAE,MAAM;SACpB;QACD,MAAM,EAAE,EAAE;QACV,QAAQ;YACN,GAAC,iBAAS,IAAG,0CAA0C;eACxD;KACF;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,EAAE,UAAC,OAAO;;QACN,IAAA,KAAqB,IAAA,8BAAsB,EAAC,OAAO,CAAC,YAApC,EAAhB,WAAW,mBAAG,EAAE,KAAA,CAAqC;QAC7D,IAAM,UAAU,GAAG,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAA,iBAAS,EAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAE1E,IAAM,mBAAmB,GAAG,+DAA+D,CAAC;QAC5F,IAAM,SAAS,GAAG;YAChB,0JAAmJ,mBAAmB,CAAE;YACxK,UAAU;gBACR,UAAG,IAAA,+BAAuB,EAAC,UAAU,CAAC,SAAG,mBAAmB,CAAE;SACjE;aACE,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,GAAG,CAAC,CAAC;QAEb;YACE,GAAC,SAAS,IAAV,UAAY,IAAsC;gBAChD,OAAO,CAAC,MAAM,CAAC;oBACb,IAAI,MAAA;oBACJ,SAAS,mBAAA;iBACV,CAAC,CAAC;YACL,CAAC;eACD;IACJ,CAAC;CACF,CAAC,CAAC","sourcesContent":["import type { TSESTree } from '@typescript-eslint/experimental-utils';\nimport * as path from 'path';\nimport { createRule } from '../../rule-creator';\nimport {\n asPattern,\n getNgRxComponentStores,\n namedCallableExpression,\n} from '../../utils';\n\nexport const messageId = 'avoidMappingComponentStoreSelectors';\n\ntype MessageIds = typeof messageId;\ntype Options = readonly [];\n\nexport default createRule<Options, MessageIds>({\n name: path.parse(__filename).name,\n meta: {\n type: 'problem',\n ngrxModule: 'component-store',\n docs: {\n description: 'Avoid mapping logic outside the selector level.',\n recommended: 'warn',\n },\n schema: [],\n messages: {\n [messageId]: 'Map logic at the selector level instead.',\n },\n },\n defaultOptions: [],\n create: (context) => {\n const { identifiers = [] } = getNgRxComponentStores(context);\n const storeNames = identifiers.length > 0 ? asPattern(identifiers) : null;\n\n const mapOperatorSelector = `[callee.property.name=pipe] > CallExpression[callee.name=map]`;\n const selectors = [\n `ClassDeclaration[superClass.name=/Store/] CallExpression:has(CallExpression[callee.object.type='ThisExpression'][callee.property.name='select'])${mapOperatorSelector}`,\n storeNames &&\n `${namedCallableExpression(storeNames)}${mapOperatorSelector}`,\n ]\n .filter(Boolean)\n .join(',');\n\n return {\n [selectors](node: TSESTree.ArrowFunctionExpression) {\n context.report({\n node,\n messageId,\n });\n },\n };\n },\n});\n"]}
|