@ngrx/eslint-plugin 20.1.0 → 21.0.0-beta.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.js +0 -9
- package/src/configs/all.js.map +1 -1
- package/src/configs/all.json +0 -8
- package/src/configs/allTypeChecked.d.ts +7 -0
- package/src/configs/allTypeChecked.js +61 -0
- package/src/configs/allTypeChecked.js.map +1 -0
- package/src/configs/allTypeChecked.json +41 -0
- package/src/configs/component-store.js +0 -1
- package/src/configs/component-store.js.map +1 -1
- 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/effectsTypeChecked.d.ts +7 -0
- package/src/configs/effectsTypeChecked.js +33 -0
- package/src/configs/effectsTypeChecked.js.map +1 -0
- package/src/configs/effectsTypeChecked.json +13 -0
- package/src/configs/operators.js +0 -1
- package/src/configs/operators.js.map +1 -1
- package/src/configs/signals.js +0 -7
- package/src/configs/signals.js.map +1 -1
- package/src/configs/signals.json +1 -7
- package/src/configs/signalsTypeChecked.d.ts +7 -0
- package/src/configs/signalsTypeChecked.js +31 -0
- package/src/configs/signalsTypeChecked.js.map +1 -0
- package/src/configs/signalsTypeChecked.json +11 -0
- package/src/configs/store.js +0 -1
- package/src/configs/store.js.map +1 -1
- package/src/index.d.ts +0 -21
- 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('allTypeChecked', (_rule) => true);
|
|
15
|
+
writeConfig('store', (rule) => isModule(rule, 'store') && !isTypeChecked(rule));
|
|
16
|
+
writeConfig('effects', (rule) => isModule(rule, 'effects') && !isTypeChecked(rule));
|
|
17
|
+
writeConfig('effectsTypeChecked', (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('signalsTypeChecked', (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,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AClB,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('allTypeChecked', (_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('effectsTypeChecked', (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('signalsTypeChecked', (rule) => isModule(rule, 'signals'));\n\n async function writeConfig(\n configName:\n | 'all'\n | 'allTypeChecked'\n | 'store'\n | 'effects'\n | 'effectsTypeChecked'\n | 'component-store'\n | 'operators'\n | 'signals'\n | 'signalsTypeChecked',\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;IAChD,MAAM,WAAW,GAAG;QAClB,wDAAwD;KACzD,CAAC;IAEF,KAAK,MAAM,KAAK,IAAI,WAAW,EAAE,CAAC;QAChC,KAAK,MAAM,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,wBAAgB,CAAC,EAAE,CAAC;YACpE,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,QAAQ,KAAK,CAAC,CAAC;YACnD,IAAI,CAAC,IAAA,eAAU,EAAC,OAAO,CAAC,EAAE,CAAC;gBACzB,IAAA,kBAAa,EAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YAC7B,CAAC;YACD,MAAM,GAAG,GAAG,IAAA,iBAAY,EAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YAC3C,MAAM,UAAU,GAAG,GAAG,CAAC,SAAS,CAC9B,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,WAAW,CAAC,MAAM,CAC9C,CAAC;YACF,MAAM,MAAM,GAAG,MAAM,IAAA,iBAAM,EACzB,KAAK,QAAQ;;EAEnB,IAAI,CAAC,IAAI,EAAE,WAAW;;cAEV,IAAI,CAAC,IAAI;iBACN,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI;oBACxB,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI;gCACtB,IAAI,CAAC,IAAI,EAAE,oBAAoB,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI;sBAEpE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAC7D;;;;;EAKN,UAAU,EAAE,EACN;gBACE,MAAM,EAAE,UAAU;gBAClB,GAAG,cAAc;aAClB,CACF,CAAC;YAEF,IAAA,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,CAAC,CAAC,MAAM,CAAC;gBACnE;oBACE,UAAU,QAAQ,IAChB,IAAI,CAAC,IAAI,EAAE,GAAG;wBACZ,CAAC,CAAC,GAAG;4BACH,IAAI,CAAC,IAAI,CAAC,GAAG;iCACV,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC;iCAC9B,OAAO,CAAC,KA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AAQ,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"]}
|
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,21 +18,14 @@ 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',
|
|
@@ -42,7 +34,6 @@ exports.default = (plugin, parser) => [
|
|
|
42
34
|
'@ngrx/prefer-protected-state': 'error',
|
|
43
35
|
'@ngrx/signal-state-no-arrays-at-root-level': 'error',
|
|
44
36
|
'@ngrx/signal-store-feature-should-use-generic-type': 'error',
|
|
45
|
-
'@ngrx/with-state-no-arrays-at-root-level': 'error',
|
|
46
37
|
'@ngrx/avoid-combining-selectors': 'error',
|
|
47
38
|
'@ngrx/avoid-dispatching-multiple-actions-sequentially': 'error',
|
|
48
39
|
'@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,4CAA4C,EAAE,OAAO;YACrD,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-state-no-arrays-at-root-level': '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,10 +6,8 @@
|
|
|
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",
|
|
@@ -18,7 +16,6 @@
|
|
|
18
16
|
"@ngrx/prefer-protected-state": "error",
|
|
19
17
|
"@ngrx/signal-state-no-arrays-at-root-level": "error",
|
|
20
18
|
"@ngrx/signal-store-feature-should-use-generic-type": "error",
|
|
21
|
-
"@ngrx/with-state-no-arrays-at-root-level": "error",
|
|
22
19
|
"@ngrx/avoid-combining-selectors": "error",
|
|
23
20
|
"@ngrx/avoid-dispatching-multiple-actions-sequentially": "error",
|
|
24
21
|
"@ngrx/avoid-duplicate-actions-in-reducer": "error",
|
|
@@ -37,10 +34,5 @@
|
|
|
37
34
|
"@ngrx/prefix-selectors-with-select": "error",
|
|
38
35
|
"@ngrx/select-style": "error",
|
|
39
36
|
"@ngrx/use-consistent-global-store-name": "error"
|
|
40
|
-
},
|
|
41
|
-
"parserOptions": {
|
|
42
|
-
"ecmaVersion": 2020,
|
|
43
|
-
"sourceType": "module",
|
|
44
|
-
"project": "./tsconfig.json"
|
|
45
37
|
}
|
|
46
38
|
}
|
|
@@ -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/allTypeChecked',
|
|
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=allTypeChecked.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"allTypeChecked.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/allTypeChecked.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,qBAAqB;QAC3B,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/allTypeChecked',\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
|
+
}
|
|
@@ -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"]}
|
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"]}
|
package/src/configs/effects.json
CHANGED
|
@@ -2,17 +2,10 @@
|
|
|
2
2
|
"parser": "@typescript-eslint/parser",
|
|
3
3
|
"plugins": ["@ngrx"],
|
|
4
4
|
"rules": {
|
|
5
|
-
"@ngrx/avoid-cyclic-effects": "error",
|
|
6
5
|
"@ngrx/no-dispatch-in-effects": "error",
|
|
7
6
|
"@ngrx/no-effects-in-providers": "error",
|
|
8
|
-
"@ngrx/no-multiple-actions-in-effects": "error",
|
|
9
7
|
"@ngrx/prefer-action-creator-in-of-type": "error",
|
|
10
8
|
"@ngrx/prefer-effect-callback-in-block-statement": "error",
|
|
11
9
|
"@ngrx/use-effects-lifecycle-interface": "error"
|
|
12
|
-
},
|
|
13
|
-
"parserOptions": {
|
|
14
|
-
"ecmaVersion": 2020,
|
|
15
|
-
"sourceType": "module",
|
|
16
|
-
"project": "./tsconfig.json"
|
|
17
10
|
}
|
|
18
11
|
}
|
|
@@ -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/effectsTypeChecked',
|
|
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=effectsTypeChecked.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"effectsTypeChecked.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/effectsTypeChecked.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,yBAAyB;QAC/B,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/effectsTypeChecked',\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/operators.js
CHANGED
|
@@ -1 +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;
|
|
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;SACP;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 },\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"]}
|
package/src/configs/signals.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,18 +18,12 @@ exports.default = (plugin, parser) => [
|
|
|
19
18
|
name: 'ngrx/signals',
|
|
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/enforce-type-call': 'error',
|
|
30
24
|
'@ngrx/prefer-protected-state': 'error',
|
|
31
25
|
'@ngrx/signal-state-no-arrays-at-root-level': 'error',
|
|
32
26
|
'@ngrx/signal-store-feature-should-use-generic-type': 'error',
|
|
33
|
-
'@ngrx/with-state-no-arrays-at-root-level': 'error',
|
|
34
27
|
},
|
|
35
28
|
},
|
|
36
29
|
];
|
|
@@ -1 +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;
|
|
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;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,yBAAyB,EAAE,OAAO;YAClC,8BAA8B,EAAE,OAAO;YACvC,4CAA4C,EAAE,OAAO;YACrD,oDAAoD,EAAE,OAAO;SAC9D;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/signals',\n languageOptions: {\n parser,\n },\n rules: {\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 },\n },\n];\n"]}
|
package/src/configs/signals.json
CHANGED
|
@@ -5,12 +5,6 @@
|
|
|
5
5
|
"@ngrx/enforce-type-call": "error",
|
|
6
6
|
"@ngrx/prefer-protected-state": "error",
|
|
7
7
|
"@ngrx/signal-state-no-arrays-at-root-level": "error",
|
|
8
|
-
"@ngrx/signal-store-feature-should-use-generic-type": "error"
|
|
9
|
-
"@ngrx/with-state-no-arrays-at-root-level": "error"
|
|
10
|
-
},
|
|
11
|
-
"parserOptions": {
|
|
12
|
-
"ecmaVersion": 2020,
|
|
13
|
-
"sourceType": "module",
|
|
14
|
-
"project": "./tsconfig.json"
|
|
8
|
+
"@ngrx/signal-store-feature-should-use-generic-type": "error"
|
|
15
9
|
}
|
|
16
10
|
}
|
|
@@ -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,31 @@
|
|
|
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/signalsTypeChecked',
|
|
19
|
+
languageOptions: {
|
|
20
|
+
parser,
|
|
21
|
+
},
|
|
22
|
+
rules: {
|
|
23
|
+
'@ngrx/enforce-type-call': 'error',
|
|
24
|
+
'@ngrx/prefer-protected-state': 'error',
|
|
25
|
+
'@ngrx/signal-state-no-arrays-at-root-level': 'error',
|
|
26
|
+
'@ngrx/signal-store-feature-should-use-generic-type': 'error',
|
|
27
|
+
'@ngrx/with-state-no-arrays-at-root-level': 'error',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
];
|
|
31
|
+
//# sourceMappingURL=signalsTypeChecked.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signalsTypeChecked.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/signalsTypeChecked.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,yBAAyB;QAC/B,eAAe,EAAE;YACf,MAAM;SACP;QACD,KAAK,EAAE;YACL,yBAAyB,EAAE,OAAO;YAClC,8BAA8B,EAAE,OAAO;YACvC,4CAA4C,EAAE,OAAO;YACrD,oDAAoD,EAAE,OAAO;YAC7D,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 },\n plugins: {\n '@ngrx': plugin,\n },\n },\n {\n name: 'ngrx/signalsTypeChecked',\n languageOptions: {\n parser,\n },\n rules: {\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 },\n },\n];\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"parser": "@typescript-eslint/parser",
|
|
3
|
+
"plugins": ["@ngrx"],
|
|
4
|
+
"rules": {
|
|
5
|
+
"@ngrx/enforce-type-call": "error",
|
|
6
|
+
"@ngrx/prefer-protected-state": "error",
|
|
7
|
+
"@ngrx/signal-state-no-arrays-at-root-level": "error",
|
|
8
|
+
"@ngrx/signal-store-feature-should-use-generic-type": "error",
|
|
9
|
+
"@ngrx/with-state-no-arrays-at-root-level": "error"
|
|
10
|
+
}
|
|
11
|
+
}
|
package/src/configs/store.js
CHANGED
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;;AAIH,kBAAe,CACb,MAAkC,EAClC,MAAkC,EACD,EAAE,CAAC;IACpC;QACE,IAAI,EAAE,WAAW;QACjB,eAAe,EAAE;YACf,MAAM;
|
|
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;SACP;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 },\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"]}
|
package/src/index.d.ts
CHANGED
|
@@ -8,10 +8,8 @@ declare const _default: {
|
|
|
8
8
|
"@ngrx/avoid-mapping-component-store-selectors": string;
|
|
9
9
|
"@ngrx/require-super-ondestroy": string;
|
|
10
10
|
"@ngrx/updater-explicit-return-type": string;
|
|
11
|
-
"@ngrx/avoid-cyclic-effects": string;
|
|
12
11
|
"@ngrx/no-dispatch-in-effects": string;
|
|
13
12
|
"@ngrx/no-effects-in-providers": string;
|
|
14
|
-
"@ngrx/no-multiple-actions-in-effects": string;
|
|
15
13
|
"@ngrx/prefer-action-creator-in-of-type": string;
|
|
16
14
|
"@ngrx/prefer-effect-callback-in-block-statement": string;
|
|
17
15
|
"@ngrx/use-effects-lifecycle-interface": string;
|
|
@@ -20,7 +18,6 @@ declare const _default: {
|
|
|
20
18
|
"@ngrx/prefer-protected-state": string;
|
|
21
19
|
"@ngrx/signal-state-no-arrays-at-root-level": string;
|
|
22
20
|
"@ngrx/signal-store-feature-should-use-generic-type": string;
|
|
23
|
-
"@ngrx/with-state-no-arrays-at-root-level": string;
|
|
24
21
|
"@ngrx/avoid-combining-selectors": string;
|
|
25
22
|
"@ngrx/avoid-dispatching-multiple-actions-sequentially": string;
|
|
26
23
|
"@ngrx/avoid-duplicate-actions-in-reducer": string;
|
|
@@ -40,11 +37,6 @@ declare const _default: {
|
|
|
40
37
|
"@ngrx/select-style": string;
|
|
41
38
|
"@ngrx/use-consistent-global-store-name": string;
|
|
42
39
|
};
|
|
43
|
-
parserOptions: {
|
|
44
|
-
ecmaVersion: number;
|
|
45
|
-
sourceType: string;
|
|
46
|
-
project: string;
|
|
47
|
-
};
|
|
48
40
|
};
|
|
49
41
|
'component-store': {
|
|
50
42
|
parser: string;
|
|
@@ -60,19 +52,12 @@ declare const _default: {
|
|
|
60
52
|
parser: string;
|
|
61
53
|
plugins: string[];
|
|
62
54
|
rules: {
|
|
63
|
-
"@ngrx/avoid-cyclic-effects": string;
|
|
64
55
|
"@ngrx/no-dispatch-in-effects": string;
|
|
65
56
|
"@ngrx/no-effects-in-providers": string;
|
|
66
|
-
"@ngrx/no-multiple-actions-in-effects": string;
|
|
67
57
|
"@ngrx/prefer-action-creator-in-of-type": string;
|
|
68
58
|
"@ngrx/prefer-effect-callback-in-block-statement": string;
|
|
69
59
|
"@ngrx/use-effects-lifecycle-interface": string;
|
|
70
60
|
};
|
|
71
|
-
parserOptions: {
|
|
72
|
-
ecmaVersion: number;
|
|
73
|
-
sourceType: string;
|
|
74
|
-
project: string;
|
|
75
|
-
};
|
|
76
61
|
};
|
|
77
62
|
store: {
|
|
78
63
|
parser: string;
|
|
@@ -113,12 +98,6 @@ declare const _default: {
|
|
|
113
98
|
"@ngrx/prefer-protected-state": string;
|
|
114
99
|
"@ngrx/signal-state-no-arrays-at-root-level": string;
|
|
115
100
|
"@ngrx/signal-store-feature-should-use-generic-type": string;
|
|
116
|
-
"@ngrx/with-state-no-arrays-at-root-level": string;
|
|
117
|
-
};
|
|
118
|
-
parserOptions: {
|
|
119
|
-
ecmaVersion: number;
|
|
120
|
-
sourceType: string;
|
|
121
|
-
project: string;
|
|
122
101
|
};
|
|
123
102
|
};
|
|
124
103
|
};
|
|
@@ -152,7 +152,13 @@ exports.default = (0, rule_creator_1.createRule)({
|
|
|
152
152
|
node.id.typeAnnotation.typeAnnotation.typeName.type === 'Identifier'
|
|
153
153
|
? node.id.typeAnnotation.typeAnnotation.typeName.name
|
|
154
154
|
: null;
|
|
155
|
-
const hasSelectorType = typeName !== null &&
|
|
155
|
+
const hasSelectorType = typeName !== null &&
|
|
156
|
+
[
|
|
157
|
+
'MemoizedSelector',
|
|
158
|
+
'MemoizedSelectorWithProps',
|
|
159
|
+
'Selector',
|
|
160
|
+
'SelectorWithProps',
|
|
161
|
+
].includes(typeName);
|
|
156
162
|
const isSelectorCall = init?.type === 'CallExpression' && isSelectorFactoryCall(init);
|
|
157
163
|
const isArrowFunction = init?.type === 'ArrowFunctionExpression' &&
|
|
158
164
|
init.body &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prefix-selectors-with-select.js","sourceRoot":"","sources":["../../../../../../modules/eslint-plugin/src/rules/store/prefix-selectors-with-select.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AA,kBAAU,EAAC,IAAI,CAAC,EAAE,CAAC;AAC5C,CAAC","sourcesContent":["import type { TSESTree } from '@typescript-eslint/utils';\nimport * as path from 'path';\nimport { createRule } from '../../rule-creator';\nimport { capitalize } from '../../utils';\n\nexport const prefixSelectorsWithSelect = 'prefixSelectorsWithSelect';\nexport const prefixSelectorsWithSelectSuggest =\n 'prefixSelectorsWithSelectSuggest';\n\ntype MessageIds =\n | typeof prefixSelectorsWithSelect\n | typeof prefixSelectorsWithSelectSuggest;\ntype Options = readonly [];\n\nexport default createRule<Options, MessageIds>({\n name: path.parse(__filename).name,\n meta: {\n type: 'suggestion',\n hasSuggestions: true,\n docs: {\n description:\n 'The selector should start with \"select\", for example \"selectEntity\".',\n ngrxModule: 'store',\n },\n schema: [],\n messages: {\n [prefixSelectorsWithSelect]: 'The selector should start with \"select\".',\n [prefixSelectorsWithSelectSuggest]:\n 'Prefix the selector with \"select\": `{{ name }}`.',\n },\n },\n defaultOptions: [],\n create: (context) => {\n function reportIfInvalid(name: string, node: TSESTree.Identifier) {\n // Name starts with select and\n // the first character after select is an uppercase ASCII letter, _, or $\n const isValid =\n name.startsWith('select') &&\n name.length > 'select'.length &&\n /^[A-Z_$]/.test(name.slice('select'.length));\n\n if (!isValid) {\n const suggestedName = getSuggestedName(name);\n context.report({\n node,\n loc: {\n start: node.loc.start,\n end: {\n line: node.loc.start.line,\n column: node.loc.start.column + name.length,\n },\n },\n messageId: prefixSelectorsWithSelect,\n suggest: [\n {\n messageId: prefixSelectorsWithSelectSuggest,\n data: { name: suggestedName },\n fix: (fixer) => {\n const parent = node.parent;\n const sourceCode = context.getSourceCode();\n\n // Handle destructuring: { selectAll: allItems }\n if (\n parent &&\n parent.type === 'Property' &&\n parent.value === node &&\n parent.parent &&\n parent.parent.type === 'ObjectPattern'\n ) {\n return fixer.replaceText(node, suggestedName);\n }\n\n // Handle simple variable declarator: const allItems = ...\n if (\n parent &&\n parent.type === 'VariableDeclarator' &&\n parent.id.type === 'Identifier'\n ) {\n const typeAnnotation = parent.id.typeAnnotation\n ? sourceCode.getText(parent.id.typeAnnotation)\n : '';\n return fixer.replaceText(\n parent.id,\n `${suggestedName}${typeAnnotation}`\n );\n }\n\n // Fallback: just replace the identifier\n return fixer.replaceText(node, suggestedName);\n },\n },\n ],\n });\n }\n }\n\n function isSelectorFactoryCall(node: TSESTree.CallExpression): boolean {\n const callee = node.callee;\n return (\n callee.type === 'Identifier' &&\n [\n 'createSelector',\n 'createFeatureSelector',\n 'createSelectorFactory',\n ].includes(callee.name)\n );\n }\n\n function checkFunctionBody(\n name: string,\n node: TSESTree.Identifier,\n body: TSESTree.BlockStatement | TSESTree.Expression\n ) {\n if (body.type === 'CallExpression' && isSelectorFactoryCall(body)) {\n reportIfInvalid(name, node);\n }\n\n if (body.type === 'BlockStatement') {\n for (const stmt of body.body) {\n if (\n stmt.type === 'ReturnStatement' &&\n stmt.argument &&\n stmt.argument.type === 'CallExpression' &&\n isSelectorFactoryCall(stmt.argument)\n ) {\n reportIfInvalid(name, node);\n }\n }\n }\n }\n\n return {\n VariableDeclarator(node: TSESTree.VariableDeclarator) {\n const { id, init } = node;\n\n const isSelectorSource =\n init?.type === 'CallExpression' &&\n ((init.callee.type === 'Identifier' &&\n init.callee.name === 'getSelectors') ||\n (init.callee.type === 'MemberExpression' &&\n init.callee.property.type === 'Identifier' &&\n init.callee.property.name === 'getSelectors'));\n\n if (id.type === 'ObjectPattern' && isSelectorSource) {\n for (const prop of id.properties) {\n if (prop.type === 'Property' && prop.value.type === 'Identifier') {\n reportIfInvalid(prop.value.name, prop.value);\n }\n }\n return;\n }\n\n if (id.type === 'Identifier') {\n const typeName =\n node.id.typeAnnotation?.typeAnnotation.type === 'TSTypeReference' &&\n node.id.typeAnnotation.typeAnnotation.typeName.type === 'Identifier'\n ? node.id.typeAnnotation.typeAnnotation.typeName.name\n : null;\n\n const hasSelectorType =\n typeName !== null && /Selector$/.test(typeName);\n\n const isSelectorCall =\n init?.type === 'CallExpression' && isSelectorFactoryCall(init);\n\n const isArrowFunction =\n init?.type === 'ArrowFunctionExpression' &&\n init.body &&\n (init.body.type === 'CallExpression' ||\n init.body.type === 'BlockStatement');\n\n const isFunctionExpression =\n init?.type === 'FunctionExpression' &&\n init.body &&\n init.body.type === 'BlockStatement';\n\n if (hasSelectorType || isSelectorCall) {\n reportIfInvalid(id.name, id);\n } else if (isArrowFunction || isFunctionExpression) {\n checkFunctionBody(id.name, id, init.body);\n }\n }\n },\n };\n },\n});\n\nfunction getSuggestedName(name: string): string {\n const selectWord = 'select';\n\n if (name.startsWith(selectWord)) {\n const rest = name.slice(selectWord.length);\n if (rest.length === 0) {\n return 'selectSelect';\n }\n if (/^[A-Z_]+$/.test(rest)) {\n return `${selectWord}${rest}`;\n }\n return `${selectWord}${capitalize(rest)}`;\n }\n\n if (/^get([^a-z].+)/.test(name)) {\n const rest = name.slice(3);\n return `${selectWord}${capitalize(rest)}`;\n }\n\n if (/^[A-Z_]+$/.test(name)) {\n return `${selectWord}${name}`;\n }\n\n return `${selectWord}${capitalize(name)}`;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"prefix-selectors-with-select.js","sourceRoot":"","sources":["../../../../../../modules/eslint-plugin/src/rules/store/prefix-selectors-with-select.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,2CAA6B;AAC7B,qDAAgD;AAChD,uCAAyC;AAE5B,QAAA,yBAAyB,GAAG,2BAA2B,CAAC;AACxD,QAAA,gCAAgC,GAC3C,kCAAkC,CAAC;AAOrC,kBAAe,IAAA,yBAAU,EAAsB;IAC7C,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,IAAI;IACjC,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,cAAc,EAAE,IAAI;QACpB,IAAI,EAAE;YACJ,WAAW,EACT,sEAAsE;YACxE,UAAU,EAAE,OAAO;SACpB;QACD,MAAM,EAAE,EAAE;QACV,QAAQ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AC;CACF,CAAC,CAAC;AAEH,SAAS,gBAAgB,CAAC,IAAY;IACpC,MAAM,UAAU,GAAG,QAAQ,CAAC;IAE5B,IAAI,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAChC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAC3C,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACtB,OAAO,cAAc,CAAC;QACxB,CAAC;QACD,IAAI,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YAC3B,OAAO,GAAG,UAAU,GAAG,IAAI,EAAE,CAAC;QAChC,CAAC;QACD,OAAO,GAAG,UAAU,GAAG,IAAA,kBAAU,EAAC,IAAI,CAAC,EAAE,CAAC;IAC5C,CAAC;IAED,IAAI,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAChC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC3B,OAAO,GAAG,UAAU,GAAG,IAAA,kBAAU,EAAC,IAAI,CAAC,EAAE,CAAC;IAC5C,CAAC;IAED,IAAI,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAC3B,OAAO,GAAG,UAAU,GAAG,IAAI,EAAE,CAAC;IAChC,CAAC;IAED,OAAO,GAAG,UAAU,GAAG,IAAA,kBAAU,EAAC,IAAI,CAAC,EAAE,CAAC;AAC5C,CAAC","sourcesContent":["import type { TSESTree } from '@typescript-eslint/utils';\nimport * as path from 'path';\nimport { createRule } from '../../rule-creator';\nimport { capitalize } from '../../utils';\n\nexport const prefixSelectorsWithSelect = 'prefixSelectorsWithSelect';\nexport const prefixSelectorsWithSelectSuggest =\n 'prefixSelectorsWithSelectSuggest';\n\ntype MessageIds =\n | typeof prefixSelectorsWithSelect\n | typeof prefixSelectorsWithSelectSuggest;\ntype Options = readonly [];\n\nexport default createRule<Options, MessageIds>({\n name: path.parse(__filename).name,\n meta: {\n type: 'suggestion',\n hasSuggestions: true,\n docs: {\n description:\n 'The selector should start with \"select\", for example \"selectEntity\".',\n ngrxModule: 'store',\n },\n schema: [],\n messages: {\n [prefixSelectorsWithSelect]: 'The selector should start with \"select\".',\n [prefixSelectorsWithSelectSuggest]:\n 'Prefix the selector with \"select\": `{{ name }}`.',\n },\n },\n defaultOptions: [],\n create: (context) => {\n function reportIfInvalid(name: string, node: TSESTree.Identifier) {\n // Name starts with select and\n // the first character after select is an uppercase ASCII letter, _, or $\n const isValid =\n name.startsWith('select') &&\n name.length > 'select'.length &&\n /^[A-Z_$]/.test(name.slice('select'.length));\n\n if (!isValid) {\n const suggestedName = getSuggestedName(name);\n context.report({\n node,\n loc: {\n start: node.loc.start,\n end: {\n line: node.loc.start.line,\n column: node.loc.start.column + name.length,\n },\n },\n messageId: prefixSelectorsWithSelect,\n suggest: [\n {\n messageId: prefixSelectorsWithSelectSuggest,\n data: { name: suggestedName },\n fix: (fixer) => {\n const parent = node.parent;\n const sourceCode = context.getSourceCode();\n\n // Handle destructuring: { selectAll: allItems }\n if (\n parent &&\n parent.type === 'Property' &&\n parent.value === node &&\n parent.parent &&\n parent.parent.type === 'ObjectPattern'\n ) {\n return fixer.replaceText(node, suggestedName);\n }\n\n // Handle simple variable declarator: const allItems = ...\n if (\n parent &&\n parent.type === 'VariableDeclarator' &&\n parent.id.type === 'Identifier'\n ) {\n const typeAnnotation = parent.id.typeAnnotation\n ? sourceCode.getText(parent.id.typeAnnotation)\n : '';\n return fixer.replaceText(\n parent.id,\n `${suggestedName}${typeAnnotation}`\n );\n }\n\n // Fallback: just replace the identifier\n return fixer.replaceText(node, suggestedName);\n },\n },\n ],\n });\n }\n }\n\n function isSelectorFactoryCall(node: TSESTree.CallExpression): boolean {\n const callee = node.callee;\n return (\n callee.type === 'Identifier' &&\n [\n 'createSelector',\n 'createFeatureSelector',\n 'createSelectorFactory',\n ].includes(callee.name)\n );\n }\n\n function checkFunctionBody(\n name: string,\n node: TSESTree.Identifier,\n body: TSESTree.BlockStatement | TSESTree.Expression\n ) {\n if (body.type === 'CallExpression' && isSelectorFactoryCall(body)) {\n reportIfInvalid(name, node);\n }\n\n if (body.type === 'BlockStatement') {\n for (const stmt of body.body) {\n if (\n stmt.type === 'ReturnStatement' &&\n stmt.argument &&\n stmt.argument.type === 'CallExpression' &&\n isSelectorFactoryCall(stmt.argument)\n ) {\n reportIfInvalid(name, node);\n }\n }\n }\n }\n\n return {\n VariableDeclarator(node: TSESTree.VariableDeclarator) {\n const { id, init } = node;\n\n const isSelectorSource =\n init?.type === 'CallExpression' &&\n ((init.callee.type === 'Identifier' &&\n init.callee.name === 'getSelectors') ||\n (init.callee.type === 'MemberExpression' &&\n init.callee.property.type === 'Identifier' &&\n init.callee.property.name === 'getSelectors'));\n\n if (id.type === 'ObjectPattern' && isSelectorSource) {\n for (const prop of id.properties) {\n if (prop.type === 'Property' && prop.value.type === 'Identifier') {\n reportIfInvalid(prop.value.name, prop.value);\n }\n }\n return;\n }\n\n if (id.type === 'Identifier') {\n const typeName =\n node.id.typeAnnotation?.typeAnnotation.type === 'TSTypeReference' &&\n node.id.typeAnnotation.typeAnnotation.typeName.type === 'Identifier'\n ? node.id.typeAnnotation.typeAnnotation.typeName.name\n : null;\n\n const hasSelectorType =\n typeName !== null &&\n [\n 'MemoizedSelector',\n 'MemoizedSelectorWithProps',\n 'Selector',\n 'SelectorWithProps',\n ].includes(typeName);\n\n const isSelectorCall =\n init?.type === 'CallExpression' && isSelectorFactoryCall(init);\n\n const isArrowFunction =\n init?.type === 'ArrowFunctionExpression' &&\n init.body &&\n (init.body.type === 'CallExpression' ||\n init.body.type === 'BlockStatement');\n\n const isFunctionExpression =\n init?.type === 'FunctionExpression' &&\n init.body &&\n init.body.type === 'BlockStatement';\n\n if (hasSelectorType || isSelectorCall) {\n reportIfInvalid(id.name, id);\n } else if (isArrowFunction || isFunctionExpression) {\n checkFunctionBody(id.name, id, init.body);\n }\n }\n },\n };\n },\n});\n\nfunction getSuggestedName(name: string): string {\n const selectWord = 'select';\n\n if (name.startsWith(selectWord)) {\n const rest = name.slice(selectWord.length);\n if (rest.length === 0) {\n return 'selectSelect';\n }\n if (/^[A-Z_]+$/.test(rest)) {\n return `${selectWord}${rest}`;\n }\n return `${selectWord}${capitalize(rest)}`;\n }\n\n if (/^get([^a-z].+)/.test(name)) {\n const rest = name.slice(3);\n return `${selectWord}${capitalize(rest)}`;\n }\n\n if (/^[A-Z_]+$/.test(name)) {\n return `${selectWord}${name}`;\n }\n\n return `${selectWord}${capitalize(name)}`;\n}\n"]}
|
package/v9/index.d.ts
CHANGED
|
@@ -5,11 +5,14 @@ declare const meta: {
|
|
|
5
5
|
};
|
|
6
6
|
declare const configs: {
|
|
7
7
|
all: TSESLint.FlatConfig.ConfigArray;
|
|
8
|
+
allTypeChecked: TSESLint.FlatConfig.ConfigArray;
|
|
8
9
|
store: TSESLint.FlatConfig.ConfigArray;
|
|
9
10
|
effects: TSESLint.FlatConfig.ConfigArray;
|
|
11
|
+
effectsTypeChecked: TSESLint.FlatConfig.ConfigArray;
|
|
10
12
|
componentStore: TSESLint.FlatConfig.ConfigArray;
|
|
11
13
|
operators: TSESLint.FlatConfig.ConfigArray;
|
|
12
14
|
signals: TSESLint.FlatConfig.ConfigArray;
|
|
15
|
+
signalsTypeChecked: TSESLint.FlatConfig.ConfigArray;
|
|
13
16
|
};
|
|
14
17
|
declare const _default: {
|
|
15
18
|
meta: {
|
|
@@ -18,11 +21,14 @@ declare const _default: {
|
|
|
18
21
|
};
|
|
19
22
|
configs: {
|
|
20
23
|
all: TSESLint.FlatConfig.ConfigArray;
|
|
24
|
+
allTypeChecked: TSESLint.FlatConfig.ConfigArray;
|
|
21
25
|
store: TSESLint.FlatConfig.ConfigArray;
|
|
22
26
|
effects: TSESLint.FlatConfig.ConfigArray;
|
|
27
|
+
effectsTypeChecked: TSESLint.FlatConfig.ConfigArray;
|
|
23
28
|
componentStore: TSESLint.FlatConfig.ConfigArray;
|
|
24
29
|
operators: TSESLint.FlatConfig.ConfigArray;
|
|
25
30
|
signals: TSESLint.FlatConfig.ConfigArray;
|
|
31
|
+
signalsTypeChecked: TSESLint.FlatConfig.ConfigArray;
|
|
26
32
|
};
|
|
27
33
|
};
|
|
28
34
|
export default _default;
|
package/v9/index.js
CHANGED
|
@@ -13,6 +13,9 @@ const effects_1 = __importDefault(require("../src/configs/effects"));
|
|
|
13
13
|
const component_store_1 = __importDefault(require("../src/configs/component-store"));
|
|
14
14
|
const operators_1 = __importDefault(require("../src/configs/operators"));
|
|
15
15
|
const signals_1 = __importDefault(require("../src/configs/signals"));
|
|
16
|
+
const allTypeChecked_1 = __importDefault(require("../src/configs/allTypeChecked"));
|
|
17
|
+
const effectsTypeChecked_1 = __importDefault(require("../src/configs/effectsTypeChecked"));
|
|
18
|
+
const signalsTypeChecked_1 = __importDefault(require("../src/configs/signalsTypeChecked"));
|
|
16
19
|
const meta = { name: package_json_1.name, version: package_json_1.version };
|
|
17
20
|
exports.meta = meta;
|
|
18
21
|
const tsPlugin = {
|
|
@@ -20,11 +23,14 @@ const tsPlugin = {
|
|
|
20
23
|
};
|
|
21
24
|
const configs = {
|
|
22
25
|
all: (0, all_1.default)(tsPlugin, typescript_eslint_1.parser),
|
|
26
|
+
allTypeChecked: (0, allTypeChecked_1.default)(tsPlugin, typescript_eslint_1.parser),
|
|
23
27
|
store: (0, store_1.default)(tsPlugin, typescript_eslint_1.parser),
|
|
24
28
|
effects: (0, effects_1.default)(tsPlugin, typescript_eslint_1.parser),
|
|
29
|
+
effectsTypeChecked: (0, effectsTypeChecked_1.default)(tsPlugin, typescript_eslint_1.parser),
|
|
25
30
|
componentStore: (0, component_store_1.default)(tsPlugin, typescript_eslint_1.parser),
|
|
26
31
|
operators: (0, operators_1.default)(tsPlugin, typescript_eslint_1.parser),
|
|
27
32
|
signals: (0, signals_1.default)(tsPlugin, typescript_eslint_1.parser),
|
|
33
|
+
signalsTypeChecked: (0, signalsTypeChecked_1.default)(tsPlugin, typescript_eslint_1.parser),
|
|
28
34
|
};
|
|
29
35
|
exports.configs = configs;
|
|
30
36
|
/*
|
package/v9/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../modules/eslint-plugin/v9/index.ts"],"names":[],"mappings":";;;;;;AACA,yDAA2C;AAC3C,wCAAqC;AACrC,kDAGyB;AACzB,6DAAqC;AACrC,iEAAyC;AACzC,qEAA6C;AAC7C,qFAA4D;AAC5D,yEAAiD;AACjD,qEAA6C;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../modules/eslint-plugin/v9/index.ts"],"names":[],"mappings":";;;;;;AACA,yDAA2C;AAC3C,wCAAqC;AACrC,kDAGyB;AACzB,6DAAqC;AACrC,iEAAyC;AACzC,qEAA6C;AAC7C,qFAA4D;AAC5D,yEAAiD;AACjD,qEAA6C;AAC7C,mFAA2D;AAC3D,2FAAmE;AACnE,2FAAmE;AAEnE,MAAM,IAAI,GAAG,EAAE,IAAI,EAAE,mBAAW,EAAE,OAAO,EAAE,sBAAc,EAAE,CAAC;AA0BnD,oBAAI;AAxBb,MAAM,QAAQ,GAA+B;IAC3C,KAAK,EAAL,aAAK;CACN,CAAC;AAEF,MAAM,OAAO,GAAG;IACd,GAAG,EAAE,IAAA,aAAG,EAAC,QAAQ,EAAE,0BAAM,CAAC;IAC1B,cAAc,EAAE,IAAA,wBAAc,EAAC,QAAQ,EAAE,0BAAM,CAAC;IAChD,KAAK,EAAE,IAAA,eAAK,EAAC,QAAQ,EAAE,0BAAM,CAAC;IAC9B,OAAO,EAAE,IAAA,iBAAO,EAAC,QAAQ,EAAE,0BAAM,CAAC;IAClC,kBAAkB,EAAE,IAAA,4BAAkB,EAAC,QAAQ,EAAE,0BAAM,CAAC;IACxD,cAAc,EAAE,IAAA,yBAAc,EAAC,QAAQ,EAAE,0BAAM,CAAC;IAChD,SAAS,EAAE,IAAA,mBAAS,EAAC,QAAQ,EAAE,0BAAM,CAAC;IACtC,OAAO,EAAE,IAAA,iBAAO,EAAC,QAAQ,EAAE,0BAAM,CAAC;IAClC,kBAAkB,EAAE,IAAA,4BAAkB,EAAC,QAAQ,EAAE,0BAAM,CAAC;CACzD,CAAC;AAUa,0BAAO;AARtB;;;EAGE;AACF,kBAAe;IACb,IAAI;IACJ,OAAO;CACR,CAAC","sourcesContent":["import { TSESLint } from '@typescript-eslint/utils';\nimport { parser } from 'typescript-eslint';\nimport { rules } from '../src/rules';\nimport {\n name as packageName,\n version as packageVersion,\n} from '../package.json';\nimport all from '../src/configs/all';\nimport store from '../src/configs/store';\nimport effects from '../src/configs/effects';\nimport componentStore from '../src/configs/component-store';\nimport operators from '../src/configs/operators';\nimport signals from '../src/configs/signals';\nimport allTypeChecked from '../src/configs/allTypeChecked';\nimport effectsTypeChecked from '../src/configs/effectsTypeChecked';\nimport signalsTypeChecked from '../src/configs/signalsTypeChecked';\n\nconst meta = { name: packageName, version: packageVersion };\n\nconst tsPlugin: TSESLint.FlatConfig.Plugin = {\n rules,\n};\n\nconst configs = {\n all: all(tsPlugin, parser),\n allTypeChecked: allTypeChecked(tsPlugin, parser),\n store: store(tsPlugin, parser),\n effects: effects(tsPlugin, parser),\n effectsTypeChecked: effectsTypeChecked(tsPlugin, parser),\n componentStore: componentStore(tsPlugin, parser),\n operators: operators(tsPlugin, parser),\n signals: signals(tsPlugin, parser),\n signalsTypeChecked: signalsTypeChecked(tsPlugin, parser),\n};\n\n/*\nAs the angular-eslint plugin we do both a default and named exports to allow people to use this package from\nboth CJS and ESM in very natural ways.\n*/\nexport default {\n meta,\n configs,\n};\nexport { meta, configs };\n"]}
|
package/jest.config.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
displayName: string;
|
|
3
|
-
preset: string;
|
|
4
|
-
coverageDirectory: string;
|
|
5
|
-
setupFilesAfterEnv: string[];
|
|
6
|
-
transform: {
|
|
7
|
-
'^.+\\.(ts|mjs|js|html)$': (string | {
|
|
8
|
-
tsconfig: string;
|
|
9
|
-
stringifyContentPathRegex: string;
|
|
10
|
-
})[];
|
|
11
|
-
};
|
|
12
|
-
transformIgnorePatterns: string[];
|
|
13
|
-
snapshotSerializers: string[];
|
|
14
|
-
};
|
|
15
|
-
export default _default;
|
package/jest.config.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
exports.default = {
|
|
5
|
-
displayName: 'eslint-plugin',
|
|
6
|
-
preset: '../../jest.preset.js',
|
|
7
|
-
coverageDirectory: '../../coverage/modules/eslint-plugin',
|
|
8
|
-
setupFilesAfterEnv: ['<rootDir>/test-setup.ts'],
|
|
9
|
-
transform: {
|
|
10
|
-
'^.+\\.(ts|mjs|js|html)$': [
|
|
11
|
-
'jest-preset-angular',
|
|
12
|
-
{
|
|
13
|
-
tsconfig: '<rootDir>/tsconfig.spec.json',
|
|
14
|
-
stringifyContentPathRegex: '\\.(html|svg)$',
|
|
15
|
-
},
|
|
16
|
-
],
|
|
17
|
-
},
|
|
18
|
-
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
|
|
19
|
-
snapshotSerializers: [
|
|
20
|
-
'jest-preset-angular/build/serializers/no-ng-attributes',
|
|
21
|
-
'jest-preset-angular/build/serializers/ng-snapshot',
|
|
22
|
-
'jest-preset-angular/build/serializers/html-comment',
|
|
23
|
-
],
|
|
24
|
-
};
|
|
25
|
-
//# sourceMappingURL=jest.config.js.map
|
package/jest.config.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"jest.config.js","sourceRoot":"","sources":["../../../modules/eslint-plugin/jest.config.ts"],"names":[],"mappings":";;AAAA,oBAAoB;AACpB,kBAAe;IACb,WAAW,EAAE,eAAe;IAC5B,MAAM,EAAE,sBAAsB;IAC9B,iBAAiB,EAAE,sCAAsC;IACzD,kBAAkB,EAAE,CAAC,yBAAyB,CAAC;IAC/C,SAAS,EAAE;QACT,yBAAyB,EAAE;YACzB,qBAAqB;YACrB;gBACE,QAAQ,EAAE,8BAA8B;gBACxC,yBAAyB,EAAE,gBAAgB;aAC5C;SACF;KACF;IACD,uBAAuB,EAAE,CAAC,4BAA4B,CAAC;IACvD,mBAAmB,EAAE;QACnB,wDAAwD;QACxD,mDAAmD;QACnD,oDAAoD;KACrD;CACF,CAAC","sourcesContent":["/* eslint-disable */\nexport default {\n displayName: 'eslint-plugin',\n preset: '../../jest.preset.js',\n coverageDirectory: '../../coverage/modules/eslint-plugin',\n setupFilesAfterEnv: ['<rootDir>/test-setup.ts'],\n transform: {\n '^.+\\\\.(ts|mjs|js|html)$': [\n 'jest-preset-angular',\n {\n tsconfig: '<rootDir>/tsconfig.spec.json',\n stringifyContentPathRegex: '\\\\.(html|svg)$',\n },\n ],\n },\n transformIgnorePatterns: ['node_modules/(?!.*\\\\.mjs$)'],\n snapshotSerializers: [\n 'jest-preset-angular/build/serializers/no-ng-attributes',\n 'jest-preset-angular/build/serializers/ng-snapshot',\n 'jest-preset-angular/build/serializers/html-comment',\n ],\n};\n"]}
|