Skip to content

Commit fba8c16

Browse files
committed
refactor(plugins/x): minor improvements
1 parent 325ecad commit fba8c16

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

packages/plugins/eslint-plugin-react-x/src/rules/no-forward-ref.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,21 @@ function getFix(node: TSESTree.CallExpression, context: RuleContext): (fixer: Ru
5252
return [
5353
fixer.removeRange([node.range[0], componentNode.range[0]]),
5454
fixer.removeRange([componentNode.range[1], node.range[1]]),
55-
...getParamsFixes(componentNode, context, node.typeArguments?.params ?? [], fixer),
55+
...getComponentPropsFixes(
56+
componentNode,
57+
node.typeArguments?.params ?? [],
58+
fixer,
59+
context,
60+
),
5661
];
5762
};
5863
}
5964

60-
function getParamsFixes(
65+
function getComponentPropsFixes(
6166
node: AST.TSESTreeFunction,
62-
context: RuleContext,
6367
typeArguments: TSESTree.TypeNode[],
6468
fixer: RuleFixer,
69+
context: RuleContext,
6570
): RuleFix[] {
6671
const [arg0, arg1] = node.params;
6772
const [typeArg0, typeArg1] = typeArguments;

packages/tools/docs/namespaces/F/functions/absurd.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
The `absurd` function is a stub for cases where a value of type `never` is encountered in your code,
1212
meaning that it should be impossible for this code to be executed.
1313

14-
This function is particularly when it's necessary to specify that certain cases are impossible.
14+
This function is particularly useful when it's necessary to specify that certain cases are impossible.
1515

1616
## Type Parameters
1717

0 commit comments

Comments
 (0)