eslint-plugin-rxjs-x 0.2.1 → 0.2.2

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,6 +1,6 @@
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.2.1";
3
+ var version = "0.2.2";
4
4
 
5
5
  // src/configs/recommended.ts
6
6
  var createRecommendedConfig = (plugin2) => ({
@@ -187,7 +187,7 @@ var banOperatorsRule = ruleCreator({
187
187
 
188
188
 
189
189
  // src/etc/could-be-function.ts
190
- var _typescript = require('typescript'); var ts2 = _interopRequireWildcard(_typescript); var ts = _interopRequireWildcard(_typescript); var ts3 = _interopRequireWildcard(_typescript); var ts4 = _interopRequireWildcard(_typescript); var ts5 = _interopRequireWildcard(_typescript); var ts6 = _interopRequireWildcard(_typescript);
190
+ var _typescript = require('typescript'); var _typescript2 = _interopRequireDefault(_typescript);
191
191
 
192
192
  // src/etc/could-be-type.ts
193
193
  var _tsapiutils = require('ts-api-utils'); var tsutils = _interopRequireWildcard(_tsapiutils); var tsutils2 = _interopRequireWildcard(_tsapiutils); var tsutils3 = _interopRequireWildcard(_tsapiutils); var tsutils4 = _interopRequireWildcard(_tsapiutils);
@@ -226,11 +226,11 @@ function couldImplement(type, name2, qualified) {
226
226
  const { symbol } = type;
227
227
  if (symbol) {
228
228
  const { valueDeclaration } = symbol;
229
- if (valueDeclaration && ts.isClassDeclaration(valueDeclaration)) {
229
+ if (valueDeclaration && _typescript2.default.isClassDeclaration(valueDeclaration)) {
230
230
  const { heritageClauses } = valueDeclaration;
231
231
  if (heritageClauses) {
232
232
  const implemented = heritageClauses.some(
233
- ({ token, types }) => token === ts.SyntaxKind.ImplementsKeyword && types.some((node) => isMatchingNode(node, name2, qualified))
233
+ ({ token, types }) => token === _typescript2.default.SyntaxKind.ImplementsKeyword && types.some((node) => isMatchingNode(node, name2, qualified))
234
234
  );
235
235
  if (implemented) {
236
236
  return true;
@@ -259,7 +259,7 @@ function isMatchingNode(node, name2, qualified) {
259
259
 
260
260
  // src/etc/could-be-function.ts
261
261
  function couldBeFunction(type) {
262
- return type.getCallSignatures().length > 0 || couldBeType(type, "Function") || couldBeType(type, "ArrowFunction") || couldBeType(type, ts2.InternalSymbolName.Function);
262
+ return type.getCallSignatures().length > 0 || couldBeType(type, "Function") || couldBeType(type, "ArrowFunction") || couldBeType(type, _typescript2.default.InternalSymbolName.Function);
263
263
  }
264
264
 
265
265
  // src/etc/find-parent.ts
@@ -285,8 +285,8 @@ function findParent(node, ...args) {
285
285
 
286
286
  function getLoc(node) {
287
287
  const sourceFile = node.getSourceFile();
288
- const start = ts3.getLineAndCharacterOfPosition(sourceFile, node.getStart());
289
- const end = ts3.getLineAndCharacterOfPosition(sourceFile, node.getEnd());
288
+ const start = _typescript2.default.getLineAndCharacterOfPosition(sourceFile, node.getStart());
289
+ const end = _typescript2.default.getLineAndCharacterOfPosition(sourceFile, node.getEnd());
290
290
  return {
291
291
  start: {
292
292
  line: start.line + 1,
@@ -369,9 +369,9 @@ function getTypeServices(context) {
369
369
  var _a;
370
370
  let tsTypeNode;
371
371
  const tsNode = esTreeNodeToTSNodeMap.get(node);
372
- if (ts4.isArrowFunction(tsNode) || ts4.isFunctionDeclaration(tsNode) || ts4.isMethodDeclaration(tsNode) || ts4.isFunctionExpression(tsNode)) {
372
+ if (_typescript2.default.isArrowFunction(tsNode) || _typescript2.default.isFunctionDeclaration(tsNode) || _typescript2.default.isMethodDeclaration(tsNode) || _typescript2.default.isFunctionExpression(tsNode)) {
373
373
  tsTypeNode = (_a = tsNode.type) != null ? _a : tsNode.body;
374
- } else if (ts4.isCallSignatureDeclaration(tsNode) || ts4.isMethodSignature(tsNode)) {
374
+ } else if (_typescript2.default.isCallSignatureDeclaration(tsNode) || _typescript2.default.isMethodSignature(tsNode)) {
375
375
  tsTypeNode = tsNode.type;
376
376
  }
377
377
  return Boolean(
@@ -969,7 +969,7 @@ var noCyclicActionRule = ruleCreator({
969
969
  const operatorType = getType(operatorCallExpression);
970
970
  const [signature] = typeChecker.getSignaturesOfType(
971
971
  operatorType,
972
- ts5.SignatureKind.Call
972
+ _typescript2.default.SignatureKind.Call
973
973
  );
974
974
  if (!signature) {
975
975
  return;
@@ -2424,17 +2424,17 @@ var noUnsafeSubjectNext = ruleCreator({
2424
2424
  const type = getType(node.callee.object);
2425
2425
  if (tsutils3.isTypeReference(type) && couldBeType(type, "Subject")) {
2426
2426
  const [typeArg] = typeChecker.getTypeArguments(type);
2427
- if (tsutils3.isTypeFlagSet(typeArg, ts6.TypeFlags.Any)) {
2427
+ if (tsutils3.isTypeFlagSet(typeArg, _typescript2.default.TypeFlags.Any)) {
2428
2428
  return;
2429
2429
  }
2430
- if (tsutils3.isTypeFlagSet(typeArg, ts6.TypeFlags.Unknown)) {
2430
+ if (tsutils3.isTypeFlagSet(typeArg, _typescript2.default.TypeFlags.Unknown)) {
2431
2431
  return;
2432
2432
  }
2433
- if (tsutils3.isTypeFlagSet(typeArg, ts6.TypeFlags.Void)) {
2433
+ if (tsutils3.isTypeFlagSet(typeArg, _typescript2.default.TypeFlags.Void)) {
2434
2434
  return;
2435
2435
  }
2436
2436
  if (tsutils3.isUnionType(typeArg) && typeArg.types.some(
2437
- (t) => tsutils3.isTypeFlagSet(t, ts6.TypeFlags.Void)
2437
+ (t) => tsutils3.isTypeFlagSet(t, _typescript2.default.TypeFlags.Void)
2438
2438
  )) {
2439
2439
  return;
2440
2440
  }
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  // package.json
2
2
  var name = "eslint-plugin-rxjs-x";
3
- var version = "0.2.1";
3
+ var version = "0.2.2";
4
4
 
5
5
  // src/configs/recommended.ts
6
6
  var createRecommendedConfig = (plugin2) => ({
@@ -187,11 +187,11 @@ var banOperatorsRule = ruleCreator({
187
187
  import { AST_NODE_TYPES as AST_NODE_TYPES5, ESLintUtils as ESLintUtils3 } from "@typescript-eslint/utils";
188
188
 
189
189
  // src/etc/could-be-function.ts
190
- import * as ts2 from "typescript";
190
+ import ts2 from "typescript";
191
191
 
192
192
  // src/etc/could-be-type.ts
193
193
  import * as tsutils from "ts-api-utils";
194
- import * as ts from "typescript";
194
+ import ts from "typescript";
195
195
  function couldBeType(type, name2, qualified) {
196
196
  if (tsutils.isTypeReference(type)) {
197
197
  type = type.target;
@@ -282,7 +282,7 @@ function findParent(node, ...args) {
282
282
  }
283
283
 
284
284
  // src/etc/get-loc.ts
285
- import * as ts3 from "typescript";
285
+ import ts3 from "typescript";
286
286
  function getLoc(node) {
287
287
  const sourceFile = node.getSourceFile();
288
288
  const start = ts3.getLineAndCharacterOfPosition(sourceFile, node.getStart());
@@ -302,7 +302,7 @@ function getLoc(node) {
302
302
  // src/etc/get-type-services.ts
303
303
  import { ESLintUtils as ESLintUtils2 } from "@typescript-eslint/utils";
304
304
  import * as tsutils2 from "ts-api-utils";
305
- import * as ts4 from "typescript";
305
+ import ts4 from "typescript";
306
306
 
307
307
  // src/etc/is.ts
308
308
  import { AST_NODE_TYPES as AST_NODE_TYPES3 } from "@typescript-eslint/utils";
@@ -920,7 +920,7 @@ var noCreateRule = ruleCreator({
920
920
 
921
921
  // src/rules/no-cyclic-action.ts
922
922
  import { stripIndent as stripIndent3 } from "common-tags";
923
- import * as ts5 from "typescript";
923
+ import ts5 from "typescript";
924
924
 
925
925
  // src/constants.ts
926
926
  var defaultObservable = String.raw`[Aa]ction(s|s\$|\$)$`;
@@ -2400,7 +2400,7 @@ var noUnsafeFirstRule = ruleCreator({
2400
2400
 
2401
2401
  // src/rules/no-unsafe-subject-next.ts
2402
2402
  import * as tsutils3 from "ts-api-utils";
2403
- import * as ts6 from "typescript";
2403
+ import ts6 from "typescript";
2404
2404
  var noUnsafeSubjectNext = ruleCreator({
2405
2405
  defaultOptions: [],
2406
2406
  meta: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "eslint-plugin-rxjs-x",
3
3
  "type": "commonjs",
4
- "version": "0.2.1",
4
+ "version": "0.2.2",
5
5
  "packageManager": "yarn@4.5.1+sha512.341db9396b6e289fecc30cd7ab3af65060e05ebff4b3b47547b278b9e67b08f485ecd8c79006b405446262142c7a38154445ef7f17c1d5d1de7d90bf9ce7054d",
6
6
  "description": "ESLint v9+ plugin for RxJS",
7
7
  "author": "Jason Weinzierl <weinzierljason@gmail.com>",
@@ -63,7 +63,7 @@
63
63
  "peerDependencies": {
64
64
  "eslint": "^8.57.0 || ^9.0.0",
65
65
  "rxjs": ">=7.0.0",
66
- "typescript": ">=4.2.0"
66
+ "typescript": ">=4.7.4"
67
67
  },
68
68
  "devDependencies": {
69
69
  "@eslint/js": "^9.14.0",