-
-
Notifications
You must be signed in to change notification settings - Fork 169
Closed
Labels
Description
Motivation
When using TypeScript and React it's really simple to write your components and their props like that:
/**
* Properties for the Greeting component
*/
interface IGreetingProps {
/**
* Who is greeting to
*/
target: string;
}
/**
* @returns Greeting component
*/
function Greeting({ target }: IGreetingProps) {
return <>Hello, {target}!</>;
}
/**
* @returns App component
*/
export default function App() {
return (
<div>
<Greeting target='world' />
</div>
);
}Current behavior
Unfortunately, in some of recent (not that I missed about five months of releases) versions defaults now ask you:
- To document
root1(param1according to TypeScript) parameter (that's okay, I can do that even that it is never displayed anywhere?) - To document all properties of that
root1, so in our caseparam1.target(that's not okay and is useless duplication for TypeScript)
Desired behavior
Be able to either (or both):
- Disable name checks for destructured parameters (require only
root1/param1to be documented) - Disable
root1parameters entirely (require only named parameters to be documented and skip automatic ones)
Alternatives considered
Someone seemed to reported something the same (#530) and it was marked as fixed. It was related to require-param and fix added checkDestructured option, but this rule does not affect check-param-names.