@eslint-react/var 1.23.3-next.6 → 1.23.3-next.7

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
@@ -5,7 +5,6 @@ var ASTUtils = require('@typescript-eslint/utils/ast-utils');
5
5
  var types = require('@typescript-eslint/types');
6
6
  var AST3 = require('@eslint-react/ast');
7
7
  var scopeManager = require('@typescript-eslint/scope-manager');
8
- var tsPattern = require('ts-pattern');
9
8
 
10
9
  function _interopNamespace(e) {
11
10
  if (e && e.__esModule) return e;
@@ -120,7 +119,7 @@ function isInitializedFromSource(name, source, initialScope) {
120
119
  eff.O.exists((arg) => arg.value === source || arg.value.startsWith(`${source}/`))
121
120
  );
122
121
  }
123
- return tsPattern.isMatching({ type: "ImportDeclaration", source: { value: source } }, parent);
122
+ return parent?.type === types.AST_NODE_TYPES.ImportDeclaration && parent.source.value === source;
124
123
  }
125
124
  function getRequireExpressionArguments(node) {
126
125
  switch (true) {
package/dist/index.mjs CHANGED
@@ -3,7 +3,6 @@ import * as ASTUtils from '@typescript-eslint/utils/ast-utils';
3
3
  import { AST_NODE_TYPES } from '@typescript-eslint/types';
4
4
  import * as AST3 from '@eslint-react/ast';
5
5
  import { DefinitionType, ScopeType } from '@typescript-eslint/scope-manager';
6
- import { isMatching } from 'ts-pattern';
7
6
 
8
7
  // src/find-variable.ts
9
8
  var findVariable2 = F.dual(2, (nameOrNode, initialScope) => {
@@ -97,7 +96,7 @@ function isInitializedFromSource(name, source, initialScope) {
97
96
  O.exists((arg) => arg.value === source || arg.value.startsWith(`${source}/`))
98
97
  );
99
98
  }
100
- return isMatching({ type: "ImportDeclaration", source: { value: source } }, parent);
99
+ return parent?.type === AST_NODE_TYPES.ImportDeclaration && parent.source.value === source;
101
100
  }
102
101
  function getRequireExpressionArguments(node) {
103
102
  switch (true) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/var",
3
- "version": "1.23.3-next.6",
3
+ "version": "1.23.3-next.7",
4
4
  "description": "ESLint React's TSESTree AST utility module for static analysis of variables",
5
5
  "homepage": "https://github.com/rEl1cx/eslint-react",
6
6
  "bugs": {
@@ -38,9 +38,9 @@
38
38
  "@typescript-eslint/utils": "^8.19.1",
39
39
  "string-ts": "^2.2.0",
40
40
  "ts-pattern": "^5.6.0",
41
- "@eslint-react/ast": "1.23.3-next.6",
42
- "@eslint-react/eff": "1.23.3-next.6",
43
- "@eslint-react/types": "1.23.3-next.6"
41
+ "@eslint-react/ast": "1.23.3-next.7",
42
+ "@eslint-react/eff": "1.23.3-next.7",
43
+ "@eslint-react/types": "1.23.3-next.7"
44
44
  },
45
45
  "devDependencies": {
46
46
  "tsup": "^8.3.5",