eslint-plugin-rxjs-x 0.8.5 → 0.9.1

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/dist/index.js CHANGED
@@ -1,14 +1,21 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }// package.json
2
2
  var name = "eslint-plugin-rxjs-x";
3
- var version = "0.8.5";
3
+ var version = "0.9.1";
4
4
 
5
5
  // src/configs/recommended.ts
6
6
  var createRecommendedConfig = (plugin2) => ({
7
+ ...baseConfig,
7
8
  name: "rxjs-x/recommended",
8
9
  plugins: {
9
10
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion -- "A type annotation is necessary."
10
11
  "rxjs-x": plugin2
11
- },
12
+ }
13
+ });
14
+ var createLegacyRecommendedConfig = () => ({
15
+ ...baseConfig,
16
+ plugins: ["rxjs-x"]
17
+ });
18
+ var baseConfig = {
12
19
  rules: {
13
20
  "rxjs-x/no-async-subscribe": "error",
14
21
  "rxjs-x/no-create": "error",
@@ -31,7 +38,7 @@ var createRecommendedConfig = (plugin2) => ({
31
38
  "rxjs-x/prefer-root-operators": "error",
32
39
  "rxjs-x/throw-error": "error"
33
40
  }
34
- });
41
+ };
35
42
 
36
43
  // src/configs/strict.ts
37
44
  var createStrictConfig = (plugin2) => ({
@@ -104,7 +111,7 @@ function escapeRegExp(text) {
104
111
  var _typescript = require('typescript'); var _typescript2 = _interopRequireDefault(_typescript);
105
112
 
106
113
  // src/etc/could-be-type.ts
107
- var _tsapiutils = require('ts-api-utils'); var tsutils = _interopRequireWildcard(_tsapiutils); var tsutils2 = _interopRequireWildcard(_tsapiutils); var tsutils3 = _interopRequireWildcard(_tsapiutils); var tsutils4 = _interopRequireWildcard(_tsapiutils); var tsutils5 = _interopRequireWildcard(_tsapiutils);
114
+ var _tsapiutils = require('ts-api-utils'); var tsutils = _interopRequireWildcard(_tsapiutils); var tsutils2 = _interopRequireWildcard(_tsapiutils); var tsutils3 = _interopRequireWildcard(_tsapiutils); var tsutils4 = _interopRequireWildcard(_tsapiutils); var tsutils5 = _interopRequireWildcard(_tsapiutils); var tsutils6 = _interopRequireWildcard(_tsapiutils);
108
115
 
109
116
  function couldBeType(type, name2, qualified) {
110
117
  if (tsutils.isTypeReference(type)) {
@@ -291,17 +298,26 @@ function isPropertyDefinition(node) {
291
298
  function isSpreadElement(node) {
292
299
  return node.type === _utils.AST_NODE_TYPES.SpreadElement;
293
300
  }
301
+ function isTSAsExpression(node) {
302
+ return node.type === _utils.AST_NODE_TYPES.TSAsExpression;
303
+ }
304
+ function isTSSatisfiesExpression(node) {
305
+ return node.type === _utils.AST_NODE_TYPES.TSSatisfiesExpression;
306
+ }
294
307
  function isUnaryExpression(node) {
295
308
  return node.type === _utils.AST_NODE_TYPES.UnaryExpression;
296
309
  }
297
310
  function isUnionType(node) {
298
311
  return node.type === _utils.AST_NODE_TYPES.TSUnionType;
299
312
  }
313
+ function isVariableDeclarator(node) {
314
+ return node.type === _utils.AST_NODE_TYPES.VariableDeclarator;
315
+ }
300
316
 
301
317
  // src/etc/get-type-services.ts
302
318
  function getTypeServices(context) {
303
319
  const services = _utils.ESLintUtils.getParserServices(context);
304
- const { esTreeNodeToTSNodeMap, program, getTypeAtLocation } = services;
320
+ const { program, getTypeAtLocation } = services;
305
321
  const typeChecker = program.getTypeChecker();
306
322
  const couldBeType2 = (node, name2, qualified) => {
307
323
  const type = getTypeAtLocation(node);
@@ -312,30 +328,18 @@ function getTypeServices(context) {
312
328
  );
313
329
  };
314
330
  const couldReturnType = (node, name2, qualified) => {
315
- let tsTypeNode;
316
- const tsNode = esTreeNodeToTSNodeMap.get(node);
317
- if (_typescript2.default.isArrowFunction(tsNode) || _typescript2.default.isFunctionDeclaration(tsNode) || _typescript2.default.isMethodDeclaration(tsNode) || _typescript2.default.isFunctionExpression(tsNode)) {
318
- if (tsNode.type) {
319
- tsTypeNode = tsNode.type;
320
- } else if (tsNode.body && _typescript2.default.isBlock(tsNode.body)) {
321
- const returnStatement = tsNode.body.statements.find(_typescript2.default.isReturnStatement);
322
- if (returnStatement == null ? void 0 : returnStatement.expression) {
323
- tsTypeNode = returnStatement.expression;
324
- }
325
- } else {
326
- tsTypeNode = tsNode.body;
327
- }
328
- } else if (_typescript2.default.isCallSignatureDeclaration(tsNode) || _typescript2.default.isMethodSignature(tsNode)) {
329
- tsTypeNode = tsNode.type;
330
- } else if (_typescript2.default.isPropertySignature(tsNode)) {
331
- }
332
- return Boolean(
333
- tsTypeNode && couldBeType(
334
- typeChecker.getTypeAtLocation(tsTypeNode),
331
+ const type = getTypeAtLocation(node);
332
+ for (const signature of tsutils2.getCallSignaturesOfType(type)) {
333
+ const returnType = signature.getReturnType();
334
+ if (couldBeType(
335
+ returnType,
335
336
  name2,
336
337
  qualified ? { ...qualified, typeChecker } : void 0
337
- )
338
- );
338
+ )) {
339
+ return true;
340
+ }
341
+ }
342
+ return false;
339
343
  };
340
344
  return {
341
345
  couldBeBehaviorSubject: (node) => couldBeType2(node, "BehaviorSubject"),
@@ -588,6 +592,7 @@ var banOperatorsRule = ruleCreator({
588
592
  // src/rules/finnish.ts
589
593
 
590
594
  var defaultOptions3 = [];
595
+ var baseShouldBeFinnish = "Finnish notation should be used here.";
591
596
  var finnishRule = ruleCreator({
592
597
  defaultOptions: defaultOptions3,
593
598
  meta: {
@@ -596,7 +601,8 @@ var finnishRule = ruleCreator({
596
601
  requiresTypeChecking: true
597
602
  },
598
603
  messages: {
599
- shouldBeFinnish: "Finnish notation should be used here.",
604
+ shouldBeFinnish: baseShouldBeFinnish,
605
+ shouldBeFinnishProperty: `${baseShouldBeFinnish} Add a type annotation, assertion, or 'satisfies' to silence this rule.`,
600
606
  shouldNotBeFinnish: "Finnish notation should not be used here."
601
607
  },
602
608
  schema: [
@@ -606,7 +612,8 @@ var finnishRule = ruleCreator({
606
612
  methods: { type: "boolean", description: "Require for methods." },
607
613
  names: { type: "object", description: "Enforce for specific names. Keys are a RegExp, values are a boolean." },
608
614
  parameters: { type: "boolean", description: "Require for parameters." },
609
- properties: { type: "boolean", description: "Require for properties." },
615
+ properties: { type: "boolean", description: 'Require for properties, except object literal keys (see "objects" option).' },
616
+ objects: { type: "boolean", description: "Require for object literal keys." },
610
617
  strict: { type: "boolean", description: "Disallow Finnish notation for non-Observables." },
611
618
  types: { type: "object", description: "Enforce for specific types. Keys are a RegExp, values are a boolean." },
612
619
  variables: { type: "boolean", description: "Require for variables." }
@@ -632,6 +639,7 @@ var finnishRule = ruleCreator({
632
639
  methods: true,
633
640
  parameters: true,
634
641
  properties: true,
642
+ objects: true,
635
643
  variables: true,
636
644
  ...config
637
645
  };
@@ -661,7 +669,7 @@ var finnishRule = ruleCreator({
661
669
  validate: false
662
670
  });
663
671
  }
664
- function checkNode(nameNode, typeNode) {
672
+ function checkNode(nameNode, typeNode, shouldMessage = "shouldBeFinnish") {
665
673
  const tsNode = esTreeNodeToTSNodeMap.get(nameNode);
666
674
  const text = tsNode.getText();
667
675
  const hasFinnish = text.endsWith("$");
@@ -672,7 +680,7 @@ var finnishRule = ruleCreator({
672
680
  } : () => {
673
681
  context.report({
674
682
  loc: getLoc(tsNode),
675
- messageId: "shouldBeFinnish"
683
+ messageId: shouldMessage
676
684
  });
677
685
  };
678
686
  const shouldNotBeFinnish = hasFinnish ? () => {
@@ -682,21 +690,30 @@ var finnishRule = ruleCreator({
682
690
  });
683
691
  } : () => {
684
692
  };
685
- if (couldBeObservable(typeNode != null ? typeNode : nameNode) || couldReturnObservable(typeNode != null ? typeNode : nameNode)) {
686
- for (const name2 of names) {
687
- const { regExp, validate: validate2 } = name2;
688
- if (regExp.test(text) && !validate2) {
693
+ const nameWithoutDollar = text.endsWith("$") ? text.slice(0, -1) : text;
694
+ for (const name2 of names) {
695
+ const { regExp, validate: validate2 } = name2;
696
+ if (regExp.test(text) || regExp.test(nameWithoutDollar)) {
697
+ if (validate2) {
698
+ shouldBeFinnish();
699
+ } else {
689
700
  shouldNotBeFinnish();
690
- return;
691
701
  }
702
+ return;
692
703
  }
693
- for (const type of types) {
694
- const { regExp, validate: validate2 } = type;
695
- if ((couldBeType2(typeNode != null ? typeNode : nameNode, regExp) || couldReturnType(typeNode != null ? typeNode : nameNode, regExp)) && !validate2) {
704
+ }
705
+ for (const type of types) {
706
+ const { regExp, validate: validate2 } = type;
707
+ if (couldBeType2(typeNode != null ? typeNode : nameNode, regExp) || couldReturnType(typeNode != null ? typeNode : nameNode, regExp)) {
708
+ if (validate2) {
709
+ shouldBeFinnish();
710
+ } else {
696
711
  shouldNotBeFinnish();
697
- return;
698
712
  }
713
+ return;
699
714
  }
715
+ }
716
+ if (couldBeObservable(typeNode != null ? typeNode : nameNode) || couldReturnObservable(typeNode != null ? typeNode : nameNode)) {
700
717
  shouldBeFinnish();
701
718
  } else {
702
719
  shouldNotBeFinnish();
@@ -714,7 +731,7 @@ var finnishRule = ruleCreator({
714
731
  if (!found) {
715
732
  return;
716
733
  }
717
- if (!validate.variables && found.type === _utils.AST_NODE_TYPES.VariableDeclarator) {
734
+ if (!validate.variables && isVariableDeclarator(found)) {
718
735
  return;
719
736
  }
720
737
  if (!validate.parameters) {
@@ -775,12 +792,29 @@ var finnishRule = ruleCreator({
775
792
  }
776
793
  },
777
794
  "ObjectExpression > Property[computed=false] > Identifier": (node) => {
778
- if (validate.properties) {
779
- const parent = node.parent;
780
- if (node === parent.key && !isSourcesObjectAcceptingStaticObservableCreator(parent.parent.parent)) {
781
- checkNode(node);
795
+ if (!validate.objects) {
796
+ return;
797
+ }
798
+ const found = findParent(
799
+ node,
800
+ "CallExpression",
801
+ "VariableDeclarator",
802
+ "TSSatisfiesExpression",
803
+ "TSAsExpression"
804
+ );
805
+ if (found) {
806
+ if (isCallExpression(found)) {
807
+ return;
808
+ } else if (isVariableDeclarator(found) && !!found.id.typeAnnotation) {
809
+ return;
810
+ } else if (isTSAsExpression(found) || isTSSatisfiesExpression(found)) {
811
+ return;
782
812
  }
783
813
  }
814
+ const parent = node.parent;
815
+ if (node === parent.key) {
816
+ checkNode(node, void 0, "shouldBeFinnishProperty");
817
+ }
784
818
  },
785
819
  "ObjectPattern > Property > Identifier": (node) => {
786
820
  const found = findParent(
@@ -793,7 +827,7 @@ var finnishRule = ruleCreator({
793
827
  if (!found) {
794
828
  return;
795
829
  }
796
- if (!validate.variables && found.type === _utils.AST_NODE_TYPES.VariableDeclarator) {
830
+ if (!validate.variables && isVariableDeclarator(found)) {
797
831
  return;
798
832
  }
799
833
  if (!validate.parameters) {
@@ -1235,7 +1269,7 @@ var noExplicitGenericsRule = ruleCreator({
1235
1269
  }
1236
1270
  const { getTypeAtLocation } = _utils.ESLintUtils.getParserServices(context);
1237
1271
  const type = getTypeAtLocation(node);
1238
- return tsutils2.isUnionOrIntersectionType(type);
1272
+ return tsutils3.isUnionOrIntersectionType(type);
1239
1273
  }
1240
1274
  function checkBehaviorSubjects(node) {
1241
1275
  var _a;
@@ -1793,6 +1827,37 @@ var noIgnoredNotifierRule = ruleCreator({
1793
1827
  }
1794
1828
  });
1795
1829
 
1830
+ // src/rules/no-ignored-observable.ts
1831
+ var noIgnoredObservableRule = ruleCreator({
1832
+ defaultOptions: [],
1833
+ meta: {
1834
+ deprecated: true,
1835
+ docs: {
1836
+ description: "Disallow ignoring of observables returned by functions."
1837
+ },
1838
+ messages: {
1839
+ forbidden: "Ignoring a returned Observable is forbidden."
1840
+ },
1841
+ replacedBy: ["no-floating-observables"],
1842
+ schema: [],
1843
+ type: "problem"
1844
+ },
1845
+ name: "no-ignored-observable",
1846
+ create: (context) => {
1847
+ const { couldBeObservable } = getTypeServices(context);
1848
+ return {
1849
+ "ExpressionStatement > CallExpression": (node) => {
1850
+ if (couldBeObservable(node)) {
1851
+ context.report({
1852
+ messageId: "forbidden",
1853
+ node
1854
+ });
1855
+ }
1856
+ }
1857
+ };
1858
+ }
1859
+ });
1860
+
1796
1861
  // src/rules/no-ignored-replay-buffer.ts
1797
1862
  var noIgnoredReplayBufferRule = ruleCreator({
1798
1863
  defaultOptions: [],
@@ -2037,10 +2102,11 @@ var noImplicitAnyCatchRule = ruleCreator({
2037
2102
  fixable: "code",
2038
2103
  hasSuggestions: true,
2039
2104
  messages: {
2040
- explicitAny: "Explicit `any` in `catchError`.",
2041
- implicitAny: "Implicit `any` in `catchError`.",
2105
+ explicitAny: "Explicit `any` in error callback.",
2106
+ implicitAny: "Implicit `any` in error callback.",
2042
2107
  narrowed: "Error type must be `unknown` or `any`.",
2043
- suggestExplicitUnknown: "Use `unknown` instead, this will force you to explicitly and safely assert the type is correct."
2108
+ suggestExplicitUnknown: "Use `unknown` instead to explicitly and safely assert the type is correct.",
2109
+ suggestExplicitAny: "Use `any` instead to explicitly opt out of type safety."
2044
2110
  },
2045
2111
  schema: [
2046
2112
  {
@@ -2063,6 +2129,22 @@ var noImplicitAnyCatchRule = ruleCreator({
2063
2129
  const { allowExplicitAny = true } = config;
2064
2130
  const { couldBeObservable } = getTypeServices(context);
2065
2131
  const sourceCode = context.sourceCode;
2132
+ function createReplacerFix(typeAnnotation, replaceWith) {
2133
+ return function fix(fixer) {
2134
+ return fixer.replaceText(typeAnnotation, `: ${replaceWith}`);
2135
+ };
2136
+ }
2137
+ function createInserterFix(param, annotateWith, { hasRestParams = false } = {}) {
2138
+ return function fix(fixer) {
2139
+ if (hasRestParams || isParenthesised(sourceCode, param)) {
2140
+ return fixer.insertTextAfter(param, `: ${annotateWith}`);
2141
+ }
2142
+ return [
2143
+ fixer.insertTextBefore(param, "("),
2144
+ fixer.insertTextAfter(param, `: ${annotateWith})`)
2145
+ ];
2146
+ };
2147
+ }
2066
2148
  function checkCallback(callback) {
2067
2149
  if (isArrowFunctionExpression(callback) || isFunctionExpression(callback)) {
2068
2150
  const [param, ...restParams] = callback.params;
@@ -2075,61 +2157,51 @@ var noImplicitAnyCatchRule = ruleCreator({
2075
2157
  typeAnnotation: { type }
2076
2158
  } = typeAnnotation;
2077
2159
  if (type === _utils.AST_NODE_TYPES.TSAnyKeyword) {
2078
- let fix2 = function(fixer) {
2079
- return fixer.replaceText(typeAnnotation, ": unknown");
2080
- };
2081
- var fix = fix2;
2082
2160
  if (allowExplicitAny) {
2083
2161
  return;
2084
2162
  }
2085
2163
  context.report({
2086
- fix: fix2,
2087
2164
  messageId: "explicitAny",
2088
2165
  node: param,
2089
2166
  suggest: [
2090
2167
  {
2091
2168
  messageId: "suggestExplicitUnknown",
2092
- fix: fix2
2169
+ fix: createReplacerFix(typeAnnotation, "unknown")
2093
2170
  }
2094
2171
  ]
2095
2172
  });
2096
2173
  } else if (type !== _utils.AST_NODE_TYPES.TSUnknownKeyword) {
2097
- let fix2 = function(fixer) {
2098
- return fixer.replaceText(typeAnnotation, ": unknown");
2099
- };
2100
- var fix = fix2;
2101
2174
  context.report({
2102
2175
  messageId: "narrowed",
2103
2176
  node: param,
2104
2177
  suggest: [
2105
2178
  {
2106
2179
  messageId: "suggestExplicitUnknown",
2107
- fix: fix2
2108
- }
2109
- ]
2180
+ fix: createReplacerFix(typeAnnotation, "unknown")
2181
+ },
2182
+ allowExplicitAny ? {
2183
+ messageId: "suggestExplicitAny",
2184
+ fix: createReplacerFix(typeAnnotation, "any")
2185
+ } : null
2186
+ ].filter((x) => !!x)
2110
2187
  });
2111
2188
  }
2112
2189
  } else {
2113
- let fix2 = function(fixer) {
2114
- if (isParenthesised(sourceCode, param) || restParams.length > 0) {
2115
- return fixer.insertTextAfter(param, ": unknown");
2116
- }
2117
- return [
2118
- fixer.insertTextBefore(param, "("),
2119
- fixer.insertTextAfter(param, ": unknown)")
2120
- ];
2121
- };
2122
- var fix = fix2;
2190
+ const hasRestParams = restParams.length > 0;
2123
2191
  context.report({
2124
- fix: fix2,
2192
+ fix: allowExplicitAny ? createInserterFix(param, "any", { hasRestParams }) : void 0,
2125
2193
  messageId: "implicitAny",
2126
2194
  node: param,
2127
2195
  suggest: [
2128
2196
  {
2129
2197
  messageId: "suggestExplicitUnknown",
2130
- fix: fix2
2131
- }
2132
- ]
2198
+ fix: createInserterFix(param, "unknown", { hasRestParams })
2199
+ },
2200
+ allowExplicitAny ? {
2201
+ messageId: "suggestExplicitAny",
2202
+ fix: createInserterFix(param, "any", { hasRestParams })
2203
+ } : null
2204
+ ].filter((x) => !!x)
2133
2205
  });
2134
2206
  }
2135
2207
  }
@@ -2566,7 +2638,7 @@ function voidFunctionArguments(checker, tsNode) {
2566
2638
  }
2567
2639
  const voidReturnIndices = /* @__PURE__ */ new Set();
2568
2640
  const type = checker.getTypeAtLocation(tsNode.expression);
2569
- for (const subType of tsutils3.unionTypeParts(type)) {
2641
+ for (const subType of tsutils4.unionConstituents(type)) {
2570
2642
  const signatures = _typescript2.default.isCallExpression(tsNode) ? subType.getCallSignatures() : subType.getConstructSignatures();
2571
2643
  for (const signature of signatures) {
2572
2644
  for (const [index, parameter] of signature.parameters.entries()) {
@@ -2581,13 +2653,13 @@ function voidFunctionArguments(checker, tsNode) {
2581
2653
  }
2582
2654
  function isVoidReturningFunctionType(type) {
2583
2655
  let hasVoidReturn = false;
2584
- for (const subType of tsutils3.unionTypeParts(type)) {
2656
+ for (const subType of tsutils4.unionConstituents(type)) {
2585
2657
  for (const signature of subType.getCallSignatures()) {
2586
2658
  const returnType = signature.getReturnType();
2587
2659
  if (couldBeType(returnType, "Observable")) {
2588
2660
  return false;
2589
2661
  }
2590
- hasVoidReturn || (hasVoidReturn = tsutils3.isTypeFlagSet(returnType, _typescript2.default.TypeFlags.Void));
2662
+ hasVoidReturn || (hasVoidReturn = tsutils4.isTypeFlagSet(returnType, _typescript2.default.TypeFlags.Void));
2591
2663
  }
2592
2664
  }
2593
2665
  return hasVoidReturn;
@@ -2600,7 +2672,7 @@ function getMemberIfExists(type, memberName) {
2600
2672
  var _a, _b;
2601
2673
  const escapedMemberName = _typescript2.default.escapeLeadingUnderscores(memberName);
2602
2674
  const symbolMemberMatch = (_b = (_a = type.getSymbol()) == null ? void 0 : _a.members) == null ? void 0 : _b.get(escapedMemberName);
2603
- return symbolMemberMatch != null ? symbolMemberMatch : tsutils3.getPropertyOfType(type, escapedMemberName);
2675
+ return symbolMemberMatch != null ? symbolMemberMatch : tsutils4.getPropertyOfType(type, escapedMemberName);
2604
2676
  }
2605
2677
  function isStaticMember(node) {
2606
2678
  return (isMethodDefinition(node) || isPropertyDefinition(node) || isAccessorProperty(node)) && node.static;
@@ -2622,7 +2694,7 @@ function getPropertyContextualType(checker, tsNode) {
2622
2694
  if (objType == null) {
2623
2695
  return;
2624
2696
  }
2625
- const propertySymbol = checker.getPropertyOfType(objType, tsNode.name.text);
2697
+ const propertySymbol = tsutils4.unionConstituents(objType).map((t) => checker.getPropertyOfType(t, tsNode.name.getText())).find((p) => p);
2626
2698
  if (propertySymbol == null) {
2627
2699
  return;
2628
2700
  }
@@ -3085,8 +3157,6 @@ var noSubscribeInPipeRule = ruleCreator({
3085
3157
  recommended: "recommended",
3086
3158
  requiresTypeChecking: true
3087
3159
  },
3088
- fixable: void 0,
3089
- hasSuggestions: false,
3090
3160
  messages: {
3091
3161
  forbidden: "Subscribe calls within pipe operators are forbidden."
3092
3162
  },
@@ -3578,19 +3648,19 @@ var noUnsafeSubjectNext = ruleCreator({
3578
3648
  [`CallExpression[callee.property.name='next']`]: (node) => {
3579
3649
  if (node.arguments.length === 0 && isMemberExpression(node.callee)) {
3580
3650
  const type = getTypeAtLocation(node.callee.object);
3581
- if (tsutils4.isTypeReference(type) && couldBeType(type, "Subject")) {
3651
+ if (tsutils5.isTypeReference(type) && couldBeType(type, "Subject")) {
3582
3652
  const [typeArg] = typeChecker.getTypeArguments(type);
3583
- if (tsutils4.isTypeFlagSet(typeArg, _typescript2.default.TypeFlags.Any)) {
3653
+ if (tsutils5.isTypeFlagSet(typeArg, _typescript2.default.TypeFlags.Any)) {
3584
3654
  return;
3585
3655
  }
3586
- if (tsutils4.isTypeFlagSet(typeArg, _typescript2.default.TypeFlags.Unknown)) {
3656
+ if (tsutils5.isTypeFlagSet(typeArg, _typescript2.default.TypeFlags.Unknown)) {
3587
3657
  return;
3588
3658
  }
3589
- if (tsutils4.isTypeFlagSet(typeArg, _typescript2.default.TypeFlags.Void)) {
3659
+ if (tsutils5.isTypeFlagSet(typeArg, _typescript2.default.TypeFlags.Void)) {
3590
3660
  return;
3591
3661
  }
3592
- if (tsutils4.isUnionType(typeArg) && typeArg.types.some(
3593
- (t) => tsutils4.isTypeFlagSet(t, _typescript2.default.TypeFlags.Void)
3662
+ if (tsutils5.isUnionType(typeArg) && typeArg.types.some(
3663
+ (t) => tsutils5.isTypeFlagSet(t, _typescript2.default.TypeFlags.Void)
3594
3664
  )) {
3595
3665
  return;
3596
3666
  }
@@ -4277,10 +4347,10 @@ var throwErrorRule = ruleCreator({
4277
4347
  const body = tsNode.body;
4278
4348
  type = program.getTypeChecker().getTypeAtLocation(annotation != null ? annotation : body);
4279
4349
  }
4280
- if (allowThrowingAny && tsutils5.isIntrinsicAnyType(type)) {
4350
+ if (allowThrowingAny && tsutils6.isIntrinsicAnyType(type)) {
4281
4351
  return;
4282
4352
  }
4283
- if (allowThrowingUnknown && tsutils5.isIntrinsicUnknownType(type)) {
4353
+ if (allowThrowingUnknown && tsutils6.isIntrinsicUnknownType(type)) {
4284
4354
  return;
4285
4355
  }
4286
4356
  if (couldBeType(type, /^Error$/)) {
@@ -4334,6 +4404,7 @@ var allRules = {
4334
4404
  "no-ignored-default-value": noIgnoredDefaultValueRule,
4335
4405
  "no-ignored-error": noIgnoredErrorRule,
4336
4406
  "no-ignored-notifier": noIgnoredNotifierRule,
4407
+ "no-ignored-observable": noIgnoredObservableRule,
4337
4408
  "no-ignored-replay-buffer": noIgnoredReplayBufferRule,
4338
4409
  "no-ignored-subscribe": noIgnoredSubscribeRule,
4339
4410
  "no-ignored-subscription": noIgnoredSubscriptionRule,
@@ -4377,8 +4448,9 @@ var plugin = {
4377
4448
  var rxjsX = {
4378
4449
  ...plugin,
4379
4450
  configs: {
4380
- recommended: createRecommendedConfig(plugin),
4381
- strict: createStrictConfig(plugin)
4451
+ "recommended": createRecommendedConfig(plugin),
4452
+ "strict": createStrictConfig(plugin),
4453
+ "recommended-legacy": createLegacyRecommendedConfig()
4382
4454
  }
4383
4455
  };
4384
4456
  var index_default = rxjsX;