eslint-plugin-react-hooks-extra 1.5.19-next.0 → 1.5.19

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
@@ -13,7 +13,7 @@ var __export = (target, all2) => {
13
13
 
14
14
  // package.json
15
15
  var name = "eslint-plugin-react-hooks-extra";
16
- var version = "1.5.19-next.0";
16
+ var version = "1.5.19";
17
17
  var createRule = shared.createRuleForPlugin("hooks-extra");
18
18
 
19
19
  // src/rules/ensure-custom-hooks-using-other-hooks.ts
@@ -1161,43 +1161,6 @@ var z = class _z {
1161
1161
  }
1162
1162
  };
1163
1163
 
1164
- // ../../../node_modules/.pnpm/valibot@0.35.0/node_modules/valibot/dist/index.js
1165
- var store;
1166
- function getGlobalConfig(config2) {
1167
- return {
1168
- lang: config2?.lang ?? store?.lang,
1169
- message: config2?.message,
1170
- abortEarly: config2?.abortEarly ?? store?.abortEarly,
1171
- abortPipeEarly: config2?.abortPipeEarly ?? store?.abortPipeEarly
1172
- };
1173
- }
1174
- var ValiError = class extends Error {
1175
- /**
1176
- * The error issues.
1177
- */
1178
- issues;
1179
- /**
1180
- * Creates a Valibot error with useful information.
1181
- *
1182
- * @param issues The error issues.
1183
- */
1184
- constructor(issues) {
1185
- super(issues[0].message);
1186
- this.name = "ValiError";
1187
- this.issues = issues;
1188
- }
1189
- };
1190
- function parse(schema, input, config2) {
1191
- const dataset = schema._run(
1192
- { typed: false, value: input },
1193
- getGlobalConfig(config2)
1194
- );
1195
- if (dataset.issues) {
1196
- throw new ValiError(dataset.issues);
1197
- }
1198
- return dataset.value;
1199
- }
1200
-
1201
1164
  // src/rules/ensure-use-callback-has-non-empty-deps.ts
1202
1165
  var RULE_NAME2 = "ensure-use-callback-has-non-empty-deps";
1203
1166
  var ensure_use_callback_has_non_empty_deps_default = createRule({
@@ -1214,7 +1177,7 @@ var ensure_use_callback_has_non_empty_deps_default = createRule({
1214
1177
  },
1215
1178
  name: RULE_NAME2,
1216
1179
  create(context) {
1217
- const alias = parse(shared.ESLintSettingsSchema, context.settings).reactOptions?.additionalHooks?.useCallback ?? [];
1180
+ const alias = shared.getESLintReactSettings(context.settings).additionalHooks?.useCallback ?? [];
1218
1181
  return {
1219
1182
  CallExpression(node) {
1220
1183
  const initialScope = context.sourceCode.getScope(node);
@@ -1265,7 +1228,7 @@ var ensure_use_memo_has_non_empty_deps_default = createRule({
1265
1228
  },
1266
1229
  name: RULE_NAME3,
1267
1230
  create(context) {
1268
- const alias = parse(shared.ESLintSettingsSchema, context.settings).reactOptions?.additionalHooks?.useMemo ?? [];
1231
+ const alias = shared.getESLintReactSettings(context.settings).additionalHooks?.useMemo ?? [];
1269
1232
  return {
1270
1233
  CallExpression(node) {
1271
1234
  const initialScope = context.sourceCode.getScope(node);
@@ -1315,7 +1278,7 @@ var prefer_use_state_lazy_initialization_default = createRule({
1315
1278
  },
1316
1279
  name: RULE_NAME4,
1317
1280
  create(context) {
1318
- const alias = parse(shared.ESLintSettingsSchema, context.settings).reactOptions?.additionalHooks?.useState ?? [];
1281
+ const alias = shared.getESLintReactSettings(context.settings).additionalHooks?.useState ?? [];
1319
1282
  return {
1320
1283
  CallExpression(node) {
1321
1284
  if (!core.isReactHookCall(node)) return;
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { useHookCollector, isReactHookCall, isUseCallbackCall, isReactHookCallWithNameLoose, isUseMemoCall, isUseStateCall } from '@eslint-react/core';
2
- import { createRuleForPlugin, ESLintSettingsSchema } from '@eslint-react/shared';
2
+ import { createRuleForPlugin, getESLintReactSettings } from '@eslint-react/shared';
3
3
  import { NodeType, is, getNestedCallExpressions } from '@eslint-react/ast';
4
4
  import { findVariable, getVariableInit } from '@eslint-react/var';
5
5
 
@@ -11,7 +11,7 @@ var __export = (target, all2) => {
11
11
 
12
12
  // package.json
13
13
  var name = "eslint-plugin-react-hooks-extra";
14
- var version = "1.5.19-next.0";
14
+ var version = "1.5.19";
15
15
  var createRule = createRuleForPlugin("hooks-extra");
16
16
 
17
17
  // src/rules/ensure-custom-hooks-using-other-hooks.ts
@@ -1159,43 +1159,6 @@ var z = class _z {
1159
1159
  }
1160
1160
  };
1161
1161
 
1162
- // ../../../node_modules/.pnpm/valibot@0.35.0/node_modules/valibot/dist/index.js
1163
- var store;
1164
- function getGlobalConfig(config2) {
1165
- return {
1166
- lang: config2?.lang ?? store?.lang,
1167
- message: config2?.message,
1168
- abortEarly: config2?.abortEarly ?? store?.abortEarly,
1169
- abortPipeEarly: config2?.abortPipeEarly ?? store?.abortPipeEarly
1170
- };
1171
- }
1172
- var ValiError = class extends Error {
1173
- /**
1174
- * The error issues.
1175
- */
1176
- issues;
1177
- /**
1178
- * Creates a Valibot error with useful information.
1179
- *
1180
- * @param issues The error issues.
1181
- */
1182
- constructor(issues) {
1183
- super(issues[0].message);
1184
- this.name = "ValiError";
1185
- this.issues = issues;
1186
- }
1187
- };
1188
- function parse(schema, input, config2) {
1189
- const dataset = schema._run(
1190
- { typed: false, value: input },
1191
- getGlobalConfig(config2)
1192
- );
1193
- if (dataset.issues) {
1194
- throw new ValiError(dataset.issues);
1195
- }
1196
- return dataset.value;
1197
- }
1198
-
1199
1162
  // src/rules/ensure-use-callback-has-non-empty-deps.ts
1200
1163
  var RULE_NAME2 = "ensure-use-callback-has-non-empty-deps";
1201
1164
  var ensure_use_callback_has_non_empty_deps_default = createRule({
@@ -1212,7 +1175,7 @@ var ensure_use_callback_has_non_empty_deps_default = createRule({
1212
1175
  },
1213
1176
  name: RULE_NAME2,
1214
1177
  create(context) {
1215
- const alias = parse(ESLintSettingsSchema, context.settings).reactOptions?.additionalHooks?.useCallback ?? [];
1178
+ const alias = getESLintReactSettings(context.settings).additionalHooks?.useCallback ?? [];
1216
1179
  return {
1217
1180
  CallExpression(node) {
1218
1181
  const initialScope = context.sourceCode.getScope(node);
@@ -1263,7 +1226,7 @@ var ensure_use_memo_has_non_empty_deps_default = createRule({
1263
1226
  },
1264
1227
  name: RULE_NAME3,
1265
1228
  create(context) {
1266
- const alias = parse(ESLintSettingsSchema, context.settings).reactOptions?.additionalHooks?.useMemo ?? [];
1229
+ const alias = getESLintReactSettings(context.settings).additionalHooks?.useMemo ?? [];
1267
1230
  return {
1268
1231
  CallExpression(node) {
1269
1232
  const initialScope = context.sourceCode.getScope(node);
@@ -1313,7 +1276,7 @@ var prefer_use_state_lazy_initialization_default = createRule({
1313
1276
  },
1314
1277
  name: RULE_NAME4,
1315
1278
  create(context) {
1316
- const alias = parse(ESLintSettingsSchema, context.settings).reactOptions?.additionalHooks?.useState ?? [];
1279
+ const alias = getESLintReactSettings(context.settings).additionalHooks?.useState ?? [];
1317
1280
  return {
1318
1281
  CallExpression(node) {
1319
1282
  if (!isReactHookCall(node)) return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-hooks-extra",
3
- "version": "1.5.19-next.0",
3
+ "version": "1.5.19",
4
4
  "description": "ESLint React's ESLint plugin for React Hooks related rules.",
5
5
  "homepage": "https://github.com/rel1cx/eslint-react",
6
6
  "bugs": {
@@ -39,13 +39,13 @@
39
39
  "@typescript-eslint/type-utils": "^7.14.1",
40
40
  "@typescript-eslint/types": "^7.14.1",
41
41
  "@typescript-eslint/utils": "^7.14.1",
42
- "@eslint-react/ast": "1.5.19-next.0",
43
- "@eslint-react/core": "1.5.19-next.0",
44
- "@eslint-react/tools": "1.5.19-next.0",
45
- "@eslint-react/jsx": "1.5.19-next.0",
46
- "@eslint-react/shared": "1.5.19-next.0",
47
- "@eslint-react/types": "1.5.19-next.0",
48
- "@eslint-react/var": "1.5.19-next.0"
42
+ "@eslint-react/ast": "1.5.19",
43
+ "@eslint-react/core": "1.5.19",
44
+ "@eslint-react/jsx": "1.5.19",
45
+ "@eslint-react/types": "1.5.19",
46
+ "@eslint-react/tools": "1.5.19",
47
+ "@eslint-react/shared": "1.5.19",
48
+ "@eslint-react/var": "1.5.19"
49
49
  },
50
50
  "devDependencies": {
51
51
  "dedent": "1.5.3",