eslint-plugin-react-hooks 6.0.0-rc.1 → 6.0.0-rc.2

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.
@@ -1,89 +1,69 @@
1
1
  import * as estree from 'estree';
2
- import { Rule, ESLint } from 'eslint';
2
+ import { Rule } from 'eslint';
3
3
 
4
- declare const rules: {
5
- 'exhaustive-deps': {
6
- meta: {
7
- type: "suggestion";
8
- docs: {
9
- description: string;
10
- recommended: true;
11
- url: string;
12
- };
13
- fixable: "code";
14
- hasSuggestions: true;
15
- schema: {
16
- type: "object";
17
- additionalProperties: false;
18
- enableDangerousAutofixThisMayCauseInfiniteLoops: boolean;
19
- properties: {
20
- additionalHooks: {
21
- type: "string";
22
- };
23
- enableDangerousAutofixThisMayCauseInfiniteLoops: {
24
- type: "boolean";
25
- };
26
- };
27
- }[];
28
- };
29
- create(context: Rule.RuleContext): {
30
- CallExpression: (node: estree.CallExpression) => void;
31
- };
32
- };
33
- 'react-compiler': Rule.RuleModule;
34
- 'rules-of-hooks': {
35
- meta: {
36
- type: "problem";
37
- docs: {
38
- description: string;
39
- recommended: true;
40
- url: string;
41
- };
42
- };
43
- create(context: Rule.RuleContext): {
44
- onCodePathSegmentStart: (segment: Rule.CodePathSegment) => number;
45
- onCodePathSegmentEnd: () => Rule.CodePathSegment | undefined;
46
- onCodePathStart: () => number;
47
- onCodePathEnd(codePath: Rule.CodePath, codePathNode: Rule.Node): void;
48
- CallExpression(node: estree.CallExpression & Rule.NodeParentExtension): void;
49
- Identifier(node: estree.Identifier & Rule.NodeParentExtension): void;
50
- 'CallExpression:exit'(node: estree.CallExpression & Rule.NodeParentExtension): void;
51
- FunctionDeclaration(node: estree.FunctionDeclaration & Rule.NodeParentExtension): void;
52
- ArrowFunctionExpression(node: estree.ArrowFunctionExpression & Rule.NodeParentExtension): void;
53
- };
54
- };
55
- };
56
- declare const configs: {
57
- 'recommended-legacy': {
58
- plugins: string[];
59
- rules: {
60
- 'react-hooks/rules-of-hooks': "error";
61
- 'react-hooks/exhaustive-deps': "warn";
62
- };
63
- };
64
- recommended: {
4
+ declare const plugin: {
5
+ meta: {
65
6
  name: string;
66
- plugins: {
67
- readonly 'react-hooks': ESLint.Plugin;
68
- };
69
- rules: {
70
- 'react-hooks/rules-of-hooks': "error";
71
- 'react-hooks/exhaustive-deps': "warn";
72
- };
73
7
  };
74
- 'recommended-latest': {
75
- name: string;
76
- plugins: {
77
- readonly 'react-hooks': ESLint.Plugin;
8
+ configs: {};
9
+ rules: {
10
+ 'exhaustive-deps': {
11
+ meta: {
12
+ type: "suggestion";
13
+ docs: {
14
+ description: string;
15
+ recommended: true;
16
+ url: string;
17
+ };
18
+ fixable: "code";
19
+ hasSuggestions: true;
20
+ schema: {
21
+ type: "object";
22
+ additionalProperties: false;
23
+ enableDangerousAutofixThisMayCauseInfiniteLoops: boolean;
24
+ properties: {
25
+ additionalHooks: {
26
+ type: "string";
27
+ };
28
+ enableDangerousAutofixThisMayCauseInfiniteLoops: {
29
+ type: "boolean";
30
+ };
31
+ experimental_autoDependenciesHooks: {
32
+ type: "array";
33
+ items: {
34
+ type: "string";
35
+ };
36
+ };
37
+ requireExplicitEffectDeps: {
38
+ type: "boolean";
39
+ };
40
+ };
41
+ }[];
42
+ };
43
+ create(context: Rule.RuleContext): {
44
+ CallExpression: (node: estree.CallExpression) => void;
45
+ };
78
46
  };
79
- rules: {
80
- 'react-hooks/rules-of-hooks': "error";
81
- 'react-hooks/exhaustive-deps': "warn";
47
+ 'rules-of-hooks': {
48
+ meta: {
49
+ type: "problem";
50
+ docs: {
51
+ description: string;
52
+ recommended: true;
53
+ url: string;
54
+ };
55
+ };
56
+ create(context: Rule.RuleContext): {
57
+ '*'(node: any): void;
58
+ '*:exit'(node: any): void;
59
+ CallExpression(node: estree.CallExpression & Rule.NodeParentExtension): void;
60
+ Identifier(node: estree.Identifier & Rule.NodeParentExtension): void;
61
+ 'CallExpression:exit'(node: estree.CallExpression & Rule.NodeParentExtension): void;
62
+ FunctionDeclaration(node: estree.FunctionDeclaration & Rule.NodeParentExtension): void;
63
+ ArrowFunctionExpression(node: estree.ArrowFunctionExpression & Rule.NodeParentExtension): void;
64
+ };
82
65
  };
83
66
  };
84
67
  };
85
- declare const meta: {
86
- name: string;
87
- };
88
68
 
89
- export { configs, meta, rules };
69
+ export { plugin as default };