@ngrx/eslint-plugin 14.3.2 → 15.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 +225 -3
- package/src/configs/all-requiring-type-checking.js +0 -2
- package/src/configs/all-requiring-type-checking.js.map +1 -1
- package/src/configs/all.js +0 -2
- package/src/configs/all.js.map +1 -1
- package/src/configs/effects-requiring-type-checking.js +0 -2
- package/src/configs/effects-requiring-type-checking.js.map +1 -1
- package/src/configs/effects-strict-requiring-type-checking.js +0 -2
- package/src/configs/effects-strict-requiring-type-checking.js.map +1 -1
- package/src/configs/effects-strict.js +0 -2
- package/src/configs/effects-strict.js.map +1 -1
- package/src/configs/effects.js +0 -2
- package/src/configs/effects.js.map +1 -1
- package/src/configs/recommended-requiring-type-checking.js +0 -2
- package/src/configs/recommended-requiring-type-checking.js.map +1 -1
- package/src/configs/recommended.js +0 -2
- package/src/configs/recommended.js.map +1 -1
- package/src/configs/strict-requiring-type-checking.js +0 -2
- package/src/configs/strict-requiring-type-checking.js.map +1 -1
- package/src/configs/strict.js +0 -2
- package/src/configs/strict.js.map +1 -1
- package/src/rules/effects/no-effect-decorator-and-creator.js +0 -107
- package/src/rules/effects/no-effect-decorator-and-creator.js.map +0 -1
- package/src/rules/effects/no-effect-decorator.js +0 -124
- package/src/rules/effects/no-effect-decorator.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngrx/eslint-plugin",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "15.0.0-beta.0",
|
|
4
4
|
"description": "NgRx ESLint Plugin",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -44,8 +44,230 @@
|
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"eslint": ">=8.0.0",
|
|
47
|
-
"typescript": ">=4.4.0"
|
|
47
|
+
"typescript": ">=4.4.0",
|
|
48
|
+
"@angular-devkit/core": "15.0.0-rc.0",
|
|
49
|
+
"ajv": "8.11.0",
|
|
50
|
+
"fast-deep-equal": "3.1.3",
|
|
51
|
+
"json-schema-traverse": "1.0.0",
|
|
52
|
+
"require-from-string": "2.0.2",
|
|
53
|
+
"uri-js": "4.4.1",
|
|
54
|
+
"punycode": "2.1.1",
|
|
55
|
+
"ajv-formats": "2.1.1",
|
|
56
|
+
"jsonc-parser": "3.2.0",
|
|
57
|
+
"rxjs": "6.6.7",
|
|
58
|
+
"tslib": "1.14.1",
|
|
59
|
+
"source-map": "0.7.4",
|
|
60
|
+
"magic-string": "0.26.7",
|
|
61
|
+
"sourcemap-codec": "1.4.8",
|
|
62
|
+
"bl": "4.1.0",
|
|
63
|
+
"buffer": "5.7.1",
|
|
64
|
+
"base64-js": "1.5.1",
|
|
65
|
+
"ieee754": "1.2.1",
|
|
66
|
+
"inherits": "2.0.4",
|
|
67
|
+
"readable-stream": "3.6.0",
|
|
68
|
+
"string_decoder": "1.3.0",
|
|
69
|
+
"safe-buffer": "5.2.1",
|
|
70
|
+
"util-deprecate": "1.0.2",
|
|
71
|
+
"chalk": "4.1.0",
|
|
72
|
+
"ansi-styles": "4.3.0",
|
|
73
|
+
"color-convert": "2.0.1",
|
|
74
|
+
"color-name": "1.1.4",
|
|
75
|
+
"supports-color": "7.2.0",
|
|
76
|
+
"has-flag": "4.0.0",
|
|
77
|
+
"cli-cursor": "3.1.0",
|
|
78
|
+
"restore-cursor": "3.1.0",
|
|
79
|
+
"onetime": "5.1.2",
|
|
80
|
+
"mimic-fn": "2.1.0",
|
|
81
|
+
"signal-exit": "3.0.3",
|
|
82
|
+
"cli-spinners": "2.6.1",
|
|
83
|
+
"is-interactive": "1.0.0",
|
|
84
|
+
"is-unicode-supported": "0.1.0",
|
|
85
|
+
"log-symbols": "4.1.0",
|
|
86
|
+
"strip-ansi": "6.0.0",
|
|
87
|
+
"ansi-regex": "5.0.0",
|
|
88
|
+
"wcwidth": "1.0.1",
|
|
89
|
+
"defaults": "1.0.3",
|
|
90
|
+
"clone": "1.0.4",
|
|
91
|
+
"@types/json-schema": "7.0.9",
|
|
92
|
+
"@typescript-eslint/scope-manager": "5.18.0",
|
|
93
|
+
"@typescript-eslint/types": "5.18.0",
|
|
94
|
+
"@typescript-eslint/visitor-keys": "5.18.0",
|
|
95
|
+
"eslint-visitor-keys": "3.3.0",
|
|
96
|
+
"@typescript-eslint/typescript-estree": "5.18.0",
|
|
97
|
+
"debug": "4.3.4",
|
|
98
|
+
"ms": "2.1.2",
|
|
99
|
+
"globby": "11.1.0",
|
|
100
|
+
"array-union": "2.1.0",
|
|
101
|
+
"dir-glob": "3.0.1",
|
|
102
|
+
"path-type": "4.0.0",
|
|
103
|
+
"fast-glob": "3.2.11",
|
|
104
|
+
"@nodelib/fs.stat": "2.0.4",
|
|
105
|
+
"@nodelib/fs.walk": "1.2.6",
|
|
106
|
+
"@nodelib/fs.scandir": "2.1.4",
|
|
107
|
+
"run-parallel": "1.2.0",
|
|
108
|
+
"queue-microtask": "1.2.3",
|
|
109
|
+
"fastq": "1.11.0",
|
|
110
|
+
"reusify": "1.0.4",
|
|
111
|
+
"glob-parent": "5.1.2",
|
|
112
|
+
"is-glob": "4.0.1",
|
|
113
|
+
"is-extglob": "2.1.1",
|
|
114
|
+
"merge2": "1.4.1",
|
|
115
|
+
"micromatch": "4.0.4",
|
|
116
|
+
"braces": "3.0.2",
|
|
117
|
+
"fill-range": "7.0.1",
|
|
118
|
+
"to-regex-range": "5.0.1",
|
|
119
|
+
"is-number": "7.0.0",
|
|
120
|
+
"picomatch": "2.2.3",
|
|
121
|
+
"ignore": "5.2.0",
|
|
122
|
+
"slash": "3.0.0",
|
|
123
|
+
"lru-cache": "6.0.0",
|
|
124
|
+
"yallist": "4.0.0",
|
|
125
|
+
"eslint-scope": "5.1.1",
|
|
126
|
+
"esrecurse": "4.3.0",
|
|
127
|
+
"estraverse": "5.2.0",
|
|
128
|
+
"eslint-utils": "3.0.0",
|
|
129
|
+
"tsutils-etc": "1.4.1",
|
|
130
|
+
"@types/yargs": "17.0.10",
|
|
131
|
+
"@types/yargs-parser": "20.2.0",
|
|
132
|
+
"yargs": "17.6.0",
|
|
133
|
+
"cliui": "8.0.1",
|
|
134
|
+
"string-width": "4.2.3",
|
|
135
|
+
"emoji-regex": "8.0.0",
|
|
136
|
+
"is-fullwidth-code-point": "3.0.0",
|
|
137
|
+
"wrap-ansi": "7.0.0",
|
|
138
|
+
"escalade": "3.1.1",
|
|
139
|
+
"get-caller-file": "2.0.5",
|
|
140
|
+
"require-directory": "2.1.1",
|
|
141
|
+
"y18n": "5.0.8",
|
|
142
|
+
"yargs-parser": "21.0.1",
|
|
143
|
+
"@eslint/eslintrc": "1.3.1",
|
|
144
|
+
"fast-json-stable-stringify": "2.1.0",
|
|
145
|
+
"espree": "9.4.0",
|
|
146
|
+
"acorn": "8.8.0",
|
|
147
|
+
"acorn-jsx": "5.3.2",
|
|
148
|
+
"globals": "13.17.0",
|
|
149
|
+
"type-fest": "0.20.2",
|
|
150
|
+
"import-fresh": "3.3.0",
|
|
151
|
+
"parent-module": "1.0.1",
|
|
152
|
+
"callsites": "3.1.0",
|
|
153
|
+
"resolve-from": "4.0.0",
|
|
154
|
+
"js-yaml": "4.1.0",
|
|
155
|
+
"argparse": "2.0.1",
|
|
156
|
+
"minimatch": "3.1.2",
|
|
157
|
+
"brace-expansion": "1.1.11",
|
|
158
|
+
"balanced-match": "1.0.2",
|
|
159
|
+
"concat-map": "0.0.1",
|
|
160
|
+
"@humanwhocodes/config-array": "0.9.5",
|
|
161
|
+
"@humanwhocodes/object-schema": "1.2.1",
|
|
162
|
+
"cross-spawn": "7.0.3",
|
|
163
|
+
"path-key": "3.1.1",
|
|
164
|
+
"shebang-command": "2.0.0",
|
|
165
|
+
"shebang-regex": "3.0.0",
|
|
166
|
+
"which": "2.0.2",
|
|
167
|
+
"isexe": "2.0.0",
|
|
168
|
+
"doctrine": "3.0.0",
|
|
169
|
+
"esutils": "2.0.3",
|
|
170
|
+
"escape-string-regexp": "4.0.0",
|
|
171
|
+
"esquery": "1.4.0",
|
|
172
|
+
"file-entry-cache": "6.0.1",
|
|
173
|
+
"flat-cache": "3.0.4",
|
|
174
|
+
"flatted": "3.1.1",
|
|
175
|
+
"fs.realpath": "1.0.0",
|
|
176
|
+
"inflight": "1.0.6",
|
|
177
|
+
"once": "1.4.0",
|
|
178
|
+
"wrappy": "1.0.2",
|
|
179
|
+
"path-is-absolute": "1.0.1",
|
|
180
|
+
"functional-red-black-tree": "1.0.1",
|
|
181
|
+
"imurmurhash": "0.1.4",
|
|
182
|
+
"json-stable-stringify-without-jsonify": "1.0.1",
|
|
183
|
+
"levn": "0.4.1",
|
|
184
|
+
"prelude-ls": "1.2.1",
|
|
185
|
+
"type-check": "0.4.0",
|
|
186
|
+
"lodash.merge": "4.6.2",
|
|
187
|
+
"natural-compare": "1.4.0",
|
|
188
|
+
"optionator": "0.9.1",
|
|
189
|
+
"deep-is": "0.1.3",
|
|
190
|
+
"fast-levenshtein": "2.0.6",
|
|
191
|
+
"word-wrap": "1.2.3",
|
|
192
|
+
"regexpp": "3.2.0",
|
|
193
|
+
"text-table": "0.2.0",
|
|
194
|
+
"v8-compile-cache": "2.3.0",
|
|
195
|
+
"bs-logger": "0.2.6",
|
|
196
|
+
"esbuild-wasm": "0.15.11",
|
|
197
|
+
"@jest/environment": "28.1.3",
|
|
198
|
+
"@jest/fake-timers": "28.1.3",
|
|
199
|
+
"@jest/types": "28.1.3",
|
|
200
|
+
"@jest/schemas": "28.1.3",
|
|
201
|
+
"@sinclair/typebox": "0.24.28",
|
|
202
|
+
"@types/istanbul-lib-coverage": "2.0.3",
|
|
203
|
+
"@types/istanbul-reports": "3.0.0",
|
|
204
|
+
"@types/istanbul-lib-report": "3.0.0",
|
|
205
|
+
"@sinonjs/fake-timers": "9.1.2",
|
|
206
|
+
"@sinonjs/commons": "1.8.3",
|
|
207
|
+
"type-detect": "4.0.8",
|
|
208
|
+
"jest-message-util": "28.1.3",
|
|
209
|
+
"@babel/code-frame": "7.12.13",
|
|
210
|
+
"@babel/highlight": "7.13.10",
|
|
211
|
+
"@babel/helper-validator-identifier": "7.12.11",
|
|
212
|
+
"js-tokens": "4.0.0",
|
|
213
|
+
"@types/stack-utils": "2.0.0",
|
|
214
|
+
"graceful-fs": "4.2.10",
|
|
215
|
+
"pretty-format": "28.1.3",
|
|
216
|
+
"react-is": "18.2.0",
|
|
217
|
+
"stack-utils": "2.0.3",
|
|
218
|
+
"jest-mock": "28.1.3",
|
|
219
|
+
"jest-util": "28.1.3",
|
|
220
|
+
"ci-info": "3.2.0",
|
|
221
|
+
"@types/jsdom": "16.2.15",
|
|
222
|
+
"@types/parse5": "6.0.3",
|
|
223
|
+
"@types/tough-cookie": "4.0.2",
|
|
224
|
+
"jsdom": "19.0.0",
|
|
225
|
+
"abab": "2.0.5",
|
|
226
|
+
"acorn-globals": "6.0.0",
|
|
227
|
+
"acorn-walk": "7.2.0",
|
|
228
|
+
"cssom": "0.5.0",
|
|
229
|
+
"cssstyle": "2.3.0",
|
|
230
|
+
"data-urls": "3.0.2",
|
|
231
|
+
"whatwg-mimetype": "3.0.0",
|
|
232
|
+
"whatwg-url": "11.0.0",
|
|
233
|
+
"tr46": "3.0.0",
|
|
234
|
+
"webidl-conversions": "7.0.0",
|
|
235
|
+
"decimal.js": "10.4.0",
|
|
236
|
+
"domexception": "4.0.0",
|
|
237
|
+
"escodegen": "2.0.0",
|
|
238
|
+
"esprima": "4.0.1",
|
|
239
|
+
"form-data": "4.0.0",
|
|
240
|
+
"asynckit": "0.4.0",
|
|
241
|
+
"combined-stream": "1.0.8",
|
|
242
|
+
"delayed-stream": "1.0.0",
|
|
243
|
+
"mime-types": "2.1.30",
|
|
244
|
+
"mime-db": "1.47.0",
|
|
245
|
+
"html-encoding-sniffer": "3.0.0",
|
|
246
|
+
"whatwg-encoding": "2.0.0",
|
|
247
|
+
"iconv-lite": "0.6.3",
|
|
248
|
+
"safer-buffer": "2.1.2",
|
|
249
|
+
"http-proxy-agent": "5.0.0",
|
|
250
|
+
"@tootallnate/once": "2.0.0",
|
|
251
|
+
"agent-base": "6.0.2",
|
|
252
|
+
"https-proxy-agent": "5.0.1",
|
|
253
|
+
"is-potential-custom-element-name": "1.0.1",
|
|
254
|
+
"nwsapi": "2.2.0",
|
|
255
|
+
"parse5": "6.0.1",
|
|
256
|
+
"saxes": "5.0.1",
|
|
257
|
+
"xmlchars": "2.2.0",
|
|
258
|
+
"symbol-tree": "3.2.4",
|
|
259
|
+
"tough-cookie": "4.0.0",
|
|
260
|
+
"psl": "1.8.0",
|
|
261
|
+
"universalify": "0.1.2",
|
|
262
|
+
"w3c-hr-time": "1.0.2",
|
|
263
|
+
"browser-process-hrtime": "1.0.0",
|
|
264
|
+
"w3c-xmlserializer": "3.0.0",
|
|
265
|
+
"xml-name-validator": "4.0.0",
|
|
266
|
+
"ws": "8.8.1",
|
|
267
|
+
"json5": "2.2.1",
|
|
268
|
+
"lodash.memoize": "4.1.2",
|
|
269
|
+
"make-error": "1.3.6"
|
|
48
270
|
},
|
|
49
271
|
"main": "./src/index.js",
|
|
50
|
-
"
|
|
272
|
+
"types": "./src/index.d.ts"
|
|
51
273
|
}
|
|
@@ -15,8 +15,6 @@ module.exports = {
|
|
|
15
15
|
'@ngrx/updater-explicit-return-type': 'warn',
|
|
16
16
|
'@ngrx/avoid-cyclic-effects': 'warn',
|
|
17
17
|
'@ngrx/no-dispatch-in-effects': 'warn',
|
|
18
|
-
'@ngrx/no-effect-decorator-and-creator': 'error',
|
|
19
|
-
'@ngrx/no-effect-decorator': 'warn',
|
|
20
18
|
'@ngrx/no-effects-in-providers': 'error',
|
|
21
19
|
'@ngrx/no-multiple-actions-in-effects': 'warn',
|
|
22
20
|
'@ngrx/prefer-action-creator-in-of-type': 'warn',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"all-requiring-type-checking.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/all-requiring-type-checking.ts"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,iBAAS;IACP,MAAM,EAAE,2BAA2B;IACnC,aAAa,EAAE;QACb,WAAW,EAAE,IAAI;QACjB,UAAU,EAAE,QAAQ;QACpB,OAAO,EAAE,iBAAiB;KAC3B;IACD,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,KAAK,EAAE;QACL,oCAAoC,EAAE,MAAM;QAC5C,4BAA4B,EAAE,MAAM;QACpC,8BAA8B,EAAE,MAAM;QACtC
|
|
1
|
+
{"version":3,"file":"all-requiring-type-checking.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/all-requiring-type-checking.ts"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,iBAAS;IACP,MAAM,EAAE,2BAA2B;IACnC,aAAa,EAAE;QACb,WAAW,EAAE,IAAI;QACjB,UAAU,EAAE,QAAQ;QACpB,OAAO,EAAE,iBAAiB;KAC3B;IACD,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,KAAK,EAAE;QACL,oCAAoC,EAAE,MAAM;QAC5C,4BAA4B,EAAE,MAAM;QACpC,8BAA8B,EAAE,MAAM;QACtC,+BAA+B,EAAE,OAAO;QACxC,sCAAsC,EAAE,MAAM;QAC9C,wCAAwC,EAAE,MAAM;QAChD,iCAAiC,EAAE,MAAM;QACzC,iDAAiD,EAAE,MAAM;QACzD,uCAAuC,EAAE,MAAM;QAC/C,iCAAiC,EAAE,MAAM;QACzC,uDAAuD,EAAE,MAAM;QAC/D,0CAA0C,EAAE,MAAM;QAClD,+BAA+B,EAAE,MAAM;QACvC,2BAA2B,EAAE,MAAM;QACnC,iCAAiC,EAAE,MAAM;QACzC,+BAA+B,EAAE,MAAM;QACvC,6BAA6B,EAAE,MAAM;QACrC,6BAA6B,EAAE,MAAM;QACrC,wCAAwC,EAAE,MAAM;QAChD,yCAAyC,EAAE,MAAM;QACjD,6BAA6B,EAAE,MAAM;QACrC,kCAAkC,EAAE,MAAM;QAC1C,yDAAyD,EAAE,MAAM;QACjE,iCAAiC,EAAE,MAAM;QACzC,oCAAoC,EAAE,MAAM;QAC5C,oBAAoB,EAAE,MAAM;QAC5B,wCAAwC,EAAE,MAAM;KACjD;CACF,CAAC","sourcesContent":["/**\n * DO NOT EDIT\n * This file is generated\n */\n\nexport = {\n parser: '@typescript-eslint/parser',\n parserOptions: {\n ecmaVersion: 2020,\n sourceType: 'module',\n project: './tsconfig.json',\n },\n plugins: ['@ngrx'],\n rules: {\n '@ngrx/updater-explicit-return-type': 'warn',\n '@ngrx/avoid-cyclic-effects': 'warn',\n '@ngrx/no-dispatch-in-effects': 'warn',\n '@ngrx/no-effects-in-providers': 'error',\n '@ngrx/no-multiple-actions-in-effects': 'warn',\n '@ngrx/prefer-action-creator-in-of-type': 'warn',\n '@ngrx/prefer-concat-latest-from': 'warn',\n '@ngrx/prefer-effect-callback-in-block-statement': 'warn',\n '@ngrx/use-effects-lifecycle-interface': 'warn',\n '@ngrx/avoid-combining-selectors': 'warn',\n '@ngrx/avoid-dispatching-multiple-actions-sequentially': 'warn',\n '@ngrx/avoid-duplicate-actions-in-reducer': 'warn',\n '@ngrx/avoid-mapping-selectors': 'warn',\n '@ngrx/good-action-hygiene': 'warn',\n '@ngrx/no-multiple-global-stores': 'warn',\n '@ngrx/no-reducer-in-key-names': 'warn',\n '@ngrx/no-store-subscription': 'warn',\n '@ngrx/no-typed-global-store': 'warn',\n '@ngrx/on-function-explicit-return-type': 'warn',\n '@ngrx/prefer-action-creator-in-dispatch': 'warn',\n '@ngrx/prefer-action-creator': 'warn',\n '@ngrx/prefer-inline-action-props': 'warn',\n '@ngrx/prefer-one-generic-in-create-for-feature-selector': 'warn',\n '@ngrx/prefer-selector-in-select': 'warn',\n '@ngrx/prefix-selectors-with-select': 'warn',\n '@ngrx/select-style': 'warn',\n '@ngrx/use-consistent-global-store-name': 'warn',\n },\n};\n"]}
|
package/src/configs/all.js
CHANGED
|
@@ -9,8 +9,6 @@ module.exports = {
|
|
|
9
9
|
rules: {
|
|
10
10
|
'@ngrx/updater-explicit-return-type': 'warn',
|
|
11
11
|
'@ngrx/no-dispatch-in-effects': 'warn',
|
|
12
|
-
'@ngrx/no-effect-decorator-and-creator': 'error',
|
|
13
|
-
'@ngrx/no-effect-decorator': 'warn',
|
|
14
12
|
'@ngrx/no-effects-in-providers': 'error',
|
|
15
13
|
'@ngrx/prefer-action-creator-in-of-type': 'warn',
|
|
16
14
|
'@ngrx/prefer-concat-latest-from': 'warn',
|
package/src/configs/all.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"all.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/all.ts"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,iBAAS;IACP,MAAM,EAAE,2BAA2B;IAEnC,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,KAAK,EAAE;QACL,oCAAoC,EAAE,MAAM;QAC5C,8BAA8B,EAAE,MAAM;QACtC
|
|
1
|
+
{"version":3,"file":"all.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/all.ts"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,iBAAS;IACP,MAAM,EAAE,2BAA2B;IAEnC,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,KAAK,EAAE;QACL,oCAAoC,EAAE,MAAM;QAC5C,8BAA8B,EAAE,MAAM;QACtC,+BAA+B,EAAE,OAAO;QACxC,wCAAwC,EAAE,MAAM;QAChD,iCAAiC,EAAE,MAAM;QACzC,iDAAiD,EAAE,MAAM;QACzD,uCAAuC,EAAE,MAAM;QAC/C,iCAAiC,EAAE,MAAM;QACzC,uDAAuD,EAAE,MAAM;QAC/D,0CAA0C,EAAE,MAAM;QAClD,+BAA+B,EAAE,MAAM;QACvC,2BAA2B,EAAE,MAAM;QACnC,iCAAiC,EAAE,MAAM;QACzC,+BAA+B,EAAE,MAAM;QACvC,6BAA6B,EAAE,MAAM;QACrC,6BAA6B,EAAE,MAAM;QACrC,wCAAwC,EAAE,MAAM;QAChD,yCAAyC,EAAE,MAAM;QACjD,6BAA6B,EAAE,MAAM;QACrC,kCAAkC,EAAE,MAAM;QAC1C,yDAAyD,EAAE,MAAM;QACjE,iCAAiC,EAAE,MAAM;QACzC,oCAAoC,EAAE,MAAM;QAC5C,oBAAoB,EAAE,MAAM;QAC5B,wCAAwC,EAAE,MAAM;KACjD;CACF,CAAC","sourcesContent":["/**\n * DO NOT EDIT\n * This file is generated\n */\n\nexport = {\n parser: '@typescript-eslint/parser',\n\n plugins: ['@ngrx'],\n rules: {\n '@ngrx/updater-explicit-return-type': 'warn',\n '@ngrx/no-dispatch-in-effects': 'warn',\n '@ngrx/no-effects-in-providers': 'error',\n '@ngrx/prefer-action-creator-in-of-type': 'warn',\n '@ngrx/prefer-concat-latest-from': 'warn',\n '@ngrx/prefer-effect-callback-in-block-statement': 'warn',\n '@ngrx/use-effects-lifecycle-interface': 'warn',\n '@ngrx/avoid-combining-selectors': 'warn',\n '@ngrx/avoid-dispatching-multiple-actions-sequentially': 'warn',\n '@ngrx/avoid-duplicate-actions-in-reducer': 'warn',\n '@ngrx/avoid-mapping-selectors': 'warn',\n '@ngrx/good-action-hygiene': 'warn',\n '@ngrx/no-multiple-global-stores': 'warn',\n '@ngrx/no-reducer-in-key-names': 'warn',\n '@ngrx/no-store-subscription': 'warn',\n '@ngrx/no-typed-global-store': 'warn',\n '@ngrx/on-function-explicit-return-type': 'warn',\n '@ngrx/prefer-action-creator-in-dispatch': 'warn',\n '@ngrx/prefer-action-creator': 'warn',\n '@ngrx/prefer-inline-action-props': 'warn',\n '@ngrx/prefer-one-generic-in-create-for-feature-selector': 'warn',\n '@ngrx/prefer-selector-in-select': 'warn',\n '@ngrx/prefix-selectors-with-select': 'warn',\n '@ngrx/select-style': 'warn',\n '@ngrx/use-consistent-global-store-name': 'warn',\n },\n};\n"]}
|
|
@@ -14,8 +14,6 @@ module.exports = {
|
|
|
14
14
|
rules: {
|
|
15
15
|
'@ngrx/avoid-cyclic-effects': 'warn',
|
|
16
16
|
'@ngrx/no-dispatch-in-effects': 'warn',
|
|
17
|
-
'@ngrx/no-effect-decorator-and-creator': 'error',
|
|
18
|
-
'@ngrx/no-effect-decorator': 'warn',
|
|
19
17
|
'@ngrx/no-effects-in-providers': 'error',
|
|
20
18
|
'@ngrx/no-multiple-actions-in-effects': 'warn',
|
|
21
19
|
'@ngrx/prefer-action-creator-in-of-type': 'warn',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"effects-requiring-type-checking.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/effects-requiring-type-checking.ts"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,iBAAS;IACP,MAAM,EAAE,2BAA2B;IACnC,aAAa,EAAE;QACb,WAAW,EAAE,IAAI;QACjB,UAAU,EAAE,QAAQ;QACpB,OAAO,EAAE,iBAAiB;KAC3B;IACD,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,KAAK,EAAE;QACL,4BAA4B,EAAE,MAAM;QACpC,8BAA8B,EAAE,MAAM;QACtC
|
|
1
|
+
{"version":3,"file":"effects-requiring-type-checking.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/effects-requiring-type-checking.ts"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,iBAAS;IACP,MAAM,EAAE,2BAA2B;IACnC,aAAa,EAAE;QACb,WAAW,EAAE,IAAI;QACjB,UAAU,EAAE,QAAQ;QACpB,OAAO,EAAE,iBAAiB;KAC3B;IACD,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,KAAK,EAAE;QACL,4BAA4B,EAAE,MAAM;QACpC,8BAA8B,EAAE,MAAM;QACtC,+BAA+B,EAAE,OAAO;QACxC,sCAAsC,EAAE,MAAM;QAC9C,wCAAwC,EAAE,MAAM;QAChD,iCAAiC,EAAE,MAAM;QACzC,iDAAiD,EAAE,MAAM;QACzD,uCAAuC,EAAE,MAAM;KAChD;CACF,CAAC","sourcesContent":["/**\n * DO NOT EDIT\n * This file is generated\n */\n\nexport = {\n parser: '@typescript-eslint/parser',\n parserOptions: {\n ecmaVersion: 2020,\n sourceType: 'module',\n project: './tsconfig.json',\n },\n plugins: ['@ngrx'],\n rules: {\n '@ngrx/avoid-cyclic-effects': 'warn',\n '@ngrx/no-dispatch-in-effects': 'warn',\n '@ngrx/no-effects-in-providers': 'error',\n '@ngrx/no-multiple-actions-in-effects': 'warn',\n '@ngrx/prefer-action-creator-in-of-type': 'warn',\n '@ngrx/prefer-concat-latest-from': 'warn',\n '@ngrx/prefer-effect-callback-in-block-statement': 'warn',\n '@ngrx/use-effects-lifecycle-interface': 'warn',\n },\n};\n"]}
|
|
@@ -14,8 +14,6 @@ module.exports = {
|
|
|
14
14
|
rules: {
|
|
15
15
|
'@ngrx/avoid-cyclic-effects': 'error',
|
|
16
16
|
'@ngrx/no-dispatch-in-effects': 'error',
|
|
17
|
-
'@ngrx/no-effect-decorator-and-creator': 'error',
|
|
18
|
-
'@ngrx/no-effect-decorator': 'error',
|
|
19
17
|
'@ngrx/no-effects-in-providers': 'error',
|
|
20
18
|
'@ngrx/no-multiple-actions-in-effects': 'error',
|
|
21
19
|
'@ngrx/prefer-action-creator-in-of-type': 'error',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"effects-strict-requiring-type-checking.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/effects-strict-requiring-type-checking.ts"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,iBAAS;IACP,MAAM,EAAE,2BAA2B;IACnC,aAAa,EAAE;QACb,WAAW,EAAE,IAAI;QACjB,UAAU,EAAE,QAAQ;QACpB,OAAO,EAAE,iBAAiB;KAC3B;IACD,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,KAAK,EAAE;QACL,4BAA4B,EAAE,OAAO;QACrC,8BAA8B,EAAE,OAAO;QACvC
|
|
1
|
+
{"version":3,"file":"effects-strict-requiring-type-checking.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/effects-strict-requiring-type-checking.ts"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,iBAAS;IACP,MAAM,EAAE,2BAA2B;IACnC,aAAa,EAAE;QACb,WAAW,EAAE,IAAI;QACjB,UAAU,EAAE,QAAQ;QACpB,OAAO,EAAE,iBAAiB;KAC3B;IACD,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,KAAK,EAAE;QACL,4BAA4B,EAAE,OAAO;QACrC,8BAA8B,EAAE,OAAO;QACvC,+BAA+B,EAAE,OAAO;QACxC,sCAAsC,EAAE,OAAO;QAC/C,wCAAwC,EAAE,OAAO;QACjD,iCAAiC,EAAE,OAAO;QAC1C,iDAAiD,EAAE,OAAO;QAC1D,uCAAuC,EAAE,OAAO;KACjD;CACF,CAAC","sourcesContent":["/**\n * DO NOT EDIT\n * This file is generated\n */\n\nexport = {\n parser: '@typescript-eslint/parser',\n parserOptions: {\n ecmaVersion: 2020,\n sourceType: 'module',\n project: './tsconfig.json',\n },\n plugins: ['@ngrx'],\n rules: {\n '@ngrx/avoid-cyclic-effects': 'error',\n '@ngrx/no-dispatch-in-effects': 'error',\n '@ngrx/no-effects-in-providers': 'error',\n '@ngrx/no-multiple-actions-in-effects': 'error',\n '@ngrx/prefer-action-creator-in-of-type': 'error',\n '@ngrx/prefer-concat-latest-from': 'error',\n '@ngrx/prefer-effect-callback-in-block-statement': 'error',\n '@ngrx/use-effects-lifecycle-interface': 'error',\n },\n};\n"]}
|
|
@@ -8,8 +8,6 @@ module.exports = {
|
|
|
8
8
|
plugins: ['@ngrx'],
|
|
9
9
|
rules: {
|
|
10
10
|
'@ngrx/no-dispatch-in-effects': 'error',
|
|
11
|
-
'@ngrx/no-effect-decorator-and-creator': 'error',
|
|
12
|
-
'@ngrx/no-effect-decorator': 'error',
|
|
13
11
|
'@ngrx/no-effects-in-providers': 'error',
|
|
14
12
|
'@ngrx/prefer-action-creator-in-of-type': 'error',
|
|
15
13
|
'@ngrx/prefer-concat-latest-from': 'error',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"effects-strict.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/effects-strict.ts"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,iBAAS;IACP,MAAM,EAAE,2BAA2B;IAEnC,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,KAAK,EAAE;QACL,8BAA8B,EAAE,OAAO;QACvC
|
|
1
|
+
{"version":3,"file":"effects-strict.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/effects-strict.ts"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,iBAAS;IACP,MAAM,EAAE,2BAA2B;IAEnC,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,KAAK,EAAE;QACL,8BAA8B,EAAE,OAAO;QACvC,+BAA+B,EAAE,OAAO;QACxC,wCAAwC,EAAE,OAAO;QACjD,iCAAiC,EAAE,OAAO;QAC1C,iDAAiD,EAAE,OAAO;QAC1D,uCAAuC,EAAE,OAAO;KACjD;CACF,CAAC","sourcesContent":["/**\n * DO NOT EDIT\n * This file is generated\n */\n\nexport = {\n parser: '@typescript-eslint/parser',\n\n plugins: ['@ngrx'],\n rules: {\n '@ngrx/no-dispatch-in-effects': 'error',\n '@ngrx/no-effects-in-providers': 'error',\n '@ngrx/prefer-action-creator-in-of-type': 'error',\n '@ngrx/prefer-concat-latest-from': 'error',\n '@ngrx/prefer-effect-callback-in-block-statement': 'error',\n '@ngrx/use-effects-lifecycle-interface': 'error',\n },\n};\n"]}
|
package/src/configs/effects.js
CHANGED
|
@@ -8,8 +8,6 @@ module.exports = {
|
|
|
8
8
|
plugins: ['@ngrx'],
|
|
9
9
|
rules: {
|
|
10
10
|
'@ngrx/no-dispatch-in-effects': 'warn',
|
|
11
|
-
'@ngrx/no-effect-decorator-and-creator': 'error',
|
|
12
|
-
'@ngrx/no-effect-decorator': 'warn',
|
|
13
11
|
'@ngrx/no-effects-in-providers': 'error',
|
|
14
12
|
'@ngrx/prefer-action-creator-in-of-type': 'warn',
|
|
15
13
|
'@ngrx/prefer-concat-latest-from': 'warn',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"effects.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/effects.ts"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,iBAAS;IACP,MAAM,EAAE,2BAA2B;IAEnC,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,KAAK,EAAE;QACL,8BAA8B,EAAE,MAAM;QACtC
|
|
1
|
+
{"version":3,"file":"effects.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/effects.ts"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,iBAAS;IACP,MAAM,EAAE,2BAA2B;IAEnC,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,KAAK,EAAE;QACL,8BAA8B,EAAE,MAAM;QACtC,+BAA+B,EAAE,OAAO;QACxC,wCAAwC,EAAE,MAAM;QAChD,iCAAiC,EAAE,MAAM;QACzC,iDAAiD,EAAE,MAAM;QACzD,uCAAuC,EAAE,MAAM;KAChD;CACF,CAAC","sourcesContent":["/**\n * DO NOT EDIT\n * This file is generated\n */\n\nexport = {\n parser: '@typescript-eslint/parser',\n\n plugins: ['@ngrx'],\n rules: {\n '@ngrx/no-dispatch-in-effects': 'warn',\n '@ngrx/no-effects-in-providers': 'error',\n '@ngrx/prefer-action-creator-in-of-type': 'warn',\n '@ngrx/prefer-concat-latest-from': 'warn',\n '@ngrx/prefer-effect-callback-in-block-statement': 'warn',\n '@ngrx/use-effects-lifecycle-interface': 'warn',\n },\n};\n"]}
|
|
@@ -15,8 +15,6 @@ module.exports = {
|
|
|
15
15
|
'@ngrx/updater-explicit-return-type': 'warn',
|
|
16
16
|
'@ngrx/avoid-cyclic-effects': 'warn',
|
|
17
17
|
'@ngrx/no-dispatch-in-effects': 'warn',
|
|
18
|
-
'@ngrx/no-effect-decorator-and-creator': 'error',
|
|
19
|
-
'@ngrx/no-effect-decorator': 'warn',
|
|
20
18
|
'@ngrx/no-effects-in-providers': 'error',
|
|
21
19
|
'@ngrx/no-multiple-actions-in-effects': 'warn',
|
|
22
20
|
'@ngrx/prefer-action-creator-in-of-type': 'warn',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recommended-requiring-type-checking.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/recommended-requiring-type-checking.ts"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,iBAAS;IACP,MAAM,EAAE,2BAA2B;IACnC,aAAa,EAAE;QACb,WAAW,EAAE,IAAI;QACjB,UAAU,EAAE,QAAQ;QACpB,OAAO,EAAE,iBAAiB;KAC3B;IACD,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,KAAK,EAAE;QACL,oCAAoC,EAAE,MAAM;QAC5C,4BAA4B,EAAE,MAAM;QACpC,8BAA8B,EAAE,MAAM;QACtC
|
|
1
|
+
{"version":3,"file":"recommended-requiring-type-checking.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/recommended-requiring-type-checking.ts"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,iBAAS;IACP,MAAM,EAAE,2BAA2B;IACnC,aAAa,EAAE;QACb,WAAW,EAAE,IAAI;QACjB,UAAU,EAAE,QAAQ;QACpB,OAAO,EAAE,iBAAiB;KAC3B;IACD,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,KAAK,EAAE;QACL,oCAAoC,EAAE,MAAM;QAC5C,4BAA4B,EAAE,MAAM;QACpC,8BAA8B,EAAE,MAAM;QACtC,+BAA+B,EAAE,OAAO;QACxC,sCAAsC,EAAE,MAAM;QAC9C,wCAAwC,EAAE,MAAM;QAChD,iCAAiC,EAAE,MAAM;QACzC,iDAAiD,EAAE,MAAM;QACzD,uCAAuC,EAAE,MAAM;QAC/C,iCAAiC,EAAE,MAAM;QACzC,uDAAuD,EAAE,MAAM;QAC/D,0CAA0C,EAAE,MAAM;QAClD,+BAA+B,EAAE,MAAM;QACvC,2BAA2B,EAAE,MAAM;QACnC,iCAAiC,EAAE,MAAM;QACzC,+BAA+B,EAAE,MAAM;QACvC,6BAA6B,EAAE,MAAM;QACrC,6BAA6B,EAAE,MAAM;QACrC,wCAAwC,EAAE,MAAM;QAChD,yCAAyC,EAAE,MAAM;QACjD,6BAA6B,EAAE,MAAM;QACrC,kCAAkC,EAAE,MAAM;QAC1C,yDAAyD,EAAE,MAAM;QACjE,iCAAiC,EAAE,MAAM;QACzC,oCAAoC,EAAE,MAAM;QAC5C,oBAAoB,EAAE,MAAM;QAC5B,wCAAwC,EAAE,MAAM;KACjD;CACF,CAAC","sourcesContent":["/**\n * DO NOT EDIT\n * This file is generated\n */\n\nexport = {\n parser: '@typescript-eslint/parser',\n parserOptions: {\n ecmaVersion: 2020,\n sourceType: 'module',\n project: './tsconfig.json',\n },\n plugins: ['@ngrx'],\n rules: {\n '@ngrx/updater-explicit-return-type': 'warn',\n '@ngrx/avoid-cyclic-effects': 'warn',\n '@ngrx/no-dispatch-in-effects': 'warn',\n '@ngrx/no-effects-in-providers': 'error',\n '@ngrx/no-multiple-actions-in-effects': 'warn',\n '@ngrx/prefer-action-creator-in-of-type': 'warn',\n '@ngrx/prefer-concat-latest-from': 'warn',\n '@ngrx/prefer-effect-callback-in-block-statement': 'warn',\n '@ngrx/use-effects-lifecycle-interface': 'warn',\n '@ngrx/avoid-combining-selectors': 'warn',\n '@ngrx/avoid-dispatching-multiple-actions-sequentially': 'warn',\n '@ngrx/avoid-duplicate-actions-in-reducer': 'warn',\n '@ngrx/avoid-mapping-selectors': 'warn',\n '@ngrx/good-action-hygiene': 'warn',\n '@ngrx/no-multiple-global-stores': 'warn',\n '@ngrx/no-reducer-in-key-names': 'warn',\n '@ngrx/no-store-subscription': 'warn',\n '@ngrx/no-typed-global-store': 'warn',\n '@ngrx/on-function-explicit-return-type': 'warn',\n '@ngrx/prefer-action-creator-in-dispatch': 'warn',\n '@ngrx/prefer-action-creator': 'warn',\n '@ngrx/prefer-inline-action-props': 'warn',\n '@ngrx/prefer-one-generic-in-create-for-feature-selector': 'warn',\n '@ngrx/prefer-selector-in-select': 'warn',\n '@ngrx/prefix-selectors-with-select': 'warn',\n '@ngrx/select-style': 'warn',\n '@ngrx/use-consistent-global-store-name': 'warn',\n },\n};\n"]}
|
|
@@ -9,8 +9,6 @@ module.exports = {
|
|
|
9
9
|
rules: {
|
|
10
10
|
'@ngrx/updater-explicit-return-type': 'warn',
|
|
11
11
|
'@ngrx/no-dispatch-in-effects': 'warn',
|
|
12
|
-
'@ngrx/no-effect-decorator-and-creator': 'error',
|
|
13
|
-
'@ngrx/no-effect-decorator': 'warn',
|
|
14
12
|
'@ngrx/no-effects-in-providers': 'error',
|
|
15
13
|
'@ngrx/prefer-action-creator-in-of-type': 'warn',
|
|
16
14
|
'@ngrx/prefer-concat-latest-from': 'warn',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recommended.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/recommended.ts"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,iBAAS;IACP,MAAM,EAAE,2BAA2B;IAEnC,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,KAAK,EAAE;QACL,oCAAoC,EAAE,MAAM;QAC5C,8BAA8B,EAAE,MAAM;QACtC
|
|
1
|
+
{"version":3,"file":"recommended.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/recommended.ts"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,iBAAS;IACP,MAAM,EAAE,2BAA2B;IAEnC,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,KAAK,EAAE;QACL,oCAAoC,EAAE,MAAM;QAC5C,8BAA8B,EAAE,MAAM;QACtC,+BAA+B,EAAE,OAAO;QACxC,wCAAwC,EAAE,MAAM;QAChD,iCAAiC,EAAE,MAAM;QACzC,iDAAiD,EAAE,MAAM;QACzD,uCAAuC,EAAE,MAAM;QAC/C,iCAAiC,EAAE,MAAM;QACzC,uDAAuD,EAAE,MAAM;QAC/D,0CAA0C,EAAE,MAAM;QAClD,+BAA+B,EAAE,MAAM;QACvC,2BAA2B,EAAE,MAAM;QACnC,iCAAiC,EAAE,MAAM;QACzC,+BAA+B,EAAE,MAAM;QACvC,6BAA6B,EAAE,MAAM;QACrC,6BAA6B,EAAE,MAAM;QACrC,wCAAwC,EAAE,MAAM;QAChD,yCAAyC,EAAE,MAAM;QACjD,6BAA6B,EAAE,MAAM;QACrC,kCAAkC,EAAE,MAAM;QAC1C,yDAAyD,EAAE,MAAM;QACjE,iCAAiC,EAAE,MAAM;QACzC,oCAAoC,EAAE,MAAM;QAC5C,oBAAoB,EAAE,MAAM;QAC5B,wCAAwC,EAAE,MAAM;KACjD;CACF,CAAC","sourcesContent":["/**\n * DO NOT EDIT\n * This file is generated\n */\n\nexport = {\n parser: '@typescript-eslint/parser',\n\n plugins: ['@ngrx'],\n rules: {\n '@ngrx/updater-explicit-return-type': 'warn',\n '@ngrx/no-dispatch-in-effects': 'warn',\n '@ngrx/no-effects-in-providers': 'error',\n '@ngrx/prefer-action-creator-in-of-type': 'warn',\n '@ngrx/prefer-concat-latest-from': 'warn',\n '@ngrx/prefer-effect-callback-in-block-statement': 'warn',\n '@ngrx/use-effects-lifecycle-interface': 'warn',\n '@ngrx/avoid-combining-selectors': 'warn',\n '@ngrx/avoid-dispatching-multiple-actions-sequentially': 'warn',\n '@ngrx/avoid-duplicate-actions-in-reducer': 'warn',\n '@ngrx/avoid-mapping-selectors': 'warn',\n '@ngrx/good-action-hygiene': 'warn',\n '@ngrx/no-multiple-global-stores': 'warn',\n '@ngrx/no-reducer-in-key-names': 'warn',\n '@ngrx/no-store-subscription': 'warn',\n '@ngrx/no-typed-global-store': 'warn',\n '@ngrx/on-function-explicit-return-type': 'warn',\n '@ngrx/prefer-action-creator-in-dispatch': 'warn',\n '@ngrx/prefer-action-creator': 'warn',\n '@ngrx/prefer-inline-action-props': 'warn',\n '@ngrx/prefer-one-generic-in-create-for-feature-selector': 'warn',\n '@ngrx/prefer-selector-in-select': 'warn',\n '@ngrx/prefix-selectors-with-select': 'warn',\n '@ngrx/select-style': 'warn',\n '@ngrx/use-consistent-global-store-name': 'warn',\n },\n};\n"]}
|
|
@@ -15,8 +15,6 @@ module.exports = {
|
|
|
15
15
|
'@ngrx/updater-explicit-return-type': 'error',
|
|
16
16
|
'@ngrx/avoid-cyclic-effects': 'error',
|
|
17
17
|
'@ngrx/no-dispatch-in-effects': 'error',
|
|
18
|
-
'@ngrx/no-effect-decorator-and-creator': 'error',
|
|
19
|
-
'@ngrx/no-effect-decorator': 'error',
|
|
20
18
|
'@ngrx/no-effects-in-providers': 'error',
|
|
21
19
|
'@ngrx/no-multiple-actions-in-effects': 'error',
|
|
22
20
|
'@ngrx/prefer-action-creator-in-of-type': 'error',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strict-requiring-type-checking.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/strict-requiring-type-checking.ts"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,iBAAS;IACP,MAAM,EAAE,2BAA2B;IACnC,aAAa,EAAE;QACb,WAAW,EAAE,IAAI;QACjB,UAAU,EAAE,QAAQ;QACpB,OAAO,EAAE,iBAAiB;KAC3B;IACD,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,KAAK,EAAE;QACL,oCAAoC,EAAE,OAAO;QAC7C,4BAA4B,EAAE,OAAO;QACrC,8BAA8B,EAAE,OAAO;QACvC
|
|
1
|
+
{"version":3,"file":"strict-requiring-type-checking.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/strict-requiring-type-checking.ts"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,iBAAS;IACP,MAAM,EAAE,2BAA2B;IACnC,aAAa,EAAE;QACb,WAAW,EAAE,IAAI;QACjB,UAAU,EAAE,QAAQ;QACpB,OAAO,EAAE,iBAAiB;KAC3B;IACD,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,KAAK,EAAE;QACL,oCAAoC,EAAE,OAAO;QAC7C,4BAA4B,EAAE,OAAO;QACrC,8BAA8B,EAAE,OAAO;QACvC,+BAA+B,EAAE,OAAO;QACxC,sCAAsC,EAAE,OAAO;QAC/C,wCAAwC,EAAE,OAAO;QACjD,iCAAiC,EAAE,OAAO;QAC1C,iDAAiD,EAAE,OAAO;QAC1D,uCAAuC,EAAE,OAAO;QAChD,iCAAiC,EAAE,OAAO;QAC1C,uDAAuD,EAAE,OAAO;QAChE,0CAA0C,EAAE,OAAO;QACnD,+BAA+B,EAAE,OAAO;QACxC,2BAA2B,EAAE,OAAO;QACpC,iCAAiC,EAAE,OAAO;QAC1C,+BAA+B,EAAE,OAAO;QACxC,6BAA6B,EAAE,OAAO;QACtC,6BAA6B,EAAE,OAAO;QACtC,wCAAwC,EAAE,OAAO;QACjD,yCAAyC,EAAE,OAAO;QAClD,6BAA6B,EAAE,OAAO;QACtC,kCAAkC,EAAE,OAAO;QAC3C,yDAAyD,EAAE,OAAO;QAClE,iCAAiC,EAAE,OAAO;QAC1C,oCAAoC,EAAE,OAAO;QAC7C,oBAAoB,EAAE,OAAO;QAC7B,wCAAwC,EAAE,OAAO;KAClD;CACF,CAAC","sourcesContent":["/**\n * DO NOT EDIT\n * This file is generated\n */\n\nexport = {\n parser: '@typescript-eslint/parser',\n parserOptions: {\n ecmaVersion: 2020,\n sourceType: 'module',\n project: './tsconfig.json',\n },\n plugins: ['@ngrx'],\n rules: {\n '@ngrx/updater-explicit-return-type': 'error',\n '@ngrx/avoid-cyclic-effects': 'error',\n '@ngrx/no-dispatch-in-effects': 'error',\n '@ngrx/no-effects-in-providers': 'error',\n '@ngrx/no-multiple-actions-in-effects': 'error',\n '@ngrx/prefer-action-creator-in-of-type': 'error',\n '@ngrx/prefer-concat-latest-from': 'error',\n '@ngrx/prefer-effect-callback-in-block-statement': 'error',\n '@ngrx/use-effects-lifecycle-interface': 'error',\n '@ngrx/avoid-combining-selectors': 'error',\n '@ngrx/avoid-dispatching-multiple-actions-sequentially': 'error',\n '@ngrx/avoid-duplicate-actions-in-reducer': 'error',\n '@ngrx/avoid-mapping-selectors': 'error',\n '@ngrx/good-action-hygiene': 'error',\n '@ngrx/no-multiple-global-stores': 'error',\n '@ngrx/no-reducer-in-key-names': 'error',\n '@ngrx/no-store-subscription': 'error',\n '@ngrx/no-typed-global-store': 'error',\n '@ngrx/on-function-explicit-return-type': 'error',\n '@ngrx/prefer-action-creator-in-dispatch': 'error',\n '@ngrx/prefer-action-creator': 'error',\n '@ngrx/prefer-inline-action-props': 'error',\n '@ngrx/prefer-one-generic-in-create-for-feature-selector': 'error',\n '@ngrx/prefer-selector-in-select': 'error',\n '@ngrx/prefix-selectors-with-select': 'error',\n '@ngrx/select-style': 'error',\n '@ngrx/use-consistent-global-store-name': 'error',\n },\n};\n"]}
|
package/src/configs/strict.js
CHANGED
|
@@ -9,8 +9,6 @@ module.exports = {
|
|
|
9
9
|
rules: {
|
|
10
10
|
'@ngrx/updater-explicit-return-type': 'error',
|
|
11
11
|
'@ngrx/no-dispatch-in-effects': 'error',
|
|
12
|
-
'@ngrx/no-effect-decorator-and-creator': 'error',
|
|
13
|
-
'@ngrx/no-effect-decorator': 'error',
|
|
14
12
|
'@ngrx/no-effects-in-providers': 'error',
|
|
15
13
|
'@ngrx/prefer-action-creator-in-of-type': 'error',
|
|
16
14
|
'@ngrx/prefer-concat-latest-from': 'error',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strict.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/strict.ts"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,iBAAS;IACP,MAAM,EAAE,2BAA2B;IAEnC,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,KAAK,EAAE;QACL,oCAAoC,EAAE,OAAO;QAC7C,8BAA8B,EAAE,OAAO;QACvC
|
|
1
|
+
{"version":3,"file":"strict.js","sourceRoot":"","sources":["../../../../../modules/eslint-plugin/src/configs/strict.ts"],"names":[],"mappings":";AAAA;;;GAGG;AAEH,iBAAS;IACP,MAAM,EAAE,2BAA2B;IAEnC,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,KAAK,EAAE;QACL,oCAAoC,EAAE,OAAO;QAC7C,8BAA8B,EAAE,OAAO;QACvC,+BAA+B,EAAE,OAAO;QACxC,wCAAwC,EAAE,OAAO;QACjD,iCAAiC,EAAE,OAAO;QAC1C,iDAAiD,EAAE,OAAO;QAC1D,uCAAuC,EAAE,OAAO;QAChD,iCAAiC,EAAE,OAAO;QAC1C,uDAAuD,EAAE,OAAO;QAChE,0CAA0C,EAAE,OAAO;QACnD,+BAA+B,EAAE,OAAO;QACxC,2BAA2B,EAAE,OAAO;QACpC,iCAAiC,EAAE,OAAO;QAC1C,+BAA+B,EAAE,OAAO;QACxC,6BAA6B,EAAE,OAAO;QACtC,6BAA6B,EAAE,OAAO;QACtC,wCAAwC,EAAE,OAAO;QACjD,yCAAyC,EAAE,OAAO;QAClD,6BAA6B,EAAE,OAAO;QACtC,kCAAkC,EAAE,OAAO;QAC3C,yDAAyD,EAAE,OAAO;QAClE,iCAAiC,EAAE,OAAO;QAC1C,oCAAoC,EAAE,OAAO;QAC7C,oBAAoB,EAAE,OAAO;QAC7B,wCAAwC,EAAE,OAAO;KAClD;CACF,CAAC","sourcesContent":["/**\n * DO NOT EDIT\n * This file is generated\n */\n\nexport = {\n parser: '@typescript-eslint/parser',\n\n plugins: ['@ngrx'],\n rules: {\n '@ngrx/updater-explicit-return-type': 'error',\n '@ngrx/no-dispatch-in-effects': 'error',\n '@ngrx/no-effects-in-providers': 'error',\n '@ngrx/prefer-action-creator-in-of-type': 'error',\n '@ngrx/prefer-concat-latest-from': 'error',\n '@ngrx/prefer-effect-callback-in-block-statement': 'error',\n '@ngrx/use-effects-lifecycle-interface': 'error',\n '@ngrx/avoid-combining-selectors': 'error',\n '@ngrx/avoid-dispatching-multiple-actions-sequentially': 'error',\n '@ngrx/avoid-duplicate-actions-in-reducer': 'error',\n '@ngrx/avoid-mapping-selectors': 'error',\n '@ngrx/good-action-hygiene': 'error',\n '@ngrx/no-multiple-global-stores': 'error',\n '@ngrx/no-reducer-in-key-names': 'error',\n '@ngrx/no-store-subscription': 'error',\n '@ngrx/no-typed-global-store': 'error',\n '@ngrx/on-function-explicit-return-type': 'error',\n '@ngrx/prefer-action-creator-in-dispatch': 'error',\n '@ngrx/prefer-action-creator': 'error',\n '@ngrx/prefer-inline-action-props': 'error',\n '@ngrx/prefer-one-generic-in-create-for-feature-selector': 'error',\n '@ngrx/prefer-selector-in-select': 'error',\n '@ngrx/prefix-selectors-with-select': 'error',\n '@ngrx/select-style': 'error',\n '@ngrx/use-consistent-global-store-name': 'error',\n },\n};\n"]}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var _a;
|
|
26
|
-
exports.__esModule = true;
|
|
27
|
-
exports.noEffectDecoratorAndCreatorSuggest = exports.noEffectDecoratorAndCreator = void 0;
|
|
28
|
-
var path = __importStar(require("path"));
|
|
29
|
-
var rule_creator_1 = require("../../rule-creator");
|
|
30
|
-
var utils_1 = require("../../utils");
|
|
31
|
-
exports.noEffectDecoratorAndCreator = 'noEffectDecoratorAndCreator';
|
|
32
|
-
exports.noEffectDecoratorAndCreatorSuggest = 'noEffectDecoratorAndCreatorSuggest';
|
|
33
|
-
exports["default"] = (0, rule_creator_1.createRule)({
|
|
34
|
-
name: path.parse(__filename).name,
|
|
35
|
-
meta: {
|
|
36
|
-
type: 'suggestion',
|
|
37
|
-
hasSuggestions: true,
|
|
38
|
-
ngrxModule: 'effects',
|
|
39
|
-
docs: {
|
|
40
|
-
description: '`Effect` should use either the `createEffect` or the `@Effect` decorator, but not both.',
|
|
41
|
-
recommended: 'error',
|
|
42
|
-
suggestion: true
|
|
43
|
-
},
|
|
44
|
-
fixable: 'code',
|
|
45
|
-
schema: [],
|
|
46
|
-
messages: (_a = {},
|
|
47
|
-
_a[exports.noEffectDecoratorAndCreator] = 'Using the `createEffect` and the `@Effect` decorator simultaneously is forbidden.',
|
|
48
|
-
_a[exports.noEffectDecoratorAndCreatorSuggest] = 'Remove the `@Effect` decorator.',
|
|
49
|
-
_a)
|
|
50
|
-
},
|
|
51
|
-
defaultOptions: [],
|
|
52
|
-
create: function (context) {
|
|
53
|
-
var _a;
|
|
54
|
-
var sourceCode = context.getSourceCode();
|
|
55
|
-
return _a = {},
|
|
56
|
-
_a["".concat(utils_1.effectCreator, ":has(").concat(utils_1.effectDecorator, ")")] = function (node) {
|
|
57
|
-
var decorator = (0, utils_1.getDecorator)(node, 'Effect');
|
|
58
|
-
if (!decorator) {
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
var hasDecoratorArgument = Boolean((0, utils_1.getDecoratorArguments)(decorator)[0]);
|
|
62
|
-
var fix = function (fixer) {
|
|
63
|
-
return getFixes(node, sourceCode, fixer, decorator);
|
|
64
|
-
};
|
|
65
|
-
if (hasDecoratorArgument) {
|
|
66
|
-
context.report({
|
|
67
|
-
node: node.key,
|
|
68
|
-
messageId: exports.noEffectDecoratorAndCreator,
|
|
69
|
-
// In this case where the argument to the `@Effect({...})`
|
|
70
|
-
// decorator exists, it is more appropriate to **suggest**
|
|
71
|
-
// instead of **fix**, since either simply removing or merging
|
|
72
|
-
// the arguments would likely generate unexpected behaviors and
|
|
73
|
-
// would be quite costly.
|
|
74
|
-
suggest: [
|
|
75
|
-
{
|
|
76
|
-
messageId: exports.noEffectDecoratorAndCreatorSuggest,
|
|
77
|
-
fix: fix
|
|
78
|
-
},
|
|
79
|
-
]
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
context.report({
|
|
84
|
-
node: node.key,
|
|
85
|
-
messageId: exports.noEffectDecoratorAndCreator,
|
|
86
|
-
fix: fix
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
_a;
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
function getFixes(node, sourceCode, fixer, decorator) {
|
|
94
|
-
var _a;
|
|
95
|
-
var importDeclarations = (_a = (0, utils_1.getImportDeclarations)(node, utils_1.NGRX_MODULE_PATHS.effects)) !== null && _a !== void 0 ? _a : [];
|
|
96
|
-
var text = sourceCode.getText();
|
|
97
|
-
var totalEffectDecoratorOccurrences = getEffectDecoratorOccurrences(text);
|
|
98
|
-
var importRemoveFix = totalEffectDecoratorOccurrences === 1
|
|
99
|
-
? (0, utils_1.getImportRemoveFix)(sourceCode, importDeclarations, 'Effect', fixer)
|
|
100
|
-
: [];
|
|
101
|
-
return [fixer.remove(decorator)].concat(importRemoveFix);
|
|
102
|
-
}
|
|
103
|
-
function getEffectDecoratorOccurrences(text) {
|
|
104
|
-
var _a, _b;
|
|
105
|
-
return (_b = (_a = text.replace(/\s/g, '').match(/@Effect/g)) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
|
|
106
|
-
}
|
|
107
|
-
//# sourceMappingURL=no-effect-decorator-and-creator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"no-effect-decorator-and-creator.js","sourceRoot":"","sources":["../../../../../../modules/eslint-plugin/src/rules/effects/no-effect-decorator-and-creator.ts"],"names":[],"mappings":"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","sourcesContent":["import type { TSESLint, TSESTree } from '@typescript-eslint/experimental-utils';\nimport * as path from 'path';\nimport { createRule } from '../../rule-creator';\nimport {\n effectCreator,\n effectDecorator,\n getDecorator,\n getDecoratorArguments,\n getImportDeclarations,\n getImportRemoveFix,\n NGRX_MODULE_PATHS,\n} from '../../utils';\n\nexport const noEffectDecoratorAndCreator = 'noEffectDecoratorAndCreator';\nexport const noEffectDecoratorAndCreatorSuggest =\n 'noEffectDecoratorAndCreatorSuggest';\n\ntype MessageIds =\n | typeof noEffectDecoratorAndCreator\n | typeof noEffectDecoratorAndCreatorSuggest;\ntype Options = readonly [];\n\nexport default createRule<Options, MessageIds>({\n name: path.parse(__filename).name,\n meta: {\n type: 'suggestion',\n hasSuggestions: true,\n ngrxModule: 'effects',\n docs: {\n description:\n '`Effect` should use either the `createEffect` or the `@Effect` decorator, but not both.',\n recommended: 'error',\n suggestion: true,\n },\n fixable: 'code',\n schema: [],\n messages: {\n [noEffectDecoratorAndCreator]:\n 'Using the `createEffect` and the `@Effect` decorator simultaneously is forbidden.',\n [noEffectDecoratorAndCreatorSuggest]: 'Remove the `@Effect` decorator.',\n },\n },\n defaultOptions: [],\n create: (context) => {\n const sourceCode = context.getSourceCode();\n\n return {\n [`${effectCreator}:has(${effectDecorator})`](\n node: TSESTree.PropertyDefinition\n ) {\n const decorator = getDecorator(node, 'Effect');\n\n if (!decorator) {\n return;\n }\n\n const hasDecoratorArgument = Boolean(\n getDecoratorArguments(decorator)[0]\n );\n const fix: TSESLint.ReportFixFunction = (fixer) =>\n getFixes(node, sourceCode, fixer, decorator);\n\n if (hasDecoratorArgument) {\n context.report({\n node: node.key,\n messageId: noEffectDecoratorAndCreator,\n // In this case where the argument to the `@Effect({...})`\n // decorator exists, it is more appropriate to **suggest**\n // instead of **fix**, since either simply removing or merging\n // the arguments would likely generate unexpected behaviors and\n // would be quite costly.\n suggest: [\n {\n messageId: noEffectDecoratorAndCreatorSuggest,\n fix,\n },\n ],\n });\n } else {\n context.report({\n node: node.key,\n messageId: noEffectDecoratorAndCreator,\n fix,\n });\n }\n },\n };\n },\n});\n\nfunction getFixes(\n node: TSESTree.PropertyDefinition,\n sourceCode: Readonly<TSESLint.SourceCode>,\n fixer: TSESLint.RuleFixer,\n decorator: TSESTree.Decorator\n): readonly TSESLint.RuleFix[] {\n const importDeclarations =\n getImportDeclarations(node, NGRX_MODULE_PATHS.effects) ?? [];\n const text = sourceCode.getText();\n const totalEffectDecoratorOccurrences = getEffectDecoratorOccurrences(text);\n const importRemoveFix =\n totalEffectDecoratorOccurrences === 1\n ? getImportRemoveFix(sourceCode, importDeclarations, 'Effect', fixer)\n : [];\n\n return [fixer.remove(decorator)].concat(importRemoveFix);\n}\n\nfunction getEffectDecoratorOccurrences(text: string) {\n return text.replace(/\\s/g, '').match(/@Effect/g)?.length ?? 0;\n}\n"]}
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
26
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
27
|
-
if (!m) return o;
|
|
28
|
-
var i = m.call(o), r, ar = [], e;
|
|
29
|
-
try {
|
|
30
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
31
|
-
}
|
|
32
|
-
catch (error) { e = { error: error }; }
|
|
33
|
-
finally {
|
|
34
|
-
try {
|
|
35
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
36
|
-
}
|
|
37
|
-
finally { if (e) throw e.error; }
|
|
38
|
-
}
|
|
39
|
-
return ar;
|
|
40
|
-
};
|
|
41
|
-
var _a;
|
|
42
|
-
exports.__esModule = true;
|
|
43
|
-
exports.noEffectDecoratorSuggest = exports.noEffectDecorator = void 0;
|
|
44
|
-
var path = __importStar(require("path"));
|
|
45
|
-
var rule_creator_1 = require("../../rule-creator");
|
|
46
|
-
var utils_1 = require("../../utils");
|
|
47
|
-
exports.noEffectDecorator = 'noEffectDecorator';
|
|
48
|
-
exports.noEffectDecoratorSuggest = 'noEffectDecoratorSuggest';
|
|
49
|
-
var createEffectKeyword = 'createEffect';
|
|
50
|
-
exports["default"] = (0, rule_creator_1.createRule)({
|
|
51
|
-
name: path.parse(__filename).name,
|
|
52
|
-
meta: {
|
|
53
|
-
type: 'suggestion',
|
|
54
|
-
hasSuggestions: true,
|
|
55
|
-
ngrxModule: 'effects',
|
|
56
|
-
docs: {
|
|
57
|
-
description: "The `".concat(createEffectKeyword, "` is preferred as the `@Effect` decorator is deprecated."),
|
|
58
|
-
recommended: 'warn',
|
|
59
|
-
suggestion: true
|
|
60
|
-
},
|
|
61
|
-
fixable: 'code',
|
|
62
|
-
schema: [],
|
|
63
|
-
messages: (_a = {},
|
|
64
|
-
_a[exports.noEffectDecorator] = "The `@Effect` decorator is deprecated. Use `".concat(createEffectKeyword, "` instead."),
|
|
65
|
-
_a[exports.noEffectDecoratorSuggest] = "Remove the `@Effect` decorator.",
|
|
66
|
-
_a)
|
|
67
|
-
},
|
|
68
|
-
defaultOptions: [],
|
|
69
|
-
create: function (context) {
|
|
70
|
-
var _a;
|
|
71
|
-
var sourceCode = context.getSourceCode();
|
|
72
|
-
return _a = {},
|
|
73
|
-
_a[utils_1.propertyDefinitionWithEffectDecorator] = function (node) {
|
|
74
|
-
var isUsingEffectCreator = (0, utils_1.isIdentifier)(node.parent.value.callee) &&
|
|
75
|
-
node.parent.value.callee.name === createEffectKeyword;
|
|
76
|
-
if (isUsingEffectCreator) {
|
|
77
|
-
context.report({
|
|
78
|
-
node: node,
|
|
79
|
-
messageId: exports.noEffectDecorator,
|
|
80
|
-
suggest: [
|
|
81
|
-
{
|
|
82
|
-
messageId: exports.noEffectDecoratorSuggest,
|
|
83
|
-
fix: function (fixer) { return fixer.remove(node); }
|
|
84
|
-
},
|
|
85
|
-
]
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
else {
|
|
89
|
-
context.report({
|
|
90
|
-
node: node,
|
|
91
|
-
messageId: exports.noEffectDecorator,
|
|
92
|
-
fix: function (fixer) { return getFixes(node, sourceCode, fixer); }
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
_a;
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
function getCreateEffectFix(fixer, propertyValueExpression) {
|
|
100
|
-
return fixer.insertTextBefore(propertyValueExpression, "".concat(createEffectKeyword, "(() => { return "));
|
|
101
|
-
}
|
|
102
|
-
function getCreateEffectConfigFix(fixer, propertyValueExpression, configText) {
|
|
103
|
-
var append = configText ? ", ".concat(configText) : '';
|
|
104
|
-
return fixer.insertTextAfter(propertyValueExpression, "}".concat(append, ")"));
|
|
105
|
-
}
|
|
106
|
-
function getFixes(node, sourceCode, fixer) {
|
|
107
|
-
var classDeclaration = node.parent.parent.parent;
|
|
108
|
-
var propertyValueExpression = node.parent.value;
|
|
109
|
-
var _a = __read((0, utils_1.getDecoratorArguments)(node), 1), decoratorArgument = _a[0];
|
|
110
|
-
var configText = decoratorArgument
|
|
111
|
-
? sourceCode.getText(decoratorArgument)
|
|
112
|
-
: undefined;
|
|
113
|
-
return [
|
|
114
|
-
fixer.remove(node),
|
|
115
|
-
getCreateEffectFix(fixer, propertyValueExpression),
|
|
116
|
-
getCreateEffectConfigFix(fixer, propertyValueExpression, configText),
|
|
117
|
-
].concat((0, utils_1.getImportAddFix)({
|
|
118
|
-
fixer: fixer,
|
|
119
|
-
importName: createEffectKeyword,
|
|
120
|
-
moduleName: utils_1.NGRX_MODULE_PATHS.effects,
|
|
121
|
-
node: classDeclaration
|
|
122
|
-
}));
|
|
123
|
-
}
|
|
124
|
-
//# sourceMappingURL=no-effect-decorator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"no-effect-decorator.js","sourceRoot":"","sources":["../../../../../../modules/eslint-plugin/src/rules/effects/no-effect-decorator.ts"],"names":[],"mappings":"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","sourcesContent":["import type { TSESLint, TSESTree } from '@typescript-eslint/experimental-utils';\nimport * as path from 'path';\nimport { createRule } from '../../rule-creator';\nimport {\n getDecoratorArguments,\n getImportAddFix,\n isIdentifier,\n NGRX_MODULE_PATHS,\n propertyDefinitionWithEffectDecorator,\n} from '../../utils';\n\nexport const noEffectDecorator = 'noEffectDecorator';\nexport const noEffectDecoratorSuggest = 'noEffectDecoratorSuggest';\n\ntype MessageIds = typeof noEffectDecorator | typeof noEffectDecoratorSuggest;\ntype Options = readonly [];\ntype EffectDecorator = TSESTree.Decorator & {\n parent: TSESTree.PropertyDefinition & {\n parent: TSESTree.ClassBody & { parent: TSESTree.ClassDeclaration };\n value: TSESTree.CallExpression;\n };\n};\n\nconst createEffectKeyword = 'createEffect';\n\nexport default createRule<Options, MessageIds>({\n name: path.parse(__filename).name,\n meta: {\n type: 'suggestion',\n hasSuggestions: true,\n ngrxModule: 'effects',\n docs: {\n description: `The \\`${createEffectKeyword}\\` is preferred as the \\`@Effect\\` decorator is deprecated.`,\n recommended: 'warn',\n suggestion: true,\n },\n fixable: 'code',\n schema: [],\n messages: {\n [noEffectDecorator]: `The \\`@Effect\\` decorator is deprecated. Use \\`${createEffectKeyword}\\` instead.`,\n [noEffectDecoratorSuggest]: `Remove the \\`@Effect\\` decorator.`,\n },\n },\n defaultOptions: [],\n create: (context) => {\n const sourceCode = context.getSourceCode();\n\n return {\n [propertyDefinitionWithEffectDecorator](node: EffectDecorator) {\n const isUsingEffectCreator =\n isIdentifier(node.parent.value.callee) &&\n node.parent.value.callee.name === createEffectKeyword;\n\n if (isUsingEffectCreator) {\n context.report({\n node,\n messageId: noEffectDecorator,\n suggest: [\n {\n messageId: noEffectDecoratorSuggest,\n fix: (fixer) => fixer.remove(node),\n },\n ],\n });\n } else {\n context.report({\n node,\n messageId: noEffectDecorator,\n fix: (fixer) => getFixes(node, sourceCode, fixer),\n });\n }\n },\n };\n },\n});\n\nfunction getCreateEffectFix(\n fixer: TSESLint.RuleFixer,\n propertyValueExpression: TSESTree.CallExpression\n): TSESLint.RuleFix {\n return fixer.insertTextBefore(\n propertyValueExpression,\n `${createEffectKeyword}(() => { return `\n );\n}\n\nfunction getCreateEffectConfigFix(\n fixer: TSESLint.RuleFixer,\n propertyValueExpression: TSESTree.CallExpression,\n configText?: string\n): TSESLint.RuleFix {\n const append = configText ? `, ${configText}` : '';\n return fixer.insertTextAfter(propertyValueExpression, `}${append})`);\n}\n\nfunction getFixes(\n node: EffectDecorator,\n sourceCode: Readonly<TSESLint.SourceCode>,\n fixer: TSESLint.RuleFixer\n): readonly TSESLint.RuleFix[] {\n const classDeclaration = node.parent.parent.parent;\n const {\n parent: { value: propertyValueExpression },\n } = node;\n\n const [decoratorArgument] = getDecoratorArguments(node);\n const configText = decoratorArgument\n ? sourceCode.getText(decoratorArgument)\n : undefined;\n\n return [\n fixer.remove(node),\n getCreateEffectFix(fixer, propertyValueExpression),\n getCreateEffectConfigFix(fixer, propertyValueExpression, configText),\n ].concat(\n getImportAddFix({\n fixer,\n importName: createEffectKeyword,\n moduleName: NGRX_MODULE_PATHS.effects,\n node: classDeclaration,\n })\n );\n}\n"]}
|