Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Applying fixes with object syntax via require-param rule #869

Open
seahindeniz opened this issue Apr 9, 2022 · 1 comment
Open

Applying fixes with object syntax via require-param rule #869

seahindeniz opened this issue Apr 9, 2022 · 1 comment

Comments

@seahindeniz
Copy link

Hi,
Is there any setting/option to make the require-param rule to apply fixes by adding an object instead of properties in new lines?
If not, I think moving forward with a new proposal should be acceptable 馃檹馃徎

Motivation

Applying fixes with object syntax in @param declarations.

Current behavior

/**
 * @param root0
 * @param root0.bar
 * @returns {void}
 */
const foo = ({ bar }) => {};

Desired behavior

/**
 * @param {{ bar: any }} param0
 * @returns {void}
 */
const foo = ({ bar }) => {};

Alternatives considered

If it is worth to mention, copy-pasting types from TypeScript files with object syntax, makes it easier to adapt it into JSDoc.

@brettz9
Copy link
Collaborator

brettz9 commented Apr 9, 2022

Sounds like a good option to add. Note that although their logic may be more complicated, there are a couple bugs on the param checking rules (#540 and #762 ) that we can hopefully get fixed.

@brettz9 brettz9 added this to To-Do in require-param Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants