@eslint-react/core
Advanced tools
+5
-6
| import * as ast from "@eslint-react/ast"; | ||
| import { constFalse, constTrue, dual, flip, getOrElseUpdate, identity, unit } from "@eslint-react/eff"; | ||
| import { findVariable } from "@eslint-react/var"; | ||
| import { AST_NODE_TYPES } from "@typescript-eslint/types"; | ||
| import { findVariable, getStaticValue } from "@typescript-eslint/utils/ast-utils"; | ||
| import { P, match } from "ts-pattern"; | ||
| import { IdGenerator, RE_ANNOTATION_JSX, RE_ANNOTATION_JSX_FRAG, RE_ANNOTATION_JSX_IMPORT_SOURCE, RE_ANNOTATION_JSX_RUNTIME, RE_COMPONENT_NAME, RE_COMPONENT_NAME_LOOSE } from "@eslint-react/shared"; | ||
| import { getStaticValue } from "@typescript-eslint/utils/ast-utils"; | ||
| import { AST_NODE_TYPES as AST_NODE_TYPES$1 } from "@typescript-eslint/utils"; | ||
@@ -37,3 +36,3 @@ | ||
| function findImportSource(name, initialScope) { | ||
| const latestDef = findVariable(name, initialScope)?.defs.at(-1); | ||
| const latestDef = findVariable(initialScope, name)?.defs.at(-1); | ||
| if (latestDef == null) return unit; | ||
@@ -416,3 +415,3 @@ const { node, parent } = latestDef; | ||
| case AST_NODE_TYPES.Identifier: { | ||
| const variable = findVariable(attr.argument.name, scope); | ||
| const variable = findVariable(scope, attr.argument.name); | ||
| function resolve(v) { | ||
@@ -660,3 +659,3 @@ if (v == null) return unit; | ||
| } | ||
| return isJsxLike(code, resolve(findVariable(name, code.getScope(node))), hint); | ||
| return isJsxLike(code, resolve(findVariable(code.getScope(node), name)), hint); | ||
| } | ||
@@ -1218,3 +1217,3 @@ } | ||
| function getRefInit(name, initialScope) { | ||
| for (const { node } of findVariable(initialScope)(name)?.defs ?? []) { | ||
| for (const { node } of findVariable(initialScope, name)?.defs ?? []) { | ||
| if (node.type !== AST_NODE_TYPES$1.VariableDeclarator) continue; | ||
@@ -1221,0 +1220,0 @@ const init = node.init; |
+5
-5
| { | ||
| "name": "@eslint-react/core", | ||
| "version": "3.0.0-beta.62", | ||
| "version": "3.0.0-beta.63", | ||
| "description": "ESLint React's ESLint utility module for static analysis of React core APIs and patterns.", | ||
@@ -37,6 +37,6 @@ "homepage": "https://github.com/Rel1cx/eslint-react", | ||
| "ts-pattern": "^5.9.0", | ||
| "@eslint-react/ast": "3.0.0-beta.62", | ||
| "@eslint-react/eff": "3.0.0-beta.62", | ||
| "@eslint-react/shared": "3.0.0-beta.62", | ||
| "@eslint-react/var": "3.0.0-beta.62" | ||
| "@eslint-react/ast": "3.0.0-beta.63", | ||
| "@eslint-react/shared": "3.0.0-beta.63", | ||
| "@eslint-react/var": "3.0.0-beta.63", | ||
| "@eslint-react/eff": "3.0.0-beta.63" | ||
| }, | ||
@@ -43,0 +43,0 @@ "devDependencies": { |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
91212
-0.04%2063
-0.05%+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed