Spaces:
Sleeping
Sleeping
File size: 3,433 Bytes
443c22e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | import * as estree from 'estree';
import { Rule, Linter } from 'eslint';
type ReactHooksFlatConfig = {
plugins: {
react: any;
};
rules: Linter.RulesRecord;
};
declare const plugin: {
meta: {
name: string;
version: string;
};
rules: {
'component-hook-factories': Rule.RuleModule;
'exhaustive-deps': {
meta: {
type: "suggestion";
docs: {
description: string;
recommended: true;
url: string;
};
fixable: "code";
hasSuggestions: true;
schema: {
type: "object";
additionalProperties: false;
enableDangerousAutofixThisMayCauseInfiniteLoops: boolean;
properties: {
additionalHooks: {
type: "string";
};
enableDangerousAutofixThisMayCauseInfiniteLoops: {
type: "boolean";
};
experimental_autoDependenciesHooks: {
type: "array";
items: {
type: "string";
};
};
requireExplicitEffectDeps: {
type: "boolean";
};
};
}[];
};
create(context: Rule.RuleContext): {
CallExpression: (node: estree.CallExpression) => void;
};
};
'rules-of-hooks': {
meta: {
type: "problem";
docs: {
description: string;
recommended: true;
url: string;
};
schema: {
type: "object";
additionalProperties: false;
properties: {
additionalHooks: {
type: "string";
};
};
}[];
};
create(context: Rule.RuleContext): {
'*'(node: any): void;
'*:exit'(node: any): void;
CallExpression(node: estree.CallExpression & Rule.NodeParentExtension): void;
Identifier(node: estree.Identifier & Rule.NodeParentExtension): void;
'CallExpression:exit'(node: estree.CallExpression & Rule.NodeParentExtension): void;
FunctionDeclaration(node: estree.FunctionDeclaration & Rule.NodeParentExtension): void;
ArrowFunctionExpression(node: estree.ArrowFunctionExpression & Rule.NodeParentExtension): void;
ComponentDeclaration(node: any): void;
HookDeclaration(node: any): void;
};
};
};
configs: {
recommended: {
plugins: string[];
rules: Linter.RulesRecord;
};
'recommended-latest': {
plugins: string[];
rules: Linter.RulesRecord;
};
flat: {
recommended: ReactHooksFlatConfig;
"recommended-latest": ReactHooksFlatConfig;
};
};
};
export { plugin as default };
|