@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.
- package/jest.config.d.ts +15 -0
- package/package.json +3 -5
- package/schematics/ng-add/index.d.ts +3 -0
- package/schematics/ng-add/index.js +32 -20
- package/schematics/ng-add/index.js.map +1 -1
- package/schematics/ng-add/schema.d.ts +3 -0
- package/schematics/ng-add/schema.js.map +1 -1
- package/schematics/ng-add/schema.json +16 -51
- package/scripts/generate-config.d.ts +1 -0
- package/scripts/generate-config.js +73 -73
- package/scripts/generate-config.js.map +1 -1
- package/scripts/generate-docs.d.ts +1 -0
- package/scripts/generate-docs.js +33 -65
- package/scripts/generate-docs.js.map +1 -1
- package/scripts/generate-overview.d.ts +1 -0
- package/scripts/generate-overview.js +43 -75
- package/scripts/generate-overview.js.map +1 -1
- package/spec/utils/from-fixture.d.ts +8 -0
- package/spec/utils/from-fixture.js +62 -0
- package/spec/utils/from-fixture.js.map +1 -0
- package/spec/utils/index.d.ts +2 -0
- package/spec/utils/index.js +16 -19
- package/spec/utils/index.js.map +1 -1
- package/spec/utils/rule-tester.d.ts +5 -0
- package/spec/utils/rule-tester.js +23 -0
- package/spec/utils/rule-tester.js.map +1 -0
- package/src/configs/all.d.ts +7 -0
- package/src/configs/all.js +56 -32
- package/src/configs/all.js.map +1 -1
- package/src/configs/all.json +42 -0
- package/src/configs/component-store.d.ts +7 -0
- package/src/configs/component-store.js +23 -8
- package/src/configs/component-store.js.map +1 -1
- package/src/configs/component-store.json +9 -0
- package/src/configs/effects.d.ts +7 -0
- package/src/configs/effects.js +32 -11
- package/src/configs/effects.js.map +1 -1
- package/src/configs/effects.json +13 -0
- package/src/configs/operators.d.ts +7 -0
- package/src/configs/operators.js +28 -0
- package/src/configs/operators.js.map +1 -0
- package/src/configs/operators.json +7 -0
- package/src/configs/signals.d.ts +7 -0
- package/src/configs/signals.js +34 -0
- package/src/configs/signals.js.map +1 -0
- package/src/configs/signals.json +8 -0
- package/src/configs/store.d.ts +7 -0
- package/src/configs/store.js +38 -23
- package/src/configs/store.js.map +1 -1
- package/src/configs/store.json +24 -0
- package/src/index.d.ts +141 -0
- package/src/index.js +18 -3
- package/src/index.js.map +1 -1
- package/src/rule-creator.d.ts +24 -0
- package/src/rule-creator.js +12 -58
- package/src/rule-creator.js.map +1 -1
- package/src/rules/component-store/avoid-combining-component-store-selectors.d.ts +3 -0
- package/src/rules/component-store/avoid-combining-component-store-selectors.js +22 -47
- package/src/rules/component-store/avoid-combining-component-store-selectors.js.map +1 -1
- package/src/rules/component-store/avoid-mapping-component-store-selectors.d.ts +3 -0
- package/src/rules/component-store/avoid-mapping-component-store-selectors.js +17 -20
- package/src/rules/component-store/avoid-mapping-component-store-selectors.js.map +1 -1
- package/src/rules/component-store/updater-explicit-return-type.d.ts +3 -0
- package/src/rules/component-store/updater-explicit-return-type.js +17 -20
- package/src/rules/component-store/updater-explicit-return-type.js.map +1 -1
- package/src/rules/effects/avoid-cyclic-effects.d.ts +4 -0
- package/src/rules/effects/avoid-cyclic-effects.js +47 -109
- package/src/rules/effects/avoid-cyclic-effects.js.map +1 -1
- package/src/rules/effects/no-dispatch-in-effects.d.ts +5 -0
- package/src/rules/effects/no-dispatch-in-effects.js +17 -21
- package/src/rules/effects/no-dispatch-in-effects.js.map +1 -1
- package/src/rules/effects/no-effects-in-providers.d.ts +3 -0
- package/src/rules/effects/no-effects-in-providers.js +18 -49
- package/src/rules/effects/no-effects-in-providers.js.map +1 -1
- package/src/rules/effects/no-multiple-actions-in-effects.d.ts +5 -0
- package/src/rules/effects/no-multiple-actions-in-effects.js +31 -24
- package/src/rules/effects/no-multiple-actions-in-effects.js.map +1 -1
- package/src/rules/effects/prefer-action-creator-in-of-type.d.ts +3 -0
- package/src/rules/effects/prefer-action-creator-in-of-type.js +10 -13
- package/src/rules/effects/prefer-action-creator-in-of-type.js.map +1 -1
- package/src/rules/effects/prefer-effect-callback-in-block-statement.d.ts +4 -0
- package/src/rules/effects/prefer-effect-callback-in-block-statement.js +24 -43
- package/src/rules/effects/prefer-effect-callback-in-block-statement.js.map +1 -1
- package/src/rules/effects/use-effects-lifecycle-interface.d.ts +3 -0
- package/src/rules/effects/use-effects-lifecycle-interface.js +21 -24
- package/src/rules/effects/use-effects-lifecycle-interface.js.map +1 -1
- package/src/rules/index.d.ts +33 -0
- package/src/rules/index.js +69 -53
- package/src/rules/index.js.map +1 -1
- package/src/rules/operators/prefer-concat-latest-from.d.ts +7 -0
- package/src/rules/operators/prefer-concat-latest-from.js +123 -0
- package/src/rules/operators/prefer-concat-latest-from.js.map +1 -0
- package/src/rules/signals/signal-state-no-arrays-at-root-level.d.ts +3 -0
- package/src/rules/signals/signal-state-no-arrays-at-root-level.js +59 -0
- package/src/rules/signals/signal-state-no-arrays-at-root-level.js.map +1 -0
- package/src/rules/signals/with-state-no-arrays-at-root-level.d.ts +4 -0
- package/src/rules/signals/with-state-no-arrays-at-root-level.js +72 -0
- package/src/rules/signals/with-state-no-arrays-at-root-level.js.map +1 -0
- package/src/rules/store/avoid-combining-selectors.d.ts +3 -0
- package/src/rules/store/avoid-combining-selectors.js +20 -45
- package/src/rules/store/avoid-combining-selectors.js.map +1 -1
- package/src/rules/store/avoid-dispatching-multiple-actions-sequentially.d.ts +3 -0
- package/src/rules/store/avoid-dispatching-multiple-actions-sequentially.js +20 -47
- package/src/rules/store/avoid-dispatching-multiple-actions-sequentially.js.map +1 -1
- package/src/rules/store/avoid-duplicate-actions-in-reducer.d.ts +5 -0
- package/src/rules/store/avoid-duplicate-actions-in-reducer.js +33 -101
- package/src/rules/store/avoid-duplicate-actions-in-reducer.js.map +1 -1
- package/src/rules/store/avoid-mapping-selectors.d.ts +3 -0
- package/src/rules/store/avoid-mapping-selectors.js +24 -30
- package/src/rules/store/avoid-mapping-selectors.js.map +1 -1
- package/src/rules/store/good-action-hygiene.d.ts +3 -0
- package/src/rules/store/good-action-hygiene.js +14 -34
- package/src/rules/store/good-action-hygiene.js.map +1 -1
- package/src/rules/store/no-multiple-global-stores.d.ts +6 -0
- package/src/rules/store/no-multiple-global-stores.js +34 -96
- package/src/rules/store/no-multiple-global-stores.js.map +1 -1
- package/src/rules/store/no-reducer-in-key-names.d.ts +5 -0
- package/src/rules/store/no-reducer-in-key-names.js +16 -20
- package/src/rules/store/no-reducer-in-key-names.js.map +1 -1
- package/src/rules/store/no-store-subscription.d.ts +3 -0
- package/src/rules/store/no-store-subscription.js +13 -16
- package/src/rules/store/no-store-subscription.js.map +1 -1
- package/src/rules/store/no-typed-global-store.d.ts +5 -0
- package/src/rules/store/no-typed-global-store.js +29 -70
- package/src/rules/store/no-typed-global-store.js.map +1 -1
- package/src/rules/store/on-function-explicit-return-type.d.ts +6 -0
- package/src/rules/store/on-function-explicit-return-type.js +23 -43
- package/src/rules/store/on-function-explicit-return-type.js.map +1 -1
- package/src/rules/store/prefer-action-creator-in-dispatch.d.ts +3 -0
- package/src/rules/store/prefer-action-creator-in-dispatch.js +15 -18
- package/src/rules/store/prefer-action-creator-in-dispatch.js.map +1 -1
- package/src/rules/store/prefer-action-creator.d.ts +3 -0
- package/src/rules/store/prefer-action-creator.js +10 -13
- package/src/rules/store/prefer-action-creator.js.map +1 -1
- package/src/rules/store/prefer-inline-action-props.d.ts +5 -0
- package/src/rules/store/prefer-inline-action-props.js +14 -18
- package/src/rules/store/prefer-inline-action-props.js.map +1 -1
- package/src/rules/store/prefer-one-generic-in-create-for-feature-selector.d.ts +5 -0
- package/src/rules/store/prefer-one-generic-in-create-for-feature-selector.js +16 -37
- package/src/rules/store/prefer-one-generic-in-create-for-feature-selector.js.map +1 -1
- package/src/rules/store/prefer-selector-in-select.d.ts +3 -0
- package/src/rules/store/prefer-selector-in-select.js +21 -46
- package/src/rules/store/prefer-selector-in-select.js.map +1 -1
- package/src/rules/store/prefix-selectors-with-select.d.ts +5 -0
- package/src/rules/store/prefix-selectors-with-select.js +26 -39
- package/src/rules/store/prefix-selectors-with-select.js.map +1 -1
- package/src/rules/store/select-style.d.ts +11 -0
- package/src/rules/store/select-style.js +53 -108
- package/src/rules/store/select-style.js.map +1 -1
- package/src/rules/store/use-consistent-global-store-name.d.ts +6 -0
- package/src/rules/store/use-consistent-global-store-name.js +24 -80
- package/src/rules/store/use-consistent-global-store-name.js.map +1 -1
- package/src/utils/helper-functions/docs.d.ts +1 -0
- package/src/utils/helper-functions/docs.js +1 -3
- package/src/utils/helper-functions/docs.js.map +1 -1
- package/src/utils/helper-functions/folder.d.ts +5 -0
- package/src/utils/helper-functions/folder.js +16 -88
- package/src/utils/helper-functions/folder.js.map +1 -1
- package/src/utils/helper-functions/guards.d.ts +97 -0
- package/src/utils/helper-functions/guards.js +27 -31
- package/src/utils/helper-functions/guards.js.map +1 -1
- package/src/utils/helper-functions/index.d.ts +6 -0
- package/src/utils/helper-functions/ngrx-modules.d.ts +8 -0
- package/src/utils/helper-functions/ngrx-modules.js +7 -6
- package/src/utils/helper-functions/ngrx-modules.js.map +1 -1
- package/src/utils/helper-functions/rules.d.ts +3 -0
- package/src/utils/helper-functions/rules.js +47 -0
- package/src/utils/helper-functions/rules.js.map +1 -0
- package/src/utils/helper-functions/utils.d.ts +48 -0
- package/src/utils/helper-functions/utils.js +68 -143
- package/src/utils/helper-functions/utils.js.map +1 -1
- package/src/utils/helper-functions/versions.d.ts +1 -0
- package/src/utils/helper-functions/versions.js +9 -10
- package/src/utils/helper-functions/versions.js.map +1 -1
- package/src/utils/index.d.ts +2 -0
- package/src/utils/selectors/index.d.ts +29 -0
- package/src/utils/selectors/index.js +30 -44
- package/src/utils/selectors/index.js.map +1 -1
- package/v9/index.d.ts +29 -0
- package/v9/index.js +38 -0
- package/v9/index.js.map +1 -0
- package/src/configs/all-requiring-type-checking.js +0 -46
- package/src/configs/all-requiring-type-checking.js.map +0 -1
- package/src/configs/component-store-strict.js +0 -15
- package/src/configs/component-store-strict.js.map +0 -1
- package/src/configs/effects-requiring-type-checking.js +0 -25
- package/src/configs/effects-requiring-type-checking.js.map +0 -1
- package/src/configs/effects-strict-requiring-type-checking.js +0 -25
- package/src/configs/effects-strict-requiring-type-checking.js.map +0 -1
- package/src/configs/effects-strict.js +0 -18
- package/src/configs/effects-strict.js.map +0 -1
- package/src/configs/index.js +0 -33
- package/src/configs/index.js.map +0 -1
- package/src/configs/recommended-requiring-type-checking.js +0 -46
- package/src/configs/recommended-requiring-type-checking.js.map +0 -1
- package/src/configs/recommended.js +0 -39
- package/src/configs/recommended.js.map +0 -1
- package/src/configs/store-strict.js +0 -30
- package/src/configs/store-strict.js.map +0 -1
- package/src/configs/strict-requiring-type-checking.js +0 -46
- package/src/configs/strict-requiring-type-checking.js.map +0 -1
- package/src/configs/strict.js +0 -39
- package/src/configs/strict.js.map +0 -1
- package/src/rules/effects/prefer-concat-latest-from.js +0 -153
- package/src/rules/effects/prefer-concat-latest-from.js.map +0 -1
package/src/configs/effects.js
CHANGED
|
@@ -3,16 +3,37 @@
|
|
|
3
3
|
* DO NOT EDIT
|
|
4
4
|
* This file is generated
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
+
},
|
|
16
17
|
},
|
|
17
|
-
|
|
18
|
+
{
|
|
19
|
+
name: 'ngrx/effects',
|
|
20
|
+
languageOptions: {
|
|
21
|
+
parser,
|
|
22
|
+
parserOptions: {
|
|
23
|
+
ecmaVersion: 2020,
|
|
24
|
+
sourceType: 'module',
|
|
25
|
+
project: './tsconfig.json',
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
rules: {
|
|
29
|
+
'@ngrx/avoid-cyclic-effects': 'error',
|
|
30
|
+
'@ngrx/no-dispatch-in-effects': 'error',
|
|
31
|
+
'@ngrx/no-effects-in-providers': 'error',
|
|
32
|
+
'@ngrx/no-multiple-actions-in-effects': 'error',
|
|
33
|
+
'@ngrx/prefer-action-creator-in-of-type': 'error',
|
|
34
|
+
'@ngrx/prefer-effect-callback-in-block-statement': 'error',
|
|
35
|
+
'@ngrx/use-effects-lifecycle-interface': 'error',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
];
|
|
18
39
|
//# sourceMappingURL=effects.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"effects.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/effects.ts"],"names":[],"mappings":";AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"effects.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/effects.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,cAAc;QACpB,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,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;SACjD;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/effects',\n languageOptions: {\n parser,\n parserOptions: {\n ecmaVersion: 2020,\n sourceType: 'module',\n project: './tsconfig.json',\n },\n },\n rules: {\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 },\n },\n];\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"parser": "@typescript-eslint/parser",
|
|
3
|
+
"plugins": ["@ngrx"],
|
|
4
|
+
"rules": {
|
|
5
|
+
"@ngrx/avoid-cyclic-effects": "error",
|
|
6
|
+
"@ngrx/no-dispatch-in-effects": "error",
|
|
7
|
+
"@ngrx/no-effects-in-providers": "error",
|
|
8
|
+
"@ngrx/no-multiple-actions-in-effects": "error",
|
|
9
|
+
"@ngrx/prefer-action-creator-in-of-type": "error",
|
|
10
|
+
"@ngrx/prefer-effect-callback-in-block-statement": "error",
|
|
11
|
+
"@ngrx/use-effects-lifecycle-interface": "error"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -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;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* DO NOT EDIT
|
|
4
|
+
* This file is generated
|
|
5
|
+
*/
|
|
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
|
+
},
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: 'ngrx/operators',
|
|
20
|
+
languageOptions: {
|
|
21
|
+
parser,
|
|
22
|
+
},
|
|
23
|
+
rules: {
|
|
24
|
+
'@ngrx/prefer-concat-latest-from': 'error',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
];
|
|
28
|
+
//# sourceMappingURL=operators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operators.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/operators.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,gBAAgB;QACtB,eAAe,EAAE;YACf,MAAM;SACP;QACD,KAAK,EAAE;YACL,iCAAiC,EAAE,OAAO;SAC3C;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/operators',\n languageOptions: {\n parser,\n },\n rules: {\n '@ngrx/prefer-concat-latest-from': 'error',\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;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* DO NOT EDIT
|
|
4
|
+
* This file is generated
|
|
5
|
+
*/
|
|
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
|
+
},
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: 'ngrx/signals',
|
|
20
|
+
languageOptions: {
|
|
21
|
+
parser,
|
|
22
|
+
parserOptions: {
|
|
23
|
+
ecmaVersion: 2020,
|
|
24
|
+
sourceType: 'module',
|
|
25
|
+
project: './tsconfig.json',
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
rules: {
|
|
29
|
+
'@ngrx/signal-state-no-arrays-at-root-level': 'error',
|
|
30
|
+
'@ngrx/with-state-no-arrays-at-root-level': 'error',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
];
|
|
34
|
+
//# sourceMappingURL=signals.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signals.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/signals.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,cAAc;QACpB,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,4CAA4C,EAAE,OAAO;YACrD,0CAA0C,EAAE,OAAO;SACpD;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/signals',\n languageOptions: {\n parser,\n parserOptions: {\n ecmaVersion: 2020,\n sourceType: 'module',\n project: './tsconfig.json',\n },\n },\n rules: {\n '@ngrx/signal-state-no-arrays-at-root-level': 'error',\n '@ngrx/with-state-no-arrays-at-root-level': 'error',\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;
|
package/src/configs/store.js
CHANGED
|
@@ -3,28 +3,43 @@
|
|
|
3
3
|
* DO NOT EDIT
|
|
4
4
|
* This file is generated
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
'@ngrx/no-store-subscription': 'warn',
|
|
18
|
-
'@ngrx/no-typed-global-store': 'warn',
|
|
19
|
-
'@ngrx/on-function-explicit-return-type': 'warn',
|
|
20
|
-
'@ngrx/prefer-action-creator-in-dispatch': 'warn',
|
|
21
|
-
'@ngrx/prefer-action-creator': 'warn',
|
|
22
|
-
'@ngrx/prefer-inline-action-props': 'warn',
|
|
23
|
-
'@ngrx/prefer-one-generic-in-create-for-feature-selector': 'warn',
|
|
24
|
-
'@ngrx/prefer-selector-in-select': 'warn',
|
|
25
|
-
'@ngrx/prefix-selectors-with-select': 'warn',
|
|
26
|
-
'@ngrx/select-style': 'warn',
|
|
27
|
-
'@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
|
+
},
|
|
28
17
|
},
|
|
29
|
-
|
|
18
|
+
{
|
|
19
|
+
name: 'ngrx/store',
|
|
20
|
+
languageOptions: {
|
|
21
|
+
parser,
|
|
22
|
+
},
|
|
23
|
+
rules: {
|
|
24
|
+
'@ngrx/avoid-combining-selectors': 'error',
|
|
25
|
+
'@ngrx/avoid-dispatching-multiple-actions-sequentially': 'error',
|
|
26
|
+
'@ngrx/avoid-duplicate-actions-in-reducer': 'error',
|
|
27
|
+
'@ngrx/avoid-mapping-selectors': 'error',
|
|
28
|
+
'@ngrx/good-action-hygiene': 'error',
|
|
29
|
+
'@ngrx/no-multiple-global-stores': 'error',
|
|
30
|
+
'@ngrx/no-reducer-in-key-names': 'error',
|
|
31
|
+
'@ngrx/no-store-subscription': 'error',
|
|
32
|
+
'@ngrx/no-typed-global-store': 'error',
|
|
33
|
+
'@ngrx/on-function-explicit-return-type': 'error',
|
|
34
|
+
'@ngrx/prefer-action-creator-in-dispatch': 'error',
|
|
35
|
+
'@ngrx/prefer-action-creator': 'error',
|
|
36
|
+
'@ngrx/prefer-inline-action-props': 'error',
|
|
37
|
+
'@ngrx/prefer-one-generic-in-create-for-feature-selector': 'error',
|
|
38
|
+
'@ngrx/prefer-selector-in-select': 'error',
|
|
39
|
+
'@ngrx/prefix-selectors-with-select': 'error',
|
|
40
|
+
'@ngrx/select-style': 'error',
|
|
41
|
+
'@ngrx/use-consistent-global-store-name': 'error',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
];
|
|
30
45
|
//# sourceMappingURL=store.js.map
|
package/src/configs/store.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/store.ts"],"names":[],"mappings":";AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/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,YAAY;QAClB,eAAe,EAAE;YACf,MAAM;SACP;QACD,KAAK,EAAE;YACL,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/store',\n languageOptions: {\n parser,\n },\n rules: {\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,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"parser": "@typescript-eslint/parser",
|
|
3
|
+
"plugins": ["@ngrx"],
|
|
4
|
+
"rules": {
|
|
5
|
+
"@ngrx/avoid-combining-selectors": "error",
|
|
6
|
+
"@ngrx/avoid-dispatching-multiple-actions-sequentially": "error",
|
|
7
|
+
"@ngrx/avoid-duplicate-actions-in-reducer": "error",
|
|
8
|
+
"@ngrx/avoid-mapping-selectors": "error",
|
|
9
|
+
"@ngrx/good-action-hygiene": "error",
|
|
10
|
+
"@ngrx/no-multiple-global-stores": "error",
|
|
11
|
+
"@ngrx/no-reducer-in-key-names": "error",
|
|
12
|
+
"@ngrx/no-store-subscription": "error",
|
|
13
|
+
"@ngrx/no-typed-global-store": "error",
|
|
14
|
+
"@ngrx/on-function-explicit-return-type": "error",
|
|
15
|
+
"@ngrx/prefer-action-creator-in-dispatch": "error",
|
|
16
|
+
"@ngrx/prefer-action-creator": "error",
|
|
17
|
+
"@ngrx/prefer-inline-action-props": "error",
|
|
18
|
+
"@ngrx/prefer-one-generic-in-create-for-feature-selector": "error",
|
|
19
|
+
"@ngrx/prefer-selector-in-select": "error",
|
|
20
|
+
"@ngrx/prefix-selectors-with-select": "error",
|
|
21
|
+
"@ngrx/select-style": "error",
|
|
22
|
+
"@ngrx/use-consistent-global-store-name": "error"
|
|
23
|
+
}
|
|
24
|
+
}
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
configs: {
|
|
3
|
+
all: {
|
|
4
|
+
parser: string;
|
|
5
|
+
plugins: string[];
|
|
6
|
+
rules: {
|
|
7
|
+
"@ngrx/avoid-combining-component-store-selectors": string;
|
|
8
|
+
"@ngrx/avoid-mapping-component-store-selectors": string;
|
|
9
|
+
"@ngrx/updater-explicit-return-type": string;
|
|
10
|
+
"@ngrx/avoid-cyclic-effects": string;
|
|
11
|
+
"@ngrx/no-dispatch-in-effects": string;
|
|
12
|
+
"@ngrx/no-effects-in-providers": string;
|
|
13
|
+
"@ngrx/no-multiple-actions-in-effects": string;
|
|
14
|
+
"@ngrx/prefer-action-creator-in-of-type": string;
|
|
15
|
+
"@ngrx/prefer-effect-callback-in-block-statement": string;
|
|
16
|
+
"@ngrx/use-effects-lifecycle-interface": string;
|
|
17
|
+
"@ngrx/prefer-concat-latest-from": string;
|
|
18
|
+
"@ngrx/signal-state-no-arrays-at-root-level": string;
|
|
19
|
+
"@ngrx/with-state-no-arrays-at-root-level": string;
|
|
20
|
+
"@ngrx/avoid-combining-selectors": string;
|
|
21
|
+
"@ngrx/avoid-dispatching-multiple-actions-sequentially": string;
|
|
22
|
+
"@ngrx/avoid-duplicate-actions-in-reducer": string;
|
|
23
|
+
"@ngrx/avoid-mapping-selectors": string;
|
|
24
|
+
"@ngrx/good-action-hygiene": string;
|
|
25
|
+
"@ngrx/no-multiple-global-stores": string;
|
|
26
|
+
"@ngrx/no-reducer-in-key-names": string;
|
|
27
|
+
"@ngrx/no-store-subscription": string;
|
|
28
|
+
"@ngrx/no-typed-global-store": string;
|
|
29
|
+
"@ngrx/on-function-explicit-return-type": string;
|
|
30
|
+
"@ngrx/prefer-action-creator-in-dispatch": string;
|
|
31
|
+
"@ngrx/prefer-action-creator": string;
|
|
32
|
+
"@ngrx/prefer-inline-action-props": string;
|
|
33
|
+
"@ngrx/prefer-one-generic-in-create-for-feature-selector": string;
|
|
34
|
+
"@ngrx/prefer-selector-in-select": string;
|
|
35
|
+
"@ngrx/prefix-selectors-with-select": string;
|
|
36
|
+
"@ngrx/select-style": string;
|
|
37
|
+
"@ngrx/use-consistent-global-store-name": string;
|
|
38
|
+
};
|
|
39
|
+
parserOptions: {
|
|
40
|
+
ecmaVersion: number;
|
|
41
|
+
sourceType: string;
|
|
42
|
+
project: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
'component-store': {
|
|
46
|
+
parser: string;
|
|
47
|
+
plugins: string[];
|
|
48
|
+
rules: {
|
|
49
|
+
"@ngrx/avoid-combining-component-store-selectors": string;
|
|
50
|
+
"@ngrx/avoid-mapping-component-store-selectors": string;
|
|
51
|
+
"@ngrx/updater-explicit-return-type": string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
effects: {
|
|
55
|
+
parser: string;
|
|
56
|
+
plugins: string[];
|
|
57
|
+
rules: {
|
|
58
|
+
"@ngrx/avoid-cyclic-effects": string;
|
|
59
|
+
"@ngrx/no-dispatch-in-effects": string;
|
|
60
|
+
"@ngrx/no-effects-in-providers": string;
|
|
61
|
+
"@ngrx/no-multiple-actions-in-effects": string;
|
|
62
|
+
"@ngrx/prefer-action-creator-in-of-type": string;
|
|
63
|
+
"@ngrx/prefer-effect-callback-in-block-statement": string;
|
|
64
|
+
"@ngrx/use-effects-lifecycle-interface": string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
store: {
|
|
68
|
+
parser: string;
|
|
69
|
+
plugins: string[];
|
|
70
|
+
rules: {
|
|
71
|
+
"@ngrx/avoid-combining-selectors": string;
|
|
72
|
+
"@ngrx/avoid-dispatching-multiple-actions-sequentially": string;
|
|
73
|
+
"@ngrx/avoid-duplicate-actions-in-reducer": string;
|
|
74
|
+
"@ngrx/avoid-mapping-selectors": string;
|
|
75
|
+
"@ngrx/good-action-hygiene": string;
|
|
76
|
+
"@ngrx/no-multiple-global-stores": string;
|
|
77
|
+
"@ngrx/no-reducer-in-key-names": string;
|
|
78
|
+
"@ngrx/no-store-subscription": string;
|
|
79
|
+
"@ngrx/no-typed-global-store": string;
|
|
80
|
+
"@ngrx/on-function-explicit-return-type": string;
|
|
81
|
+
"@ngrx/prefer-action-creator-in-dispatch": string;
|
|
82
|
+
"@ngrx/prefer-action-creator": string;
|
|
83
|
+
"@ngrx/prefer-inline-action-props": string;
|
|
84
|
+
"@ngrx/prefer-one-generic-in-create-for-feature-selector": string;
|
|
85
|
+
"@ngrx/prefer-selector-in-select": string;
|
|
86
|
+
"@ngrx/prefix-selectors-with-select": string;
|
|
87
|
+
"@ngrx/select-style": string;
|
|
88
|
+
"@ngrx/use-consistent-global-store-name": string;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
operators: {
|
|
92
|
+
parser: string;
|
|
93
|
+
plugins: string[];
|
|
94
|
+
rules: {
|
|
95
|
+
"@ngrx/prefer-concat-latest-from": string;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
signals: {
|
|
99
|
+
parser: string;
|
|
100
|
+
plugins: string[];
|
|
101
|
+
rules: {
|
|
102
|
+
"@ngrx/signal-state-no-arrays-at-root-level": string;
|
|
103
|
+
"@ngrx/with-state-no-arrays-at-root-level": string;
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
rules: {
|
|
108
|
+
'avoid-combining-component-store-selectors': import("@typescript-eslint/utils/ts-eslint").RuleModule<"avoidCombiningComponentStoreSelectors", readonly [], import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
109
|
+
'avoid-mapping-component-store-selectors': import("@typescript-eslint/utils/ts-eslint").RuleModule<"avoidMappingComponentStoreSelectors", readonly [], import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
110
|
+
'updater-explicit-return-type': import("@typescript-eslint/utils/ts-eslint").RuleModule<"updaterExplicitReturnType", readonly [], import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
111
|
+
'avoid-cyclic-effects': import("@typescript-eslint/utils/ts-eslint").RuleModule<"avoidCyclicEffects", readonly [], import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
112
|
+
'no-dispatch-in-effects': import("@typescript-eslint/utils/ts-eslint").RuleModule<"noDispatchInEffects" | "noDispatchInEffectsSuggest", readonly [], import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
113
|
+
'no-effects-in-providers': import("@typescript-eslint/utils/ts-eslint").RuleModule<"noEffectsInProviders", readonly [], import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
114
|
+
'no-multiple-actions-in-effects': import("@typescript-eslint/utils/ts-eslint").RuleModule<"noMultipleActionsInEffects", readonly unknown[], import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
115
|
+
'prefer-action-creator-in-of-type': import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferActionCreatorInOfType", readonly [], import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
116
|
+
'prefer-effect-callback-in-block-statement': import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferEffectCallbackInBlockStatement", readonly [], import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
117
|
+
'use-effects-lifecycle-interface': import("@typescript-eslint/utils/ts-eslint").RuleModule<"useEffectsLifecycleInterface", readonly [], import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
118
|
+
'avoid-combining-selectors': import("@typescript-eslint/utils/ts-eslint").RuleModule<"avoidCombiningSelectors", readonly [], import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
119
|
+
'avoid-dispatching-multiple-actions-sequentially': import("@typescript-eslint/utils/ts-eslint").RuleModule<"avoidDispatchingMultipleActionsSequentially", readonly [], import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
120
|
+
'avoid-duplicate-actions-in-reducer': import("@typescript-eslint/utils/ts-eslint").RuleModule<"avoidDuplicateActionsInReducer" | "avoidDuplicateActionsInReducerSuggest", readonly [], import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
121
|
+
'avoid-mapping-selectors': import("@typescript-eslint/utils/ts-eslint").RuleModule<"avoidMapppingSelectors", readonly [], import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
122
|
+
'good-action-hygiene': import("@typescript-eslint/utils/ts-eslint").RuleModule<"goodActionHygiene", readonly [], import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
123
|
+
'no-multiple-global-stores': import("@typescript-eslint/utils/ts-eslint").RuleModule<"noMultipleGlobalStores" | "noMultipleGlobalStoresSuggest", readonly [], import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
124
|
+
'no-reducer-in-key-names': import("@typescript-eslint/utils/ts-eslint").RuleModule<"noReducerInKeyNames" | "noReducerInKeyNamesSuggest", readonly [], import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
125
|
+
'no-store-subscription': import("@typescript-eslint/utils/ts-eslint").RuleModule<"noStoreSubscription", readonly [], import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
126
|
+
'no-typed-global-store': import("@typescript-eslint/utils/ts-eslint").RuleModule<"noTypedStore" | "noTypedStoreSuggest", readonly [], import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
127
|
+
'on-function-explicit-return-type': import("@typescript-eslint/utils/ts-eslint").RuleModule<"onFunctionExplicitReturnType" | "onFunctionExplicitReturnTypeSuggest", readonly [], import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
128
|
+
'prefer-action-creator': import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferActionCreator", readonly [], import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
129
|
+
'prefer-action-creator-in-dispatch': import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferActionCreatorInDispatch", readonly [], import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
130
|
+
'prefer-inline-action-props': import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferInlineActionProps" | "preferInlineActionPropsSuggest", readonly [], import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
131
|
+
'prefer-one-generic-in-create-for-feature-selector': import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferOneGenericInCreateForFeatureSelector" | "preferOneGenericInCreateForFeatureSelectorSuggest", readonly [], import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
132
|
+
'prefer-selector-in-select': import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferSelectorInSelect", readonly [], import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
133
|
+
'prefix-selectors-with-select': import("@typescript-eslint/utils/ts-eslint").RuleModule<"prefixSelectorsWithSelect" | "prefixSelectorsWithSelectSuggest", readonly [], import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
134
|
+
'select-style': import("@typescript-eslint/utils/ts-eslint").RuleModule<"operator" | "method", readonly ["operator" | "method"], import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
135
|
+
'use-consistent-global-store-name': import("@typescript-eslint/utils/ts-eslint").RuleModule<"useConsistentGlobalStoreName" | "useConsistentGlobalStoreNameSuggest", readonly [string], import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
136
|
+
'prefer-concat-latest-from': import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferConcatLatestFrom", readonly [{
|
|
137
|
+
readonly strict: boolean;
|
|
138
|
+
}], import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
export = _default;
|
package/src/index.js
CHANGED
|
@@ -1,8 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
const rules_1 = require("./rules");
|
|
6
|
+
const all_json_1 = __importDefault(require("./configs/all.json"));
|
|
7
|
+
const component_store_json_1 = __importDefault(require("./configs/component-store.json"));
|
|
8
|
+
const effects_json_1 = __importDefault(require("./configs/effects.json"));
|
|
9
|
+
const store_json_1 = __importDefault(require("./configs/store.json"));
|
|
10
|
+
const operators_json_1 = __importDefault(require("./configs/operators.json"));
|
|
11
|
+
const signals_json_1 = __importDefault(require("./configs/signals.json"));
|
|
4
12
|
module.exports = {
|
|
13
|
+
configs: {
|
|
14
|
+
all: all_json_1.default,
|
|
15
|
+
'component-store': component_store_json_1.default,
|
|
16
|
+
effects: effects_json_1.default,
|
|
17
|
+
store: store_json_1.default,
|
|
18
|
+
operators: operators_json_1.default,
|
|
19
|
+
signals: signals_json_1.default,
|
|
20
|
+
},
|
|
5
21
|
rules: rules_1.rules,
|
|
6
|
-
configs: configs_1.configs,
|
|
7
22
|
};
|
|
8
23
|
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../modules/eslint-plugin/src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../modules/eslint-plugin/src/index.ts"],"names":[],"mappings":";;;;AAAA,mCAAgC;AAChC,kEAAqC;AACrC,0FAA4D;AAC5D,0EAA6C;AAC7C,sEAAyC;AACzC,8EAAiD;AACjD,0EAA6C;AAE7C,iBAAS;IACP,OAAO,EAAE;QACP,GAAG,EAAH,kBAAG;QACH,iBAAiB,EAAE,8BAAc;QACjC,OAAO,EAAE,sBAAO;QAChB,KAAK,EAAE,oBAAK;QACZ,SAAS,EAAE,wBAAS;QACpB,OAAO,EAAE,sBAAO;KACjB;IACD,KAAK,EAAL,aAAK;CACN,CAAC","sourcesContent":["import { rules } from './rules';\nimport all from './configs/all.json';\nimport componentStore from './configs/component-store.json';\nimport effects from './configs/effects.json';\nimport store from './configs/store.json';\nimport operators from './configs/operators.json';\nimport signals from './configs/signals.json';\n\nexport = {\n configs: {\n all,\n 'component-store': componentStore,\n effects: effects,\n store: store,\n operators: operators,\n signals: signals,\n },\n rules,\n};\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { TSESLint } from '@typescript-eslint/utils';
|
|
2
|
+
import type { NGRX_MODULE } from './utils';
|
|
3
|
+
type Meta<TMessageIds extends string, TOptions extends readonly unknown[]> = TSESLint.RuleMetaData<TMessageIds, TOptions> & {
|
|
4
|
+
ngrxModule: NGRX_MODULE;
|
|
5
|
+
version?: string;
|
|
6
|
+
docs: {
|
|
7
|
+
requiresTypeChecking?: boolean;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
type CreateRuleMeta<TMessageIds extends string, TOptions extends readonly unknown[]> = {
|
|
11
|
+
docs: Omit<TSESLint.RuleMetaDataDocs<TOptions>, 'url'> & {
|
|
12
|
+
requiresTypeChecking?: boolean;
|
|
13
|
+
};
|
|
14
|
+
} & Omit<Meta<TMessageIds, TOptions>, 'docs'>;
|
|
15
|
+
export type NgRxRuleModule<TOptions extends readonly unknown[], TMessageIds extends string> = Omit<TSESLint.RuleModule<TMessageIds, TOptions>, 'meta'> & {
|
|
16
|
+
meta: Meta<TMessageIds, TOptions>;
|
|
17
|
+
};
|
|
18
|
+
export declare function createRule<TOptions extends readonly unknown[], TMessageIds extends string>(config: Readonly<{
|
|
19
|
+
name: string;
|
|
20
|
+
meta: CreateRuleMeta<TMessageIds, TOptions>;
|
|
21
|
+
defaultOptions: Readonly<TOptions>;
|
|
22
|
+
create: (context: Readonly<TSESLint.RuleContext<TMessageIds, TOptions>>, optionsWithDefault: Readonly<TOptions>) => TSESLint.RuleListener;
|
|
23
|
+
}>): TSESLint.RuleModule<TMessageIds, TOptions>;
|
|
24
|
+
export {};
|
package/src/rule-creator.js
CHANGED
|
@@ -1,70 +1,24 @@
|
|
|
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 __values = (this && this.__values) || function(o) {
|
|
14
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
15
|
-
if (m) return m.call(o);
|
|
16
|
-
if (o && typeof o.length === "number") return {
|
|
17
|
-
next: function () {
|
|
18
|
-
if (o && i >= o.length) o = void 0;
|
|
19
|
-
return { value: o && o[i++], done: !o };
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
23
|
-
};
|
|
24
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
25
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
26
|
-
if (!m) return o;
|
|
27
|
-
var i = m.call(o), r, ar = [], e;
|
|
28
|
-
try {
|
|
29
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
30
|
-
}
|
|
31
|
-
catch (error) { e = { error: error }; }
|
|
32
|
-
finally {
|
|
33
|
-
try {
|
|
34
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
35
|
-
}
|
|
36
|
-
finally { if (e) throw e.error; }
|
|
37
|
-
}
|
|
38
|
-
return ar;
|
|
39
|
-
};
|
|
40
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
3
|
exports.createRule = void 0;
|
|
42
|
-
|
|
43
|
-
|
|
4
|
+
const utils_1 = require("@typescript-eslint/utils");
|
|
5
|
+
const utils_2 = require("./utils");
|
|
44
6
|
function createRule(config) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
7
|
+
const configOverwrite = {
|
|
8
|
+
...config,
|
|
9
|
+
create: (context, optionsWithDefault) => {
|
|
10
|
+
const { meta: { ngrxModule, version }, } = config;
|
|
48
11
|
if (version !== undefined &&
|
|
49
|
-
!(0,
|
|
12
|
+
!(0, utils_2.ngrxVersionSatisfies)(utils_2.NGRX_MODULE_PATHS[ngrxModule], version)) {
|
|
50
13
|
return {};
|
|
51
14
|
}
|
|
52
15
|
return config.create(context, optionsWithDefault);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
configOverwrite.meta.messages[key] = "".concat(message, " (").concat((0, utils_1.docsUrl)(config.name), ")");
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
61
|
-
finally {
|
|
62
|
-
try {
|
|
63
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
64
|
-
}
|
|
65
|
-
finally { if (e_1) throw e_1.error; }
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
for (const [key, message] of Object.entries(configOverwrite.meta.messages)) {
|
|
19
|
+
configOverwrite.meta.messages[key] = `${message} (${(0, utils_2.docsUrl)(config.name)})`;
|
|
66
20
|
}
|
|
67
|
-
return
|
|
21
|
+
return utils_1.ESLintUtils.RuleCreator(utils_2.docsUrl)(configOverwrite);
|
|
68
22
|
}
|
|
69
23
|
exports.createRule = createRule;
|
|
70
24
|
//# sourceMappingURL=rule-creator.js.map
|
package/src/rule-creator.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule-creator.js","sourceRoot":"","sources":["../../../../modules/eslint-plugin/src/rule-creator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rule-creator.js","sourceRoot":"","sources":["../../../../modules/eslint-plugin/src/rule-creator.ts"],"names":[],"mappings":";;;AACA,oDAAuD;AAEvD,mCAA2E;AAwB3E,SAAgB,UAAU,CAIxB,MAQE;IAEF,MAAM,eAAe,GAAG;QACtB,GAAG,MAAM;QACT,MAAM,EAAE,CACN,OAA8D,EAC9D,kBAAsC,EACtC,EAAE;YACF,MAAM,EACJ,IAAI,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,GAC9B,GAAG,MAAM,CAAC;YACX,IACE,OAAO,KAAK,SAAS;gBACrB,CAAC,IAAA,4BAAoB,EAAC,yBAAiB,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC,EAC7D,CAAC;gBACD,OAAO,EAAE,CAAC;YACZ,CAAC;YAED,OAAO,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAAC;QACpD,CAAC;KACF,CAAC;IAEF,KAAK,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC1E,eAAe,CAAC,IAAI,CAAC,QAAgB,CAAC,GAAG,CAAC,GAAG,GAAG,OAAO,KAAK,IAAA,eAAO,EAClE,MAAM,CAAC,IAAI,CACZ,GAAG,CAAC;IACP,CAAC;IAED,OAAO,mBAAW,CAAC,WAAW,CAAC,eAAO,CAAC,CAAC,eAAe,CAAC,CAAC;AAC3D,CAAC;AAzCD,gCAyCC","sourcesContent":["import type { TSESLint } from '@typescript-eslint/utils';\nimport { ESLintUtils } from '@typescript-eslint/utils';\nimport type { NGRX_MODULE } from './utils';\nimport { docsUrl, ngrxVersionSatisfies, NGRX_MODULE_PATHS } from './utils';\n\ntype Meta<TMessageIds extends string, TOptions extends readonly unknown[]> =\n | TSESLint.RuleMetaData<TMessageIds, TOptions> & {\n ngrxModule: NGRX_MODULE;\n version?: string;\n docs: { requiresTypeChecking?: boolean };\n };\n\ntype CreateRuleMeta<\n TMessageIds extends string,\n TOptions extends readonly unknown[]\n> = {\n docs: Omit<TSESLint.RuleMetaDataDocs<TOptions>, 'url'> & {\n requiresTypeChecking?: boolean;\n };\n} & Omit<Meta<TMessageIds, TOptions>, 'docs'>;\nexport type NgRxRuleModule<\n TOptions extends readonly unknown[],\n TMessageIds extends string\n> = Omit<TSESLint.RuleModule<TMessageIds, TOptions>, 'meta'> & {\n meta: Meta<TMessageIds, TOptions>;\n};\n\nexport function createRule<\n TOptions extends readonly unknown[],\n TMessageIds extends string\n>(\n config: Readonly<{\n name: string;\n meta: CreateRuleMeta<TMessageIds, TOptions>;\n defaultOptions: Readonly<TOptions>;\n create: (\n context: Readonly<TSESLint.RuleContext<TMessageIds, TOptions>>,\n optionsWithDefault: Readonly<TOptions>\n ) => TSESLint.RuleListener;\n }>\n): TSESLint.RuleModule<TMessageIds, TOptions> {\n const configOverwrite = {\n ...config,\n create: (\n context: Readonly<TSESLint.RuleContext<TMessageIds, TOptions>>,\n optionsWithDefault: Readonly<TOptions>\n ) => {\n const {\n meta: { ngrxModule, version },\n } = config;\n if (\n version !== undefined &&\n !ngrxVersionSatisfies(NGRX_MODULE_PATHS[ngrxModule], version)\n ) {\n return {};\n }\n\n return config.create(context, optionsWithDefault);\n },\n };\n\n for (const [key, message] of Object.entries(configOverwrite.meta.messages)) {\n (configOverwrite.meta.messages as any)[key] = `${message} (${docsUrl(\n config.name\n )})`;\n }\n\n return ESLintUtils.RuleCreator(docsUrl)(configOverwrite);\n}\n"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const messageId = "avoidCombiningComponentStoreSelectors";
|
|
2
|
+
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"avoidCombiningComponentStoreSelectors", readonly [], import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
3
|
+
export default _default;
|