eslint-plugin-react-hooks-extra 1.37.4-beta.0 → 1.38.0-beta.10

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.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
2
- import { RulePreset } from '@eslint-react/shared';
2
+ import { RulePreset } from '@eslint-react/kit';
3
3
 
4
4
  declare const _default: {
5
5
  configs: {
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
2
- import { RulePreset } from '@eslint-react/shared';
2
+ import { RulePreset } from '@eslint-react/kit';
3
3
 
4
4
  declare const _default: {
5
5
  configs: {
package/dist/index.js CHANGED
@@ -7,6 +7,7 @@ var shared = require('@eslint-react/shared');
7
7
  var VAR4 = require('@eslint-react/var');
8
8
  var types = require('@typescript-eslint/types');
9
9
  var tsPattern = require('ts-pattern');
10
+ var utils = require('@typescript-eslint/utils');
10
11
 
11
12
  function _interopNamespace(e) {
12
13
  if (e && e.__esModule) return e;
@@ -49,8 +50,8 @@ var rules = {
49
50
 
50
51
  // package.json
51
52
  var name2 = "eslint-plugin-react-hooks-extra";
52
- var version = "1.37.4-beta.0";
53
- var createRule = shared.createRuleForPlugin("hooks-extra");
53
+ var version = "1.38.0-beta.10";
54
+ var createRule = utils.ESLintUtils.RuleCreator(shared.getDocsUrl("hooks-extra"));
54
55
  function isFromHookCall(context, name3, settings, predicate = eff.constTrue) {
55
56
  const hookAlias = settings.additionalHooks[name3] ?? [];
56
57
  return (topLevelId) => {
@@ -314,7 +315,9 @@ function useNoDirectSetStateInUseEffect(context, options) {
314
315
 
315
316
  // src/rules/no-direct-set-state-in-use-effect.ts
316
317
  var RULE_NAME = "no-direct-set-state-in-use-effect";
317
- var RULE_FEATURES = [];
318
+ var RULE_FEATURES = [
319
+ "EXP"
320
+ ];
318
321
  var no_direct_set_state_in_use_effect_default = createRule({
319
322
  meta: {
320
323
  type: "problem",
@@ -343,7 +346,9 @@ function create(context) {
343
346
 
344
347
  // src/rules/no-direct-set-state-in-use-layout-effect.ts
345
348
  var RULE_NAME2 = "no-direct-set-state-in-use-layout-effect";
346
- var RULE_FEATURES2 = [];
349
+ var RULE_FEATURES2 = [
350
+ "EXP"
351
+ ];
347
352
  var no_direct_set_state_in_use_layout_effect_default = createRule({
348
353
  meta: {
349
354
  type: "problem",
@@ -370,7 +375,9 @@ function create2(context) {
370
375
  });
371
376
  }
372
377
  var RULE_NAME3 = "no-unnecessary-use-callback";
373
- var RULE_FEATURES3 = [];
378
+ var RULE_FEATURES3 = [
379
+ "EXP"
380
+ ];
374
381
  var no_unnecessary_use_callback_default = createRule({
375
382
  meta: {
376
383
  type: "problem",
@@ -446,7 +453,9 @@ function create3(context) {
446
453
  };
447
454
  }
448
455
  var RULE_NAME4 = "no-unnecessary-use-memo";
449
- var RULE_FEATURES4 = [];
456
+ var RULE_FEATURES4 = [
457
+ "EXP"
458
+ ];
450
459
  var no_unnecessary_use_memo_default = createRule({
451
460
  meta: {
452
461
  type: "problem",
@@ -574,7 +583,9 @@ function create5(context) {
574
583
  };
575
584
  }
576
585
  var RULE_NAME6 = "prefer-use-state-lazy-initialization";
577
- var RULE_FEATURES6 = [];
586
+ var RULE_FEATURES6 = [
587
+ "EXP"
588
+ ];
578
589
  var ALLOW_LIST = [
579
590
  "Boolean",
580
591
  "String",
package/dist/index.mjs CHANGED
@@ -1,10 +1,11 @@
1
1
  import * as AST from '@eslint-react/ast';
2
2
  import { isReactHookCall, isUseCallbackCall, isReactHookCallWithNameLoose, isUseMemoCall, useHookCollector, isUseStateCall, isUseCall, isReactHookNameLoose, isReactHookCallWithNameAlias, isReactHookName } from '@eslint-react/core';
3
3
  import { identity, _, getOrUpdate, constTrue } from '@eslint-react/eff';
4
- import { createRuleForPlugin, getSettingsFromContext } from '@eslint-react/shared';
4
+ import { getDocsUrl, getSettingsFromContext } from '@eslint-react/shared';
5
5
  import * as VAR4 from '@eslint-react/var';
6
6
  import { AST_NODE_TYPES } from '@typescript-eslint/types';
7
7
  import { match } from 'ts-pattern';
8
+ import { ESLintUtils } from '@typescript-eslint/utils';
8
9
 
9
10
  var __defProp = Object.defineProperty;
10
11
  var __export = (target, all) => {
@@ -26,8 +27,8 @@ var rules = {
26
27
 
27
28
  // package.json
28
29
  var name2 = "eslint-plugin-react-hooks-extra";
29
- var version = "1.37.4-beta.0";
30
- var createRule = createRuleForPlugin("hooks-extra");
30
+ var version = "1.38.0-beta.10";
31
+ var createRule = ESLintUtils.RuleCreator(getDocsUrl("hooks-extra"));
31
32
  function isFromHookCall(context, name3, settings, predicate = constTrue) {
32
33
  const hookAlias = settings.additionalHooks[name3] ?? [];
33
34
  return (topLevelId) => {
@@ -291,7 +292,9 @@ function useNoDirectSetStateInUseEffect(context, options) {
291
292
 
292
293
  // src/rules/no-direct-set-state-in-use-effect.ts
293
294
  var RULE_NAME = "no-direct-set-state-in-use-effect";
294
- var RULE_FEATURES = [];
295
+ var RULE_FEATURES = [
296
+ "EXP"
297
+ ];
295
298
  var no_direct_set_state_in_use_effect_default = createRule({
296
299
  meta: {
297
300
  type: "problem",
@@ -320,7 +323,9 @@ function create(context) {
320
323
 
321
324
  // src/rules/no-direct-set-state-in-use-layout-effect.ts
322
325
  var RULE_NAME2 = "no-direct-set-state-in-use-layout-effect";
323
- var RULE_FEATURES2 = [];
326
+ var RULE_FEATURES2 = [
327
+ "EXP"
328
+ ];
324
329
  var no_direct_set_state_in_use_layout_effect_default = createRule({
325
330
  meta: {
326
331
  type: "problem",
@@ -347,7 +352,9 @@ function create2(context) {
347
352
  });
348
353
  }
349
354
  var RULE_NAME3 = "no-unnecessary-use-callback";
350
- var RULE_FEATURES3 = [];
355
+ var RULE_FEATURES3 = [
356
+ "EXP"
357
+ ];
351
358
  var no_unnecessary_use_callback_default = createRule({
352
359
  meta: {
353
360
  type: "problem",
@@ -423,7 +430,9 @@ function create3(context) {
423
430
  };
424
431
  }
425
432
  var RULE_NAME4 = "no-unnecessary-use-memo";
426
- var RULE_FEATURES4 = [];
433
+ var RULE_FEATURES4 = [
434
+ "EXP"
435
+ ];
427
436
  var no_unnecessary_use_memo_default = createRule({
428
437
  meta: {
429
438
  type: "problem",
@@ -551,7 +560,9 @@ function create5(context) {
551
560
  };
552
561
  }
553
562
  var RULE_NAME6 = "prefer-use-state-lazy-initialization";
554
- var RULE_FEATURES6 = [];
563
+ var RULE_FEATURES6 = [
564
+ "EXP"
565
+ ];
555
566
  var ALLOW_LIST = [
556
567
  "Boolean",
557
568
  "String",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-hooks-extra",
3
- "version": "1.37.4-beta.0",
3
+ "version": "1.38.0-beta.10",
4
4
  "description": "ESLint React's ESLint plugin for React Hooks related rules.",
5
5
  "keywords": [
6
6
  "react",
@@ -50,12 +50,13 @@
50
50
  "@typescript-eslint/utils": "^8.27.0",
51
51
  "string-ts": "^2.2.1",
52
52
  "ts-pattern": "^5.6.2",
53
- "@eslint-react/eff": "1.37.4-beta.0",
54
- "@eslint-react/core": "1.37.4-beta.0",
55
- "@eslint-react/ast": "1.37.4-beta.0",
56
- "@eslint-react/jsx": "1.37.4-beta.0",
57
- "@eslint-react/shared": "1.37.4-beta.0",
58
- "@eslint-react/var": "1.37.4-beta.0"
53
+ "@eslint-react/ast": "1.38.0-beta.10",
54
+ "@eslint-react/core": "1.38.0-beta.10",
55
+ "@eslint-react/eff": "1.38.0-beta.10",
56
+ "@eslint-react/jsx": "1.38.0-beta.10",
57
+ "@eslint-react/kit": "1.38.0-beta.10",
58
+ "@eslint-react/shared": "1.38.0-beta.10",
59
+ "@eslint-react/var": "1.38.0-beta.10"
59
60
  },
60
61
  "devDependencies": {
61
62
  "@types/react": "^19.0.12",