@ngrx/eslint-plugin 20.1.0 → 21.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/package.json +1 -1
- package/schematics/ng-add/schema.json +15 -0
- package/scripts/generate-config.js +11 -24
- package/scripts/generate-config.js.map +1 -1
- package/scripts/generate-docs.js +0 -1
- package/scripts/generate-docs.js.map +1 -1
- package/scripts/generate-overview.js +1 -1
- package/scripts/generate-overview.js.map +1 -1
- package/spec/utils/rule-tester.d.ts +1 -1
- package/spec/utils/rule-tester.js +7 -4
- package/spec/utils/rule-tester.js.map +1 -1
- package/src/configs/all-type-checked.d.ts +7 -0
- package/src/configs/all-type-checked.js +61 -0
- package/src/configs/all-type-checked.js.map +1 -0
- package/src/configs/all-type-checked.json +41 -0
- package/src/configs/all.js +0 -10
- package/src/configs/all.js.map +1 -1
- package/src/configs/all.json +0 -9
- package/src/configs/component-store.js +0 -1
- package/src/configs/component-store.js.map +1 -1
- package/src/configs/effects-type-checked.d.ts +7 -0
- package/src/configs/effects-type-checked.js +33 -0
- package/src/configs/effects-type-checked.js.map +1 -0
- package/src/configs/effects-type-checked.json +13 -0
- package/src/configs/effects.js +0 -8
- package/src/configs/effects.js.map +1 -1
- package/src/configs/effects.json +0 -7
- package/src/configs/operators.js +0 -1
- package/src/configs/operators.js.map +1 -1
- package/src/configs/signals-type-checked.d.ts +7 -0
- package/src/configs/signals-type-checked.js +31 -0
- package/src/configs/signals-type-checked.js.map +1 -0
- package/src/configs/signals-type-checked.json +11 -0
- package/src/configs/signals.js +0 -8
- package/src/configs/signals.js.map +1 -1
- package/src/configs/signals.json +1 -8
- package/src/configs/store.js +0 -1
- package/src/configs/store.js.map +1 -1
- package/src/index.d.ts +3 -23
- package/src/index.js +6 -0
- package/src/index.js.map +1 -1
- package/src/rules/signals/signal-state-no-arrays-at-root-level.d.ts +2 -1
- package/src/rules/signals/signal-state-no-arrays-at-root-level.js +60 -3
- package/src/rules/signals/signal-state-no-arrays-at-root-level.js.map +1 -1
- package/src/rules/signals/with-state-no-arrays-at-root-level.js +46 -2
- package/src/rules/signals/with-state-no-arrays-at-root-level.js.map +1 -1
- package/src/rules/store/prefix-selectors-with-select.js +7 -1
- package/src/rules/store/prefix-selectors-with-select.js.map +1 -1
- package/v9/index.d.ts +6 -0
- package/v9/index.js +6 -0
- package/v9/index.js.map +1 -1
- package/jest.config.d.ts +0 -15
- package/jest.config.js +0 -25
- package/jest.config.js.map +0 -1
package/package.json
CHANGED
|
@@ -10,10 +10,13 @@
|
|
|
10
10
|
"default": "all",
|
|
11
11
|
"enum": [
|
|
12
12
|
"all",
|
|
13
|
+
"allTypedChecked",
|
|
13
14
|
"component-store",
|
|
14
15
|
"effects",
|
|
16
|
+
"effectsTypedChecked",
|
|
15
17
|
"operators",
|
|
16
18
|
"signals",
|
|
19
|
+
"signalsTypedChecked",
|
|
17
20
|
"store"
|
|
18
21
|
],
|
|
19
22
|
"x-prompt": {
|
|
@@ -24,6 +27,10 @@
|
|
|
24
27
|
"value": "all",
|
|
25
28
|
"label": "all"
|
|
26
29
|
},
|
|
30
|
+
{
|
|
31
|
+
"value": "allTypedChecked",
|
|
32
|
+
"label": "allTypedChecked"
|
|
33
|
+
},
|
|
27
34
|
{
|
|
28
35
|
"value": "component-store",
|
|
29
36
|
"label": "component-store"
|
|
@@ -32,6 +39,10 @@
|
|
|
32
39
|
"value": "effects",
|
|
33
40
|
"label": "effects"
|
|
34
41
|
},
|
|
42
|
+
{
|
|
43
|
+
"value": "effectsTypedChecked",
|
|
44
|
+
"label": "effectsTypedChecked"
|
|
45
|
+
},
|
|
35
46
|
{
|
|
36
47
|
"value": "operators",
|
|
37
48
|
"label": "operators"
|
|
@@ -40,6 +51,10 @@
|
|
|
40
51
|
"value": "signals",
|
|
41
52
|
"label": "signals"
|
|
42
53
|
},
|
|
54
|
+
{
|
|
55
|
+
"value": "signalsTypedChecked",
|
|
56
|
+
"label": "signalsTypedChecked"
|
|
57
|
+
},
|
|
43
58
|
{
|
|
44
59
|
"value": "store",
|
|
45
60
|
"label": "store"
|
|
@@ -8,25 +8,23 @@ const rules_1 = require("../src/utils/helper-functions/rules");
|
|
|
8
8
|
const prettierConfig = await (0, prettier_1.resolveConfig)(__dirname);
|
|
9
9
|
const RULE_MODULE = '@ngrx';
|
|
10
10
|
const CONFIG_DIRECTORY = './modules/eslint-plugin/src/configs/';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
writeConfig('
|
|
14
|
-
writeConfig('
|
|
15
|
-
writeConfig('
|
|
16
|
-
writeConfig('
|
|
11
|
+
const isModule = (rule, moduleName) => rule.meta.docs?.ngrxModule === moduleName;
|
|
12
|
+
const isTypeChecked = (rule) => rule.meta.docs?.requiresTypeChecking === true;
|
|
13
|
+
writeConfig('all', (rule) => !isTypeChecked(rule));
|
|
14
|
+
writeConfig('all-type-checked', (_rule) => true);
|
|
15
|
+
writeConfig('store', (rule) => isModule(rule, 'store') && !isTypeChecked(rule));
|
|
16
|
+
writeConfig('effects', (rule) => isModule(rule, 'effects') && !isTypeChecked(rule));
|
|
17
|
+
writeConfig('effects-type-checked', (rule) => isModule(rule, 'effects'));
|
|
18
|
+
writeConfig('component-store', (rule) => isModule(rule, 'component-store') && !isTypeChecked(rule));
|
|
19
|
+
writeConfig('operators', (rule) => isModule(rule, 'operators') && !isTypeChecked(rule));
|
|
20
|
+
writeConfig('signals', (rule) => isModule(rule, 'signals') && !isTypeChecked(rule));
|
|
21
|
+
writeConfig('signals-type-checked', (rule) => isModule(rule, 'signals'));
|
|
17
22
|
async function writeConfig(configName, predicate) {
|
|
18
23
|
const rulesForConfig = Object.entries(rules_1.rulesForGenerate).filter(([_, rule]) => predicate(rule));
|
|
19
24
|
const configRules = rulesForConfig.reduce((rules, [ruleName, _rule]) => {
|
|
20
25
|
rules[`${RULE_MODULE}/${ruleName}`] = 'error';
|
|
21
26
|
return rules;
|
|
22
27
|
}, {});
|
|
23
|
-
const requireParserOptions = rulesForConfig.some(([_, rule]) => rule.meta.docs?.requiresTypeChecking)
|
|
24
|
-
? {
|
|
25
|
-
ecmaVersion: 2020,
|
|
26
|
-
sourceType: 'module',
|
|
27
|
-
project: './tsconfig.json',
|
|
28
|
-
}
|
|
29
|
-
: null;
|
|
30
28
|
const tsCode = `
|
|
31
29
|
/**
|
|
32
30
|
* DO NOT EDIT
|
|
@@ -43,7 +41,6 @@ const rules_1 = require("../src/utils/helper-functions/rules");
|
|
|
43
41
|
name: 'ngrx/base',
|
|
44
42
|
languageOptions: {
|
|
45
43
|
parser,
|
|
46
|
-
sourceType: 'module',
|
|
47
44
|
},
|
|
48
45
|
plugins: {
|
|
49
46
|
'@ngrx': plugin,
|
|
@@ -53,9 +50,6 @@ const rules_1 = require("../src/utils/helper-functions/rules");
|
|
|
53
50
|
name: 'ngrx/${configName}',
|
|
54
51
|
languageOptions: {
|
|
55
52
|
parser,
|
|
56
|
-
${requireParserOptions
|
|
57
|
-
? `parserOptions: ${JSON.stringify(requireParserOptions, null, 2)},`
|
|
58
|
-
: ''}
|
|
59
53
|
},
|
|
60
54
|
rules: ${JSON.stringify(configRules, null, 2)}
|
|
61
55
|
},
|
|
@@ -70,13 +64,6 @@ const rules_1 = require("../src/utils/helper-functions/rules");
|
|
|
70
64
|
plugins: ['@ngrx'],
|
|
71
65
|
rules: configRules,
|
|
72
66
|
};
|
|
73
|
-
if (requireParserOptions) {
|
|
74
|
-
jsonConfig.parserOptions = {
|
|
75
|
-
ecmaVersion: 2020,
|
|
76
|
-
sourceType: 'module',
|
|
77
|
-
project: './tsconfig.json',
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
67
|
const jsonConfigFormatted = await (0, prettier_1.format)(JSON.stringify(jsonConfig, null, 2), {
|
|
81
68
|
parser: 'json',
|
|
82
69
|
...prettierConfig,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-config.js","sourceRoot":"","sources":["../../../../modules/eslint-plugin/scripts/generate-config.ts"],"names":[],"mappings":";;AAAA,2BAAmC;AACnC,+BAA4B;AAC5B,uCAAiD;AACjD,+DAAuE;AAGvE,CAAC,KAAK,IAAI,EAAE;IACV,MAAM,cAAc,GAAG,MAAM,IAAA,wBAAa,EAAC,SAAS,CAAC,CAAC;IACtD,MAAM,WAAW,GAAG,OAAO,CAAC;IAC5B,MAAM,gBAAgB,GAAG,sCAAsC,CAAC;IAEhE,
|
|
1
|
+
{"version":3,"file":"generate-config.js","sourceRoot":"","sources":["../../../../modules/eslint-plugin/scripts/generate-config.ts"],"names":[],"mappings":";;AAAA,2BAAmC;AACnC,+BAA4B;AAC5B,uCAAiD;AACjD,+DAAuE;AAGvE,CAAC,KAAK,IAAI,EAAE;IACV,MAAM,cAAc,GAAG,MAAM,IAAA,wBAAa,EAAC,SAAS,CAAC,CAAC;IACtD,MAAM,WAAW,GAAG,OAAO,CAAC;IAC5B,MAAM,gBAAgB,GAAG,sCAAsC,CAAC;IAEhE,MAAM,QAAQ,GAAG,CAAC,IAAc,EAAE,UAAkB,EAAE,EAAE,CACtD,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,KAAK,UAAU,CAAC;IAC5C,MAAM,aAAa,GAAG,CAAC,IAAc,EAAE,EAAE,CACvC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAEhD,WAAW,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;IACnD,WAAW,CAAC,kBAAkB,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;IAEjD,WAAW,CACT,OAAO,EACP,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAC1D,CAAC;IAEF,WAAW,CACT,SAAS,EACT,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,I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;;;;;;;;;;;;;;;wBAsBK,UAAU;;;;mBAIf,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;;SAE9C,CAAC;QACN,MAAM,iBAAiB,GAAG,MAAM,IAAA,iBAAM,EAAC,MAAM,EAAE;YAC7C,MAAM,EAAE,YAAY;YACpB,GAAG,cAAc;SAClB,CAAC,CAAC;QACH,IAAA,kBAAa,EACX,IAAA,WAAI,EAAC,gBAAgB,EAAE,GAAG,UAAU,KAAK,CAAC,EAC1C,iBAAiB,CAClB,CAAC;QAEF,MAAM,UAAU,GAA2B;YACzC,MAAM,EAAE,2BAA2B;YACnC,OAAO,EAAE,CAAC,OAAO,CAAC;YAClB,KAAK,EAAE,WAAW;SACnB,CAAC;QACF,MAAM,mBAAmB,GAAG,MAAM,IAAA,iBAAM,EACtC,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,EACnC;YACE,MAAM,EAAE,MAAM;YACd,GAAG,cAAc;SAClB,CACF,CAAC;QAEF,IAAA,kBAAa,EACX,IAAA,WAAI,EAAC,gBAAgB,EAAE,GAAG,UAAU,OAAO,CAAC,EAC5C,mBAAmB,CACpB,CAAC;IACJ,CAAC;AACH,CAAC,CAAC,EAAE,CAAC","sourcesContent":["import { writeFileSync } from 'fs';\nimport { join } from 'path';\nimport { format, resolveConfig } from 'prettier';\nimport { rulesForGenerate } from '../src/utils/helper-functions/rules';\nimport { NgRxRule } from '../src/rule-creator';\n\n(async () => {\n const prettierConfig = await resolveConfig(__dirname);\n const RULE_MODULE = '@ngrx';\n const CONFIG_DIRECTORY = './modules/eslint-plugin/src/configs/';\n\n const isModule = (rule: NgRxRule, moduleName: string) =>\n rule.meta.docs?.ngrxModule === moduleName;\n const isTypeChecked = (rule: NgRxRule) =>\n rule.meta.docs?.requiresTypeChecking === true;\n\n writeConfig('all', (rule) => !isTypeChecked(rule));\n writeConfig('all-type-checked', (_rule) => true);\n\n writeConfig(\n 'store',\n (rule) => isModule(rule, 'store') && !isTypeChecked(rule)\n );\n\n writeConfig(\n 'effects',\n (rule) => isModule(rule, 'effects') && !isTypeChecked(rule)\n );\n writeConfig('effects-type-checked', (rule) => isModule(rule, 'effects'));\n\n writeConfig(\n 'component-store',\n (rule) => isModule(rule, 'component-store') && !isTypeChecked(rule)\n );\n\n writeConfig(\n 'operators',\n (rule) => isModule(rule, 'operators') && !isTypeChecked(rule)\n );\n\n writeConfig(\n 'signals',\n (rule) => isModule(rule, 'signals') && !isTypeChecked(rule)\n );\n writeConfig('signals-type-checked', (rule) => isModule(rule, 'signals'));\n\n async function writeConfig(\n configName:\n | 'all'\n | 'all-type-checked'\n | 'store'\n | 'effects'\n | 'effects-type-checked'\n | 'component-store'\n | 'operators'\n | 'signals'\n | 'signals-type-checked',\n predicate: (rule: NgRxRule) => boolean\n ) {\n const rulesForConfig = Object.entries(rulesForGenerate).filter(\n ([_, rule]) => predicate(rule)\n );\n const configRules = rulesForConfig.reduce<Record<string, string>>(\n (rules, [ruleName, _rule]) => {\n rules[`${RULE_MODULE}/${ruleName}`] = 'error';\n return rules;\n },\n {}\n );\n\n const tsCode = `\n /**\n * DO NOT EDIT\n * This file is generated\n */\n\n import type { TSESLint } from '@typescript-eslint/utils';\n\n export 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 },\n plugins: {\n '@ngrx': plugin,\n },\n },\n {\n name: 'ngrx/${configName}',\n languageOptions: {\n parser,\n },\n rules: ${JSON.stringify(configRules, null, 2)}\n },\n ];`;\n const tsConfigFormatted = await format(tsCode, {\n parser: 'typescript',\n ...prettierConfig,\n });\n writeFileSync(\n join(CONFIG_DIRECTORY, `${configName}.ts`),\n tsConfigFormatted\n );\n\n const jsonConfig: { [key: string]: any } = {\n parser: '@typescript-eslint/parser',\n plugins: ['@ngrx'],\n rules: configRules,\n };\n const jsonConfigFormatted = await format(\n JSON.stringify(jsonConfig, null, 2),\n {\n parser: 'json',\n ...prettierConfig,\n }\n );\n\n writeFileSync(\n join(CONFIG_DIRECTORY, `${configName}.json`),\n jsonConfigFormatted\n );\n }\n})();\n"]}
|
package/scripts/generate-docs.js
CHANGED
|
@@ -41,7 +41,6 @@ const rules_1 = require("../src/utils/helper-functions/rules");
|
|
|
41
41
|
const prettierConfig = await (0, prettier_1.resolveConfig)(__dirname);
|
|
42
42
|
const PLACEHOLDER = '<!-- MANUAL-DOC:START -->';
|
|
43
43
|
const RULES_PATHS = [
|
|
44
|
-
'./projects/ngrx.io/content/guide/eslint-plugin/rules',
|
|
45
44
|
'./projects/www/src/app/pages/guide/eslint-plugin/rules',
|
|
46
45
|
];
|
|
47
46
|
for (const rules of RULES_PATHS) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-docs.js","sourceRoot":"","sources":["../../../../modules/eslint-plugin/scripts/generate-docs.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2BAA6D;AAC7D,2CAA6B;AAC7B,uCAAiD;AACjD,+DAAuE;AAEvE,CAAC,KAAK,IAAI,EAAE;IACV,MAAM,cAAc,GAAG,MAAM,IAAA,wBAAa,EAAC,SAAS,CAAC,CAAC;IACtD,MAAM,WAAW,GAAG,2BAA2B,CAAC;IAChD,MAAM,WAAW,GAAG;QAClB,
|
|
1
|
+
{"version":3,"file":"generate-docs.js","sourceRoot":"","sources":["../../../../modules/eslint-plugin/scripts/generate-docs.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2BAA6D;AAC7D,2CAA6B;AAC7B,uCAAiD;AACjD,+DAAuE;AAEvE,CAAC,KAAK,IAAI,EAAE;IACV,MAAM,cAAc,GAAG,MAAM,IAAA,wBAAa,EAAC,SAAS,CAAC,CAAC;IACtD,MAAM,WAAW,GAAG,2BAA2B,CAAC;IA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kBAAa,EAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QACjC,CAAC;IACH,CAAC;AACH,CAAC,CAAC,EAAE,CAAC","sourcesContent":["import { readFileSync, writeFileSync, existsSync } from 'fs';\nimport * as path from 'path';\nimport { format, resolveConfig } from 'prettier';\nimport { rulesForGenerate } from '../src/utils/helper-functions/rules';\n\n(async () => {\n const prettierConfig = await resolveConfig(__dirname);\n const PLACEHOLDER = '<!-- MANUAL-DOC:START -->';\n const RULES_PATHS = [\n './projects/www/src/app/pages/guide/eslint-plugin/rules',\n ];\n\n for (const rules of RULES_PATHS) {\n for (const [ruleName, { meta }] of Object.entries(rulesForGenerate)) {\n const docPath = path.join(rules, `${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 = await format(\n `# ${ruleName}\n\n${meta.docs?.description}\n\n- **Type**: ${meta.type}\n- **Fixable**: ${meta.fixable ? 'Yes' : 'No'}\n- **Suggestion**: ${meta.hasSuggestions ? 'Yes' : 'No'}\n- **Requires type checking**: ${meta.docs?.requiresTypeChecking ? 'Yes' : 'No'}\n- **Configurable**: ${\n Array.isArray(meta.schema) && meta.schema.length ? 'Yes' : 'No'\n }\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 }\n})();\n"]}
|
|
@@ -6,7 +6,7 @@ const prettier_1 = require("prettier");
|
|
|
6
6
|
const rules_1 = require("../src/utils/helper-functions/rules");
|
|
7
7
|
(async () => {
|
|
8
8
|
const prettierConfig = await (0, prettier_1.resolveConfig)(__dirname);
|
|
9
|
-
const OVERVIEW = './projects/
|
|
9
|
+
const OVERVIEW = './projects/www/src/app/pages/guide/eslint-plugin/index.md';
|
|
10
10
|
const GH_CONFIGS = 'https://github.com/ngrx/platform/blob/main/modules/eslint-plugin/src/configs';
|
|
11
11
|
await generateRules();
|
|
12
12
|
await generateConfigurations();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-overview.js","sourceRoot":"","sources":["../../../../modules/eslint-plugin/scripts/generate-overview.ts"],"names":[],"mappings":";;AAAA,2BAAiD;AACjD,2BAAyB;AACzB,uCAAiD;AACjD,+DAG6C;AAE7C,CAAC,KAAK,IAAI,EAAE;IACV,MAAM,cAAc,GAAG,MAAM,IAAA,wBAAa,EAAC,SAAS,CAAC,CAAC;IACtD,MAAM,QAAQ,GAAG,
|
|
1
|
+
{"version":3,"file":"generate-overview.js","sourceRoot":"","sources":["../../../../modules/eslint-plugin/scripts/generate-overview.ts"],"names":[],"mappings":";;AAAA,2BAAiD;AACjD,2BAAyB;AACzB,uCAAiD;AACjD,+DAG6C;AAE7C,CAAC,KAAK,IAAI,EAAE;IACV,MAAM,cAAc,GAAG,MAAM,IAAA,wBAAa,EAAC,SAAS,CAAC,CAAC;IACtD,MAAM,QAAQ,GAAG,2DAA2D,CAAC;IAC7E,MAAM,UAAU,GACd,8EAA8E,CAAC;IAEjF,MAAM,aAAa,EAAE,CAAC;IACtB,MAAM,sBAAsB,EAAE,CAAC;IAE/B,KAAK,UAAU,aAAa;QAC1B,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC,wBAAgB,CAAC,CAAC,MAAM,CAEzD,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE;YAC9B,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,QAAQ,QAAQ,mCAAmC,CAAC,CAAC;YACvE,CAAC;YAED,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CA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D;EACL,CAAC,WAAW,EAAE,GAAG,WAAW,CAAC,CAAC,IAAI,CAAC,QAAG,CAAC;EACvC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,EACrB;YACE,GAAG,cAAc;YACjB,MAAM,EAAE,UAAU;SACnB,CACF,CAAC;QAEF,IAAA,kBAAa,EAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;IACvC,CAAC;AACH,CAAC,CAAC,EAAE,CAAC","sourcesContent":["import { readFileSync, writeFileSync } from 'fs';\nimport { EOL } from 'os';\nimport { format, resolveConfig } from 'prettier';\nimport {\n configsForGenerate,\n rulesForGenerate,\n} from '../src/utils/helper-functions/rules';\n\n(async () => {\n const prettierConfig = await resolveConfig(__dirname);\n const OVERVIEW = './projects/www/src/app/pages/guide/eslint-plugin/index.md';\n const GH_CONFIGS =\n 'https://github.com/ngrx/platform/blob/main/modules/eslint-plugin/src/configs';\n\n await generateRules();\n await generateConfigurations();\n\n async function generateRules() {\n const moduleRules = Object.entries(rulesForGenerate).reduce<\n Record<string, string[][]>\n >((all, [ruleName, { meta }]) => {\n if (!meta.docs) {\n throw new Error(`Rule ${ruleName} is missing meta.docs information`);\n }\n\n all[meta.docs.ngrxModule] = (all[meta.docs.ngrxModule] ?? []).concat([\n [\n `[@ngrx/${ruleName}]${\n meta.docs?.url\n ? '(' +\n meta.docs.url\n .replace('https://ngrx.io', '')\n .replace('.md', '') +\n ')'\n : ''\n }`,\n meta.docs?.description ?? 'TODO',\n meta.type,\n meta.fixable ? 'Yes' : 'No',\n meta.hasSuggestions ? 'Yes' : 'No',\n Array.isArray(meta.schema) && meta.schema.length ? 'Yes' : 'No',\n meta.docs?.requiresTypeChecking ? 'Yes' : 'No',\n ],\n ]);\n return all;\n }, {});\n\n const tableHeader = `| Name | Description | Category | Fixable | Has suggestions | Configurable | Requires type information\n| --- | --- | --- | --- | --- | --- | --- |`;\n\n const configTable = Object.entries(moduleRules).map(\n ([ngrxModule, pluginRules]) => {\n const tableBody = pluginRules\n .map((rule) => `|${rule.join('|')}|`)\n .join(EOL);\n const table = [tableHeader, tableBody].join(EOL);\n\n return [`### ${ngrxModule}`, table].join(EOL);\n }\n );\n\n const overview = readFileSync(OVERVIEW, 'utf-8');\n const start = overview.indexOf('<!-- RULES-CONFIG:START -->');\n const end = overview.indexOf('<!-- RULES-CONFIG:END -->');\n\n const newOverview = await format(\n `${overview.substring(0, start + '<!-- RULES-CONFIG:START -->'.length)}\n${configTable.join(EOL)}\n${overview.substring(end)}`,\n {\n ...prettierConfig,\n parser: 'markdown',\n }\n );\n\n writeFileSync(OVERVIEW, newOverview);\n }\n\n async function generateConfigurations() {\n const tableHeader = `| Name |\n | --- |`;\n\n const overview = readFileSync(OVERVIEW, 'utf-8');\n const start = overview.indexOf('<!-- CONFIGURATIONS-CONFIG:START -->');\n const end = overview.indexOf('<!-- CONFIGURATIONS-CONFIG:END -->');\n\n const configTable = configsForGenerate.map(\n (configName) => `| [${configName}](${GH_CONFIGS}/${configName}.json) |`\n );\n const newOverview = await format(\n `${overview.substring(\n 0,\n start + '<!-- CONFIGURATIONS-CONFIG:START -->'.length\n )}\n${[tableHeader, ...configTable].join(EOL)}\n${overview.substring(end)}`,\n {\n ...prettierConfig,\n parser: 'markdown',\n }\n );\n\n writeFileSync(OVERVIEW, newOverview);\n }\n})();\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { RuleTester } from '@typescript-eslint/rule-tester';
|
|
2
|
-
export declare function ruleTester(): RuleTester;
|
|
2
|
+
export declare function ruleTester(requiresTypeChecking?: boolean): RuleTester;
|
|
@@ -3,14 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ruleTester = ruleTester;
|
|
4
4
|
const rule_tester_1 = require("@typescript-eslint/rule-tester");
|
|
5
5
|
const path_1 = require("path");
|
|
6
|
-
function ruleTester() {
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
function ruleTester(requiresTypeChecking) {
|
|
7
|
+
const languageOptions = (requiresTypeChecking ?? false)
|
|
8
|
+
? {
|
|
9
9
|
parserOptions: {
|
|
10
10
|
tsconfigRootDir: (0, path_1.resolve)('./modules/eslint-plugin/spec/fixtures'),
|
|
11
11
|
project: './tsconfig.json',
|
|
12
12
|
},
|
|
13
|
-
}
|
|
13
|
+
}
|
|
14
|
+
: undefined;
|
|
15
|
+
return new rule_tester_1.RuleTester({
|
|
16
|
+
languageOptions,
|
|
14
17
|
});
|
|
15
18
|
}
|
|
16
19
|
//# sourceMappingURL=rule-tester.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule-tester.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/spec/utils/rule-tester.ts"],"names":[],"mappings":";;AAGA,
|
|
1
|
+
{"version":3,"file":"rule-tester.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/spec/utils/rule-tester.ts"],"names":[],"mappings":";;AAGA,gCAaC;AAhBD,gEAA4D;AAC5D,+BAA+B;AAE/B,SAAgB,UAAU,CAAC,oBAA8B;IACvD,MAAM,eAAe,GACnB,CAAC,oBAAoB,IAAI,KAAK,CAAC;QAC7B,CAAC,CAAC;YACE,aAAa,EAAE;gBACb,eAAe,EAAE,IAAA,cAAO,EAAC,uCAAuC,CAAC;gBACjE,OAAO,EAAE,iBAAiB;aAC3B;SACF;QACH,CAAC,CAAC,SAAS,CAAC;IAChB,OAAO,IAAI,wBAAU,CAAC;QACpB,eAAe;KAChB,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { RuleTester } from '@typescript-eslint/rule-tester';\nimport { resolve } from 'path';\n\nexport function ruleTester(requiresTypeChecking?: boolean) {\n const languageOptions =\n (requiresTypeChecking ?? false)\n ? {\n parserOptions: {\n tsconfigRootDir: resolve('./modules/eslint-plugin/spec/fixtures'),\n project: './tsconfig.json',\n },\n }\n : undefined;\n return new RuleTester({\n languageOptions,\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,61 @@
|
|
|
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
|
+
},
|
|
13
|
+
plugins: {
|
|
14
|
+
'@ngrx': plugin,
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: 'ngrx/all-type-checked',
|
|
19
|
+
languageOptions: {
|
|
20
|
+
parser,
|
|
21
|
+
},
|
|
22
|
+
rules: {
|
|
23
|
+
'@ngrx/avoid-combining-component-store-selectors': 'error',
|
|
24
|
+
'@ngrx/avoid-mapping-component-store-selectors': 'error',
|
|
25
|
+
'@ngrx/require-super-ondestroy': 'error',
|
|
26
|
+
'@ngrx/updater-explicit-return-type': 'error',
|
|
27
|
+
'@ngrx/avoid-cyclic-effects': 'error',
|
|
28
|
+
'@ngrx/no-dispatch-in-effects': 'error',
|
|
29
|
+
'@ngrx/no-effects-in-providers': 'error',
|
|
30
|
+
'@ngrx/no-multiple-actions-in-effects': 'error',
|
|
31
|
+
'@ngrx/prefer-action-creator-in-of-type': 'error',
|
|
32
|
+
'@ngrx/prefer-effect-callback-in-block-statement': 'error',
|
|
33
|
+
'@ngrx/use-effects-lifecycle-interface': 'error',
|
|
34
|
+
'@ngrx/prefer-concat-latest-from': 'error',
|
|
35
|
+
'@ngrx/enforce-type-call': 'error',
|
|
36
|
+
'@ngrx/prefer-protected-state': 'error',
|
|
37
|
+
'@ngrx/signal-state-no-arrays-at-root-level': 'error',
|
|
38
|
+
'@ngrx/signal-store-feature-should-use-generic-type': 'error',
|
|
39
|
+
'@ngrx/with-state-no-arrays-at-root-level': 'error',
|
|
40
|
+
'@ngrx/avoid-combining-selectors': 'error',
|
|
41
|
+
'@ngrx/avoid-dispatching-multiple-actions-sequentially': 'error',
|
|
42
|
+
'@ngrx/avoid-duplicate-actions-in-reducer': 'error',
|
|
43
|
+
'@ngrx/avoid-mapping-selectors': 'error',
|
|
44
|
+
'@ngrx/good-action-hygiene': 'error',
|
|
45
|
+
'@ngrx/no-multiple-global-stores': 'error',
|
|
46
|
+
'@ngrx/no-reducer-in-key-names': 'error',
|
|
47
|
+
'@ngrx/no-store-subscription': 'error',
|
|
48
|
+
'@ngrx/no-typed-global-store': 'error',
|
|
49
|
+
'@ngrx/on-function-explicit-return-type': 'error',
|
|
50
|
+
'@ngrx/prefer-action-creator-in-dispatch': 'error',
|
|
51
|
+
'@ngrx/prefer-action-creator': 'error',
|
|
52
|
+
'@ngrx/prefer-inline-action-props': 'error',
|
|
53
|
+
'@ngrx/prefer-one-generic-in-create-for-feature-selector': 'error',
|
|
54
|
+
'@ngrx/prefer-selector-in-select': 'error',
|
|
55
|
+
'@ngrx/prefix-selectors-with-select': 'error',
|
|
56
|
+
'@ngrx/select-style': 'error',
|
|
57
|
+
'@ngrx/use-consistent-global-store-name': 'error',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
];
|
|
61
|
+
//# sourceMappingURL=all-type-checked.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"all-type-checked.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/all-type-checked.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAIH,kBAAe,CACb,MAAkC,EAClC,MAAkC,EACD,EAAE,CAAC;IACpC;QACE,IAAI,EAAE,WAAW;QACjB,eAAe,EAAE;YACf,MAAM;SACP;QACD,OAAO,EAAE;YACP,OAAO,EAAE,MAAM;SAChB;KACF;IACD;QACE,IAAI,EAAE,uBAAuB;QAC7B,eAAe,EAAE;YACf,MAAM;SACP;QACD,KAAK,EAAE;YACL,iDAAiD,EAAE,OAAO;YAC1D,+CAA+C,EAAE,OAAO;YACxD,+BAA+B,EAAE,OAAO;YACxC,oCAAoC,EAAE,OAAO;YAC7C,4BAA4B,EAAE,OAAO;YACrC,8BAA8B,EAAE,OAAO;YACvC,+BAA+B,EAAE,OAAO;YACxC,sCAAsC,EAAE,OAAO;YAC/C,wCAAwC,EAAE,OAAO;YACjD,iDAAiD,EAAE,OAAO;YAC1D,uCAAuC,EAAE,OAAO;YAChD,iCAAiC,EAAE,OAAO;YAC1C,yBAAyB,EAAE,OAAO;YAClC,8BAA8B,EAAE,OAAO;YACvC,4CAA4C,EAAE,OAAO;YACrD,oDAAoD,EAAE,OAAO;YAC7D,0CAA0C,EAAE,OAAO;YACnD,iCAAiC,EAAE,OAAO;YAC1C,uDAAuD,EAAE,OAAO;YAChE,0CAA0C,EAAE,OAAO;YACnD,+BAA+B,EAAE,OAAO;YACxC,2BAA2B,EAAE,OAAO;YACpC,iCAAiC,EAAE,OAAO;YAC1C,+BAA+B,EAAE,OAAO;YACxC,6BAA6B,EAAE,OAAO;YACtC,6BAA6B,EAAE,OAAO;YACtC,wCAAwC,EAAE,OAAO;YACjD,yCAAyC,EAAE,OAAO;YAClD,6BAA6B,EAAE,OAAO;YACtC,kCAAkC,EAAE,OAAO;YAC3C,yDAAyD,EAAE,OAAO;YAClE,iCAAiC,EAAE,OAAO;YAC1C,oCAAoC,EAAE,OAAO;YAC7C,oBAAoB,EAAE,OAAO;YAC7B,wCAAwC,EAAE,OAAO;SAClD;KACF;CACF,CAAC","sourcesContent":["/**\n * DO NOT EDIT\n * This file is generated\n */\n\nimport type { TSESLint } from '@typescript-eslint/utils';\n\nexport default (\n plugin: TSESLint.FlatConfig.Plugin,\n parser: TSESLint.FlatConfig.Parser\n): TSESLint.FlatConfig.ConfigArray => [\n {\n name: 'ngrx/base',\n languageOptions: {\n parser,\n },\n plugins: {\n '@ngrx': plugin,\n },\n },\n {\n name: 'ngrx/all-type-checked',\n languageOptions: {\n parser,\n },\n rules: {\n '@ngrx/avoid-combining-component-store-selectors': 'error',\n '@ngrx/avoid-mapping-component-store-selectors': 'error',\n '@ngrx/require-super-ondestroy': 'error',\n '@ngrx/updater-explicit-return-type': 'error',\n '@ngrx/avoid-cyclic-effects': 'error',\n '@ngrx/no-dispatch-in-effects': 'error',\n '@ngrx/no-effects-in-providers': 'error',\n '@ngrx/no-multiple-actions-in-effects': 'error',\n '@ngrx/prefer-action-creator-in-of-type': 'error',\n '@ngrx/prefer-effect-callback-in-block-statement': 'error',\n '@ngrx/use-effects-lifecycle-interface': 'error',\n '@ngrx/prefer-concat-latest-from': 'error',\n '@ngrx/enforce-type-call': 'error',\n '@ngrx/prefer-protected-state': 'error',\n '@ngrx/signal-state-no-arrays-at-root-level': 'error',\n '@ngrx/signal-store-feature-should-use-generic-type': 'error',\n '@ngrx/with-state-no-arrays-at-root-level': 'error',\n '@ngrx/avoid-combining-selectors': 'error',\n '@ngrx/avoid-dispatching-multiple-actions-sequentially': 'error',\n '@ngrx/avoid-duplicate-actions-in-reducer': 'error',\n '@ngrx/avoid-mapping-selectors': 'error',\n '@ngrx/good-action-hygiene': 'error',\n '@ngrx/no-multiple-global-stores': 'error',\n '@ngrx/no-reducer-in-key-names': 'error',\n '@ngrx/no-store-subscription': 'error',\n '@ngrx/no-typed-global-store': 'error',\n '@ngrx/on-function-explicit-return-type': 'error',\n '@ngrx/prefer-action-creator-in-dispatch': 'error',\n '@ngrx/prefer-action-creator': 'error',\n '@ngrx/prefer-inline-action-props': 'error',\n '@ngrx/prefer-one-generic-in-create-for-feature-selector': 'error',\n '@ngrx/prefer-selector-in-select': 'error',\n '@ngrx/prefix-selectors-with-select': 'error',\n '@ngrx/select-style': 'error',\n '@ngrx/use-consistent-global-store-name': 'error',\n },\n },\n];\n"]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"parser": "@typescript-eslint/parser",
|
|
3
|
+
"plugins": ["@ngrx"],
|
|
4
|
+
"rules": {
|
|
5
|
+
"@ngrx/avoid-combining-component-store-selectors": "error",
|
|
6
|
+
"@ngrx/avoid-mapping-component-store-selectors": "error",
|
|
7
|
+
"@ngrx/require-super-ondestroy": "error",
|
|
8
|
+
"@ngrx/updater-explicit-return-type": "error",
|
|
9
|
+
"@ngrx/avoid-cyclic-effects": "error",
|
|
10
|
+
"@ngrx/no-dispatch-in-effects": "error",
|
|
11
|
+
"@ngrx/no-effects-in-providers": "error",
|
|
12
|
+
"@ngrx/no-multiple-actions-in-effects": "error",
|
|
13
|
+
"@ngrx/prefer-action-creator-in-of-type": "error",
|
|
14
|
+
"@ngrx/prefer-effect-callback-in-block-statement": "error",
|
|
15
|
+
"@ngrx/use-effects-lifecycle-interface": "error",
|
|
16
|
+
"@ngrx/prefer-concat-latest-from": "error",
|
|
17
|
+
"@ngrx/enforce-type-call": "error",
|
|
18
|
+
"@ngrx/prefer-protected-state": "error",
|
|
19
|
+
"@ngrx/signal-state-no-arrays-at-root-level": "error",
|
|
20
|
+
"@ngrx/signal-store-feature-should-use-generic-type": "error",
|
|
21
|
+
"@ngrx/with-state-no-arrays-at-root-level": "error",
|
|
22
|
+
"@ngrx/avoid-combining-selectors": "error",
|
|
23
|
+
"@ngrx/avoid-dispatching-multiple-actions-sequentially": "error",
|
|
24
|
+
"@ngrx/avoid-duplicate-actions-in-reducer": "error",
|
|
25
|
+
"@ngrx/avoid-mapping-selectors": "error",
|
|
26
|
+
"@ngrx/good-action-hygiene": "error",
|
|
27
|
+
"@ngrx/no-multiple-global-stores": "error",
|
|
28
|
+
"@ngrx/no-reducer-in-key-names": "error",
|
|
29
|
+
"@ngrx/no-store-subscription": "error",
|
|
30
|
+
"@ngrx/no-typed-global-store": "error",
|
|
31
|
+
"@ngrx/on-function-explicit-return-type": "error",
|
|
32
|
+
"@ngrx/prefer-action-creator-in-dispatch": "error",
|
|
33
|
+
"@ngrx/prefer-action-creator": "error",
|
|
34
|
+
"@ngrx/prefer-inline-action-props": "error",
|
|
35
|
+
"@ngrx/prefer-one-generic-in-create-for-feature-selector": "error",
|
|
36
|
+
"@ngrx/prefer-selector-in-select": "error",
|
|
37
|
+
"@ngrx/prefix-selectors-with-select": "error",
|
|
38
|
+
"@ngrx/select-style": "error",
|
|
39
|
+
"@ngrx/use-consistent-global-store-name": "error"
|
|
40
|
+
}
|
|
41
|
+
}
|
package/src/configs/all.js
CHANGED
|
@@ -9,7 +9,6 @@ exports.default = (plugin, parser) => [
|
|
|
9
9
|
name: 'ngrx/base',
|
|
10
10
|
languageOptions: {
|
|
11
11
|
parser,
|
|
12
|
-
sourceType: 'module',
|
|
13
12
|
},
|
|
14
13
|
plugins: {
|
|
15
14
|
'@ngrx': plugin,
|
|
@@ -19,30 +18,21 @@ exports.default = (plugin, parser) => [
|
|
|
19
18
|
name: 'ngrx/all',
|
|
20
19
|
languageOptions: {
|
|
21
20
|
parser,
|
|
22
|
-
parserOptions: {
|
|
23
|
-
ecmaVersion: 2020,
|
|
24
|
-
sourceType: 'module',
|
|
25
|
-
project: './tsconfig.json',
|
|
26
|
-
},
|
|
27
21
|
},
|
|
28
22
|
rules: {
|
|
29
23
|
'@ngrx/avoid-combining-component-store-selectors': 'error',
|
|
30
24
|
'@ngrx/avoid-mapping-component-store-selectors': 'error',
|
|
31
25
|
'@ngrx/require-super-ondestroy': 'error',
|
|
32
26
|
'@ngrx/updater-explicit-return-type': 'error',
|
|
33
|
-
'@ngrx/avoid-cyclic-effects': 'error',
|
|
34
27
|
'@ngrx/no-dispatch-in-effects': 'error',
|
|
35
28
|
'@ngrx/no-effects-in-providers': 'error',
|
|
36
|
-
'@ngrx/no-multiple-actions-in-effects': 'error',
|
|
37
29
|
'@ngrx/prefer-action-creator-in-of-type': 'error',
|
|
38
30
|
'@ngrx/prefer-effect-callback-in-block-statement': 'error',
|
|
39
31
|
'@ngrx/use-effects-lifecycle-interface': 'error',
|
|
40
32
|
'@ngrx/prefer-concat-latest-from': 'error',
|
|
41
33
|
'@ngrx/enforce-type-call': 'error',
|
|
42
34
|
'@ngrx/prefer-protected-state': 'error',
|
|
43
|
-
'@ngrx/signal-state-no-arrays-at-root-level': 'error',
|
|
44
35
|
'@ngrx/signal-store-feature-should-use-generic-type': 'error',
|
|
45
|
-
'@ngrx/with-state-no-arrays-at-root-level': 'error',
|
|
46
36
|
'@ngrx/avoid-combining-selectors': 'error',
|
|
47
37
|
'@ngrx/avoid-dispatching-multiple-actions-sequentially': 'error',
|
|
48
38
|
'@ngrx/avoid-duplicate-actions-in-reducer': '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;;AAIH,kBAAe,CACb,MAAkC,EAClC,MAAkC,EACD,EAAE,CAAC;IACpC;QACE,IAAI,EAAE,WAAW;QACjB,eAAe,EAAE;YACf,MAAM;
|
|
1
|
+
{"version":3,"file":"all.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/all.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAIH,kBAAe,CACb,MAAkC,EAClC,MAAkC,EACD,EAAE,CAAC;IACpC;QACE,IAAI,EAAE,WAAW;QACjB,eAAe,EAAE;YACf,MAAM;SACP;QACD,OAAO,EAAE;YACP,OAAO,EAAE,MAAM;SAChB;KACF;IACD;QACE,IAAI,EAAE,UAAU;QAChB,eAAe,EAAE;YACf,MAAM;SACP;QACD,KAAK,EAAE;YACL,iDAAiD,EAAE,OAAO;YAC1D,+CAA+C,EAAE,OAAO;YACxD,+BAA+B,EAAE,OAAO;YACxC,oCAAoC,EAAE,OAAO;YAC7C,8BAA8B,EAAE,OAAO;YACvC,+BAA+B,EAAE,OAAO;YACxC,wCAAwC,EAAE,OAAO;YACjD,iDAAiD,EAAE,OAAO;YAC1D,uCAAuC,EAAE,OAAO;YAChD,iCAAiC,EAAE,OAAO;YAC1C,yBAAyB,EAAE,OAAO;YAClC,8BAA8B,EAAE,OAAO;YACvC,oDAAoD,EAAE,OAAO;YAC7D,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 },\n plugins: {\n '@ngrx': plugin,\n },\n },\n {\n name: 'ngrx/all',\n languageOptions: {\n parser,\n },\n rules: {\n '@ngrx/avoid-combining-component-store-selectors': 'error',\n '@ngrx/avoid-mapping-component-store-selectors': 'error',\n '@ngrx/require-super-ondestroy': '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-effect-callback-in-block-statement': 'error',\n '@ngrx/use-effects-lifecycle-interface': 'error',\n '@ngrx/prefer-concat-latest-from': 'error',\n '@ngrx/enforce-type-call': 'error',\n '@ngrx/prefer-protected-state': 'error',\n '@ngrx/signal-store-feature-should-use-generic-type': 'error',\n '@ngrx/avoid-combining-selectors': 'error',\n '@ngrx/avoid-dispatching-multiple-actions-sequentially': 'error',\n '@ngrx/avoid-duplicate-actions-in-reducer': 'error',\n '@ngrx/avoid-mapping-selectors': 'error',\n '@ngrx/good-action-hygiene': 'error',\n '@ngrx/no-multiple-global-stores': 'error',\n '@ngrx/no-reducer-in-key-names': 'error',\n '@ngrx/no-store-subscription': 'error',\n '@ngrx/no-typed-global-store': 'error',\n '@ngrx/on-function-explicit-return-type': 'error',\n '@ngrx/prefer-action-creator-in-dispatch': 'error',\n '@ngrx/prefer-action-creator': 'error',\n '@ngrx/prefer-inline-action-props': 'error',\n '@ngrx/prefer-one-generic-in-create-for-feature-selector': 'error',\n '@ngrx/prefer-selector-in-select': 'error',\n '@ngrx/prefix-selectors-with-select': 'error',\n '@ngrx/select-style': 'error',\n '@ngrx/use-consistent-global-store-name': 'error',\n },\n },\n];\n"]}
|
package/src/configs/all.json
CHANGED
|
@@ -6,19 +6,15 @@
|
|
|
6
6
|
"@ngrx/avoid-mapping-component-store-selectors": "error",
|
|
7
7
|
"@ngrx/require-super-ondestroy": "error",
|
|
8
8
|
"@ngrx/updater-explicit-return-type": "error",
|
|
9
|
-
"@ngrx/avoid-cyclic-effects": "error",
|
|
10
9
|
"@ngrx/no-dispatch-in-effects": "error",
|
|
11
10
|
"@ngrx/no-effects-in-providers": "error",
|
|
12
|
-
"@ngrx/no-multiple-actions-in-effects": "error",
|
|
13
11
|
"@ngrx/prefer-action-creator-in-of-type": "error",
|
|
14
12
|
"@ngrx/prefer-effect-callback-in-block-statement": "error",
|
|
15
13
|
"@ngrx/use-effects-lifecycle-interface": "error",
|
|
16
14
|
"@ngrx/prefer-concat-latest-from": "error",
|
|
17
15
|
"@ngrx/enforce-type-call": "error",
|
|
18
16
|
"@ngrx/prefer-protected-state": "error",
|
|
19
|
-
"@ngrx/signal-state-no-arrays-at-root-level": "error",
|
|
20
17
|
"@ngrx/signal-store-feature-should-use-generic-type": "error",
|
|
21
|
-
"@ngrx/with-state-no-arrays-at-root-level": "error",
|
|
22
18
|
"@ngrx/avoid-combining-selectors": "error",
|
|
23
19
|
"@ngrx/avoid-dispatching-multiple-actions-sequentially": "error",
|
|
24
20
|
"@ngrx/avoid-duplicate-actions-in-reducer": "error",
|
|
@@ -37,10 +33,5 @@
|
|
|
37
33
|
"@ngrx/prefix-selectors-with-select": "error",
|
|
38
34
|
"@ngrx/select-style": "error",
|
|
39
35
|
"@ngrx/use-consistent-global-store-name": "error"
|
|
40
|
-
},
|
|
41
|
-
"parserOptions": {
|
|
42
|
-
"ecmaVersion": 2020,
|
|
43
|
-
"sourceType": "module",
|
|
44
|
-
"project": "./tsconfig.json"
|
|
45
36
|
}
|
|
46
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-store.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/component-store.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAIH,kBAAe,CACb,MAAkC,EAClC,MAAkC,EACD,EAAE,CAAC;IACpC;QACE,IAAI,EAAE,WAAW;QACjB,eAAe,EAAE;YACf,MAAM;
|
|
1
|
+
{"version":3,"file":"component-store.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/component-store.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAIH,kBAAe,CACb,MAAkC,EAClC,MAAkC,EACD,EAAE,CAAC;IACpC;QACE,IAAI,EAAE,WAAW;QACjB,eAAe,EAAE;YACf,MAAM;SACP;QACD,OAAO,EAAE;YACP,OAAO,EAAE,MAAM;SAChB;KACF;IACD;QACE,IAAI,EAAE,sBAAsB;QAC5B,eAAe,EAAE;YACf,MAAM;SACP;QACD,KAAK,EAAE;YACL,iDAAiD,EAAE,OAAO;YAC1D,+CAA+C,EAAE,OAAO;YACxD,+BAA+B,EAAE,OAAO;YACxC,oCAAoC,EAAE,OAAO;SAC9C;KACF;CACF,CAAC","sourcesContent":["/**\n * DO NOT EDIT\n * This file is generated\n */\n\nimport type { TSESLint } from '@typescript-eslint/utils';\n\nexport default (\n plugin: TSESLint.FlatConfig.Plugin,\n parser: TSESLint.FlatConfig.Parser\n): TSESLint.FlatConfig.ConfigArray => [\n {\n name: 'ngrx/base',\n languageOptions: {\n parser,\n },\n plugins: {\n '@ngrx': plugin,\n },\n },\n {\n name: 'ngrx/component-store',\n languageOptions: {\n parser,\n },\n rules: {\n '@ngrx/avoid-combining-component-store-selectors': 'error',\n '@ngrx/avoid-mapping-component-store-selectors': 'error',\n '@ngrx/require-super-ondestroy': 'error',\n '@ngrx/updater-explicit-return-type': '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,33 @@
|
|
|
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
|
+
},
|
|
13
|
+
plugins: {
|
|
14
|
+
'@ngrx': plugin,
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: 'ngrx/effects-type-checked',
|
|
19
|
+
languageOptions: {
|
|
20
|
+
parser,
|
|
21
|
+
},
|
|
22
|
+
rules: {
|
|
23
|
+
'@ngrx/avoid-cyclic-effects': 'error',
|
|
24
|
+
'@ngrx/no-dispatch-in-effects': 'error',
|
|
25
|
+
'@ngrx/no-effects-in-providers': 'error',
|
|
26
|
+
'@ngrx/no-multiple-actions-in-effects': 'error',
|
|
27
|
+
'@ngrx/prefer-action-creator-in-of-type': 'error',
|
|
28
|
+
'@ngrx/prefer-effect-callback-in-block-statement': 'error',
|
|
29
|
+
'@ngrx/use-effects-lifecycle-interface': 'error',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
];
|
|
33
|
+
//# sourceMappingURL=effects-type-checked.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"effects-type-checked.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/effects-type-checked.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAIH,kBAAe,CACb,MAAkC,EAClC,MAAkC,EACD,EAAE,CAAC;IACpC;QACE,IAAI,EAAE,WAAW;QACjB,eAAe,EAAE;YACf,MAAM;SACP;QACD,OAAO,EAAE;YACP,OAAO,EAAE,MAAM;SAChB;KACF;IACD;QACE,IAAI,EAAE,2BAA2B;QACjC,eAAe,EAAE;YACf,MAAM;SACP;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 },\n plugins: {\n '@ngrx': plugin,\n },\n },\n {\n name: 'ngrx/effects-type-checked',\n languageOptions: {\n parser,\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
|
+
}
|
package/src/configs/effects.js
CHANGED
|
@@ -9,7 +9,6 @@ exports.default = (plugin, parser) => [
|
|
|
9
9
|
name: 'ngrx/base',
|
|
10
10
|
languageOptions: {
|
|
11
11
|
parser,
|
|
12
|
-
sourceType: 'module',
|
|
13
12
|
},
|
|
14
13
|
plugins: {
|
|
15
14
|
'@ngrx': plugin,
|
|
@@ -19,17 +18,10 @@ exports.default = (plugin, parser) => [
|
|
|
19
18
|
name: 'ngrx/effects',
|
|
20
19
|
languageOptions: {
|
|
21
20
|
parser,
|
|
22
|
-
parserOptions: {
|
|
23
|
-
ecmaVersion: 2020,
|
|
24
|
-
sourceType: 'module',
|
|
25
|
-
project: './tsconfig.json',
|
|
26
|
-
},
|
|
27
21
|
},
|
|
28
22
|
rules: {
|
|
29
|
-
'@ngrx/avoid-cyclic-effects': 'error',
|
|
30
23
|
'@ngrx/no-dispatch-in-effects': 'error',
|
|
31
24
|
'@ngrx/no-effects-in-providers': 'error',
|
|
32
|
-
'@ngrx/no-multiple-actions-in-effects': 'error',
|
|
33
25
|
'@ngrx/prefer-action-creator-in-of-type': 'error',
|
|
34
26
|
'@ngrx/prefer-effect-callback-in-block-statement': 'error',
|
|
35
27
|
'@ngrx/use-effects-lifecycle-interface': 'error',
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;SACP;QACD,OAAO,EAAE;YACP,OAAO,EAAE,MAAM;SAChB;KACF;IACD;QACE,IAAI,EAAE,cAAc;QACpB,eAAe,EAAE;YACf,MAAM;SACP;QACD,KAAK,EAAE;YACL,8BAA8B,EAAE,OAAO;YACvC,+BAA+B,EAAE,OAAO;YACxC,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 },\n plugins: {\n '@ngrx': plugin,\n },\n },\n {\n name: 'ngrx/effects',\n languageOptions: {\n parser,\n },\n rules: {\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-effect-callback-in-block-statement': 'error',\n '@ngrx/use-effects-lifecycle-interface': 'error',\n },\n },\n];\n"]}
|