@eslint-react/shared
Advanced tools
Comparing version
'use strict'; | ||
var utils = require('@typescript-eslint/utils'); | ||
var module$1 = require('module'); | ||
@@ -19,36 +18,4 @@ var eff = require('@eslint-react/eff'); | ||
var WEBSITE_URL = "https://eslint-react.xyz"; | ||
var RE_PASCAL_CASE = /^[A-Z][\dA-Za-z]*$/u; | ||
var RE_CAMEL_CASE = /^[a-z][\dA-Za-z]*$/u; | ||
var RE_KEBAB_CASE = /^[a-z][\d\-a-z]*$/u; | ||
var RE_SNAKE_CASE = /^[a-z][\d_a-z]*$/u; | ||
var RE_CONSTANT_CASE = /^[A-Z][\d_A-Z]*$/u; | ||
var RE_JAVASCRIPT_PROTOCOL = /^[\u0000-\u001F ]*j[\t\n\r]*a[\t\n\r]*v[\t\n\r]*a[\t\n\r]*s[\t\n\r]*c[\t\n\r]*r[\t\n\r]*i[\t\n\r]*p[\t\n\r]*t[\t\n\r]*:/iu; | ||
var REACT_BUILD_IN_HOOKS = [ | ||
"use", | ||
"useActionState", | ||
"useCallback", | ||
"useContext", | ||
"useDebugValue", | ||
"useDeferredValue", | ||
"useEffect", | ||
"useFormStatus", | ||
"useId", | ||
"useImperativeHandle", | ||
"useInsertionEffect", | ||
"useLayoutEffect", | ||
"useMemo", | ||
"useOptimistic", | ||
"useReducer", | ||
"useRef", | ||
"useState", | ||
"useSyncExternalStore", | ||
"useTransition" | ||
]; | ||
// src/create-report.ts | ||
function createReport(context) { | ||
return (descriptor) => { | ||
if (descriptor != null) context.report(descriptor); | ||
}; | ||
} | ||
// src/get-doc-url.ts | ||
var getDocsUrl = (pluginName) => (ruleName) => { | ||
@@ -60,18 +27,3 @@ if (pluginName === "x") { | ||
}; | ||
var createRuleForPlugin = (pluginName) => utils.ESLintUtils.RuleCreator(getDocsUrl(pluginName)); | ||
// src/env.ts | ||
function isInEditorEnv() { | ||
if (process.env["CI"]) { | ||
return false; | ||
} | ||
if (isInGitHooksOrLintStaged()) { | ||
return false; | ||
} | ||
return !!(process.env["VSCODE_PID"] || process.env["VSCODE_CWD"] || process.env["JETBRAINS_IDE"] || process.env["VIM"] || process.env["NVIM"]); | ||
} | ||
function isInGitHooksOrLintStaged() { | ||
return !!(process.env["GIT_PARAMS"] || process.env["VSCODE_GIT_COMMAND"] || process.env["npm_lifecycle_script"]?.startsWith("lint-staged")); | ||
} | ||
// src/get-id.ts | ||
@@ -1331,20 +1283,10 @@ var id = 0n; | ||
exports.NPM_SCOPE = NPM_SCOPE; | ||
exports.REACT_BUILD_IN_HOOKS = REACT_BUILD_IN_HOOKS; | ||
exports.RE_CAMEL_CASE = RE_CAMEL_CASE; | ||
exports.RE_CONSTANT_CASE = RE_CONSTANT_CASE; | ||
exports.RE_JAVASCRIPT_PROTOCOL = RE_JAVASCRIPT_PROTOCOL; | ||
exports.RE_KEBAB_CASE = RE_KEBAB_CASE; | ||
exports.RE_PASCAL_CASE = RE_PASCAL_CASE; | ||
exports.RE_SNAKE_CASE = RE_SNAKE_CASE; | ||
exports.WEBSITE_URL = WEBSITE_URL; | ||
exports.createReport = createReport; | ||
exports.createRuleForPlugin = createRuleForPlugin; | ||
exports.decodeSettings = decodeSettings; | ||
exports.defineSettings = defineSettings; | ||
exports.getDocsUrl = getDocsUrl; | ||
exports.getId = getId; | ||
exports.getReactVersion = getReactVersion; | ||
exports.getSettingsFromContext = getSettingsFromContext; | ||
exports.isInEditorEnv = isInEditorEnv; | ||
exports.isInGitHooksOrLintStaged = isInGitHooksOrLintStaged; | ||
exports.toNormalizedSettings = toNormalizedSettings; | ||
exports.unsafeDecodeSettings = unsafeDecodeSettings; |
{ | ||
"name": "@eslint-react/shared", | ||
"version": "1.37.4-next.0", | ||
"version": "1.38.0-beta.3", | ||
"description": "ESLint React's Shared constants and functions.", | ||
@@ -41,5 +41,7 @@ "homepage": "https://github.com/Rel1cx/eslint-react", | ||
"ts-pattern": "^5.6.2", | ||
"@eslint-react/eff": "1.37.4-next.0" | ||
"@eslint-react/eff": "1.38.0-beta.3", | ||
"@eslint-react/kit": "1.38.0-beta.3" | ||
}, | ||
"devDependencies": { | ||
"@tsconfig/node22": "^22.0.0", | ||
"@types/picomatch": "^3.0.2", | ||
@@ -46,0 +48,0 @@ "fast-equals": "^5.2.2", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 9 instances in 1 package
2
-90%244811
-3.71%5
25%8
14.29%4771
-3.56%+ Added
+ Added
- Removed